From 508e25b6d6e9a81edb6ddf8738450b79898b446a Mon Sep 17 00:00:00 2001 From: Adin Scannell Date: Mon, 27 Apr 2020 22:24:58 -0700 Subject: [PATCH] Adapt website to use g3doc sources and bazel. This adapts the merged website repository to use the image and bazel build framework. It explicitly avoids the container_image rules provided by bazel, opting instead to build with direct docker commands when necessary. The relevant build commands are incorporated into the top-level Makefile. --- BUILD | 39 + CONTRIBUTING.md | 5 +- Makefile | 32 + g3doc/BUILD | 37 + g3doc/README.md | 29 +- g3doc/architecture_guide/BUILD | 64 + .../architecture_guide/Layers.png | Bin .../architecture_guide/Layers.svg | 0 .../Machine-Virtualization.png | Bin .../Machine-Virtualization.svg | 0 .../architecture_guide/README.md | 8 +- .../Rule-Based-Execution.png | Bin .../Rule-Based-Execution.svg | 0 .../architecture_guide/Sentry-Gofer.png | Bin .../architecture_guide/Sentry-Gofer.svg | 0 .../architecture_guide/performance.md | 8 +- .../architecture_guide/platforms.md | 10 +- g3doc/architecture_guide/resources.md | 1 + .../architecture_guide/security.md | 8 +- .../community/index.md => g3doc/community.md | 30 +- g3doc/logo.txt | 1 + {website/content => g3doc}/roadmap.md | 10 +- g3doc/user_guide/BUILD | 70 + .../content/docs => g3doc}/user_guide/FAQ.md | 8 +- .../user_guide/checkpoint_restore.md | 9 +- .../user_guide/compatibility.md | 8 +- .../docs => g3doc}/user_guide/debugging.md | 8 +- .../docs => g3doc}/user_guide/filesystem.md | 8 +- .../docs => g3doc}/user_guide/install.md | 11 +- .../docs => g3doc}/user_guide/networking.md | 8 +- .../docs => g3doc}/user_guide/platforms.md | 8 +- g3doc/user_guide/quick_start/BUILD | 33 + .../user_guide/quick_start/docker.md | 9 +- .../user_guide/quick_start/kubernetes.md | 9 +- .../user_guide/quick_start/oci.md | 9 +- g3doc/user_guide/tutorials/BUILD | 37 + .../user_guide}/tutorials/add-node-pool.png | Bin .../user_guide}/tutorials/cni.md | 9 +- .../user_guide}/tutorials/docker.md | 9 +- .../user_guide}/tutorials/kubernetes.md | 13 +- .../tutorials/node-pool-button.png | Bin images/default/Dockerfile | 5 + images/jekyll/Dockerfile | 11 + tools/bazel.mk | 12 +- website/.gitignore | 6 - website/BUILD | 158 + website/Dockerfile | 29 - website/Makefile | 45 - website/README.md | 49 - website/{content => }/_config.yml | 7 +- website/{content => }/_includes/byline.html | 0 .../{content => }/_includes/footer-links.html | 11 +- website/{content => }/_includes/footer.html | 12 + website/{content => }/_includes/graph.html | 0 .../{content => }/_includes/header-links.html | 1 + website/{content => }/_includes/header.html | 0 .../{content => }/_includes/paginator.html | 0 .../_includes/required_linux.html | 0 website/{content => }/_layouts/base.html | 0 website/_layouts/blog.html | 14 + website/{content => }/_layouts/default.html | 0 website/{content => }/_layouts/docs.html | 6 +- website/{content => }/_layouts/post.html | 0 .../{content => }/_plugins/svg_mime_type.rb | 0 website/{content => }/_sass/footer.scss | 0 website/{content => }/_sass/front.scss | 0 website/{content => }/_sass/navbar.scss | 0 website/{content => }/_sass/sidebar.scss | 9 +- website/{content => }/_sass/style.scss | 5 + website/{static => }/archive.key | 0 website/assets/README.md | 13 + .../assets/css/bootstrap.min.css | 0 .../assets/css/fontawesome.min.css | 0 .../favicons/apple-touch-icon-180x180.png | Bin .../assets/favicons/favicon-16x16.png | Bin .../assets/favicons/favicon-32x32.png | Bin .../{content => }/assets/favicons/favicon.ico | Bin .../assets/favicons/pwa-192x192.png | Bin .../assets/favicons/pwa-512x512.png | Bin .../assets/favicons/tile150x150.png | Bin .../assets/favicons/tile310x150.png | Bin .../assets/favicons/tile310x310.png | Bin .../assets/favicons/tile70x70.png | Bin .../2019-11-18-security-basics-figure1.png | Bin .../2019-11-18-security-basics-figure2.png | Bin .../2019-11-18-security-basics-figure3.png | Bin ...2020-04-02-networking-security-figure1.png | Bin .../assets/images/background.jpg | Bin .../{content => }/assets/js/bootstrap.min.js | 0 website/{content => }/assets/js/d3.v4.min.js | 0 .../assets/js/jquery-3.3.1.min.js | 0 website/{content => }/assets/logos/Makefile | 0 website/{content => }/assets/logos/README.md | 0 .../assets/logos/logo_solo_monochrome.png | Bin .../assets/logos/logo_solo_monochrome.svg | 0 .../assets/logos/logo_solo_on_dark-1024.png | Bin .../assets/logos/logo_solo_on_dark-128.png | Bin .../assets/logos/logo_solo_on_dark-16.png | Bin .../assets/logos/logo_solo_on_dark.png | Bin .../assets/logos/logo_solo_on_dark.svg | 0 .../logos/logo_solo_on_dark_full-1024.png | Bin .../logos/logo_solo_on_dark_full-128.png | Bin .../logos/logo_solo_on_dark_full-16.png | Bin .../assets/logos/logo_solo_on_dark_full.png | Bin .../assets/logos/logo_solo_on_dark_full.svg | 0 .../assets/logos/logo_solo_on_white.png | Bin .../assets/logos/logo_solo_on_white.svg | 0 .../logo_solo_on_white_bordered-1024.png | Bin .../logos/logo_solo_on_white_bordered-128.png | Bin .../logos/logo_solo_on_white_bordered-16.png | Bin .../logos/logo_solo_on_white_bordered.png | Bin .../logos/logo_solo_on_white_bordered.svg | 0 .../logos/logo_with_text_monochrome.png | Bin .../logos/logo_with_text_monochrome.svg | 0 .../logos/logo_with_text_on_dark-1024.png | Bin .../logos/logo_with_text_on_dark-128.png | Bin .../logos/logo_with_text_on_dark-16.png | Bin .../assets/logos/logo_with_text_on_dark.png | Bin .../assets/logos/logo_with_text_on_dark.svg | 0 .../logo_with_text_on_dark_full-1024.png | Bin .../logos/logo_with_text_on_dark_full-128.png | Bin .../logos/logo_with_text_on_dark_full-16.png | Bin .../logos/logo_with_text_on_dark_full.png | Bin .../logos/logo_with_text_on_dark_full.svg | 0 .../assets/logos/logo_with_text_on_white.png | Bin .../assets/logos/logo_with_text_on_white.svg | 0 .../logo_with_text_on_white_bordered.png | Bin .../logo_with_text_on_white_bordered.svg | 0 .../assets/webfonts/fa-brands-400.eot | Bin .../assets/webfonts/fa-brands-400.svg | 0 .../assets/webfonts/fa-brands-400.ttf | Bin .../assets/webfonts/fa-brands-400.woff | Bin .../assets/webfonts/fa-brands-400.woff2 | Bin .../assets/webfonts/fa-regular-400.eot | Bin .../assets/webfonts/fa-regular-400.svg | 0 .../assets/webfonts/fa-regular-400.ttf | Bin .../assets/webfonts/fa-regular-400.woff | Bin .../assets/webfonts/fa-regular-400.woff2 | Bin .../assets/webfonts/fa-solid-900.eot | Bin .../assets/webfonts/fa-solid-900.svg | 0 .../assets/webfonts/fa-solid-900.ttf | Bin .../assets/webfonts/fa-solid-900.woff | Bin .../assets/webfonts/fa-solid-900.woff2 | Bin website/blog/2019-11-18-security-basics.md | 337 ++ .../blog/2020-04-02-networking-security.md | 193 + website/{content => }/blog/index.html | 5 + website/cloudbuild.yaml | 35 - website/cmd/generate-syscall-docs/BUILD | 9 + website/cmd/generate-syscall-docs/main.go | 3 +- website/cmd/server/BUILD | 10 + .../cmd/{gvisor-website => server}/main.go | 10 +- website/content/_data/authors.yaml | 3 - website/content/_layouts/blog.html | 17 - .../_posts/2019-11-18-security-basics.md | 226 - .../_posts/2020-04-02-networking-security.md | 63 - .../assets/images/587-office-building.svg | 183 - .../content/assets/images/Cloud_types_en.svg | 1953 --------- website/content/assets/images/README.md | 23 - .../images/Tetrominoes_IJLO_STZ_Worlds.svg | 42 - .../content/assets/images/office_clouds.png | Bin 7709 -> 0 bytes .../content/assets/images/office_clouds.svg | 598 --- .../content/assets/images/packed_tetris.png | Bin 4771 -> 0 bytes .../content/assets/images/packed_tetris.svg | 329 -- website/content/basics.md | 6 - website/content/blog/archive.html | 22 - .../docs/architecture_guide/resource.md | 7 - website/content/docs/includes/index.md | 3 - website/content/docs/index.md | 30 - .../docs/user_guide/compatibility/.gitignore | 1 - website/cron.yaml | 4 - website/{content => }/css/main.scss | 0 website/defs.bzl | 158 + website/go.mod | 8 - website/go.sum | 50 - website/{app.yaml => import.sh} | 26 +- website/{content => }/index.md | 0 website/package-lock.json | 3899 ----------------- website/package.json | 22 - website/{static => }/performance/README.md | 0 .../{static => }/performance/applications.csv | 0 website/{static => }/performance/density.csv | 0 website/{static => }/performance/ffmpeg.csv | 0 .../{static => }/performance/fio-tmpfs.csv | 0 website/{static => }/performance/fio.csv | 0 .../{static => }/performance/httpd100k.csv | 0 .../{static => }/performance/httpd10240k.csv | 0 website/{static => }/performance/iperf.csv | 0 website/{static => }/performance/redis.csv | 0 website/{static => }/performance/startup.csv | 0 .../{static => }/performance/sysbench-cpu.csv | 0 .../performance/sysbench-memory.csv | 0 website/{static => }/performance/syscall.csv | 0 .../{static => }/performance/tensorflow.csv | 0 193 files changed, 1360 insertions(+), 7856 deletions(-) create mode 100644 g3doc/BUILD create mode 100644 g3doc/architecture_guide/BUILD rename {website/content/docs => g3doc}/architecture_guide/Layers.png (100%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/architecture_guide/Layers.svg (100%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/architecture_guide/Machine-Virtualization.png (100%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/architecture_guide/Machine-Virtualization.svg (100%) mode change 100755 => 100644 rename website/content/docs/architecture_guide/index.md => g3doc/architecture_guide/README.md (97%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/architecture_guide/Rule-Based-Execution.png (100%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/architecture_guide/Rule-Based-Execution.svg (100%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/architecture_guide/Sentry-Gofer.png (100%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/architecture_guide/Sentry-Gofer.svg (100%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/architecture_guide/performance.md (99%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/architecture_guide/platforms.md (94%) mode change 100755 => 100644 create mode 100644 g3doc/architecture_guide/resources.md rename {website/content/docs => g3doc}/architecture_guide/security.md (99%) mode change 100755 => 100644 rename website/content/docs/community/index.md => g3doc/community.md (57%) mode change 100755 => 100644 create mode 100644 g3doc/logo.txt rename {website/content => g3doc}/roadmap.md (93%) mode change 100755 => 100644 create mode 100644 g3doc/user_guide/BUILD rename {website/content/docs => g3doc}/user_guide/FAQ.md (97%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/user_guide/checkpoint_restore.md (96%) mode change 100755 => 100644 rename website/content/docs/user_guide/compatibility/index.md => g3doc/user_guide/compatibility.md (95%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/user_guide/debugging.md (97%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/user_guide/filesystem.md (94%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/user_guide/install.md (96%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/user_guide/networking.md (95%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/user_guide/platforms.md (96%) mode change 100755 => 100644 create mode 100644 g3doc/user_guide/quick_start/BUILD rename {website/content/docs => g3doc}/user_guide/quick_start/docker.md (94%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/user_guide/quick_start/kubernetes.md (91%) mode change 100755 => 100644 rename {website/content/docs => g3doc}/user_guide/quick_start/oci.md (88%) mode change 100755 => 100644 create mode 100644 g3doc/user_guide/tutorials/BUILD rename {website/content/docs => g3doc/user_guide}/tutorials/add-node-pool.png (100%) mode change 100755 => 100644 rename {website/content/docs => g3doc/user_guide}/tutorials/cni.md (97%) rename {website/content/docs => g3doc/user_guide}/tutorials/docker.md (93%) mode change 100755 => 100644 rename {website/content/docs => g3doc/user_guide}/tutorials/kubernetes.md (95%) mode change 100755 => 100644 rename {website/content/docs => g3doc/user_guide}/tutorials/node-pool-button.png (100%) mode change 100755 => 100644 create mode 100644 images/jekyll/Dockerfile delete mode 100644 website/.gitignore create mode 100644 website/BUILD delete mode 100644 website/Dockerfile delete mode 100644 website/Makefile delete mode 100644 website/README.md rename website/{content => }/_config.yml (79%) mode change 100755 => 100644 rename website/{content => }/_includes/byline.html (100%) mode change 100755 => 100644 rename website/{content => }/_includes/footer-links.html (74%) mode change 100755 => 100644 rename website/{content => }/_includes/footer.html (84%) mode change 100755 => 100644 rename website/{content => }/_includes/graph.html (100%) mode change 100755 => 100644 rename website/{content => }/_includes/header-links.html (92%) mode change 100755 => 100644 rename website/{content => }/_includes/header.html (100%) mode change 100755 => 100644 rename website/{content => }/_includes/paginator.html (100%) mode change 100755 => 100644 rename website/{content => }/_includes/required_linux.html (100%) mode change 100755 => 100644 rename website/{content => }/_layouts/base.html (100%) mode change 100755 => 100644 create mode 100644 website/_layouts/blog.html rename website/{content => }/_layouts/default.html (100%) mode change 100755 => 100644 rename website/{content => }/_layouts/docs.html (88%) mode change 100755 => 100644 rename website/{content => }/_layouts/post.html (100%) mode change 100755 => 100644 rename website/{content => }/_plugins/svg_mime_type.rb (100%) mode change 100755 => 100644 rename website/{content => }/_sass/footer.scss (100%) mode change 100755 => 100644 rename website/{content => }/_sass/front.scss (100%) mode change 100755 => 100644 rename website/{content => }/_sass/navbar.scss (100%) mode change 100755 => 100644 rename website/{content => }/_sass/sidebar.scss (80%) mode change 100755 => 100644 rename website/{content => }/_sass/style.scss (96%) mode change 100755 => 100644 rename website/{static => }/archive.key (100%) create mode 100644 website/assets/README.md rename website/{content => }/assets/css/bootstrap.min.css (100%) mode change 100755 => 100644 rename website/{content => }/assets/css/fontawesome.min.css (100%) mode change 100755 => 100644 rename website/{content => }/assets/favicons/apple-touch-icon-180x180.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/favicons/favicon-16x16.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/favicons/favicon-32x32.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/favicons/favicon.ico (100%) mode change 100755 => 100644 rename website/{content => }/assets/favicons/pwa-192x192.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/favicons/pwa-512x512.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/favicons/tile150x150.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/favicons/tile310x150.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/favicons/tile310x310.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/favicons/tile70x70.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/images/2019-11-18-security-basics-figure1.png (100%) rename website/{content => }/assets/images/2019-11-18-security-basics-figure2.png (100%) rename website/{content => }/assets/images/2019-11-18-security-basics-figure3.png (100%) rename website/{content => }/assets/images/2020-04-02-networking-security-figure1.png (100%) rename website/{content => }/assets/images/background.jpg (100%) mode change 100755 => 100644 rename website/{content => }/assets/js/bootstrap.min.js (100%) mode change 100755 => 100644 rename website/{content => }/assets/js/d3.v4.min.js (100%) mode change 100755 => 100644 rename website/{content => }/assets/js/jquery-3.3.1.min.js (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/Makefile (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/README.md (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_monochrome.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_monochrome.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_dark-1024.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_dark-128.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_dark-16.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_dark.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_dark.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_dark_full-1024.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_dark_full-128.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_dark_full-16.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_dark_full.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_dark_full.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_white.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_white.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_white_bordered-1024.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_white_bordered-128.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_white_bordered-16.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_white_bordered.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_solo_on_white_bordered.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_monochrome.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_monochrome.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_dark-1024.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_dark-128.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_dark-16.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_dark.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_dark.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_dark_full-1024.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_dark_full-128.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_dark_full-16.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_dark_full.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_dark_full.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_white.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_white.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_white_bordered.png (100%) mode change 100755 => 100644 rename website/{content => }/assets/logos/logo_with_text_on_white_bordered.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-brands-400.eot (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-brands-400.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-brands-400.ttf (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-brands-400.woff (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-brands-400.woff2 (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-regular-400.eot (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-regular-400.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-regular-400.ttf (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-regular-400.woff (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-regular-400.woff2 (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-solid-900.eot (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-solid-900.svg (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-solid-900.ttf (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-solid-900.woff (100%) mode change 100755 => 100644 rename website/{content => }/assets/webfonts/fa-solid-900.woff2 (100%) mode change 100755 => 100644 create mode 100644 website/blog/2019-11-18-security-basics.md create mode 100644 website/blog/2020-04-02-networking-security.md rename website/{content => }/blog/index.html (83%) mode change 100755 => 100644 delete mode 100644 website/cloudbuild.yaml create mode 100644 website/cmd/generate-syscall-docs/BUILD create mode 100644 website/cmd/server/BUILD rename website/cmd/{gvisor-website => server}/main.go (96%) delete mode 100755 website/content/_data/authors.yaml delete mode 100755 website/content/_layouts/blog.html delete mode 100644 website/content/_posts/2019-11-18-security-basics.md delete mode 100644 website/content/_posts/2020-04-02-networking-security.md delete mode 100755 website/content/assets/images/587-office-building.svg delete mode 100755 website/content/assets/images/Cloud_types_en.svg delete mode 100755 website/content/assets/images/README.md delete mode 100755 website/content/assets/images/Tetrominoes_IJLO_STZ_Worlds.svg delete mode 100755 website/content/assets/images/office_clouds.png delete mode 100755 website/content/assets/images/office_clouds.svg delete mode 100755 website/content/assets/images/packed_tetris.png delete mode 100755 website/content/assets/images/packed_tetris.svg delete mode 100644 website/content/basics.md delete mode 100755 website/content/blog/archive.html delete mode 100755 website/content/docs/architecture_guide/resource.md delete mode 100755 website/content/docs/includes/index.md delete mode 100755 website/content/docs/index.md delete mode 100755 website/content/docs/user_guide/compatibility/.gitignore delete mode 100644 website/cron.yaml rename website/{content => }/css/main.scss (100%) mode change 100755 => 100644 create mode 100644 website/defs.bzl delete mode 100644 website/go.mod delete mode 100644 website/go.sum rename website/{app.yaml => import.sh} (61%) mode change 100644 => 100755 rename website/{content => }/index.md (100%) mode change 100755 => 100644 delete mode 100644 website/package-lock.json delete mode 100644 website/package.json rename website/{static => }/performance/README.md (100%) rename website/{static => }/performance/applications.csv (100%) rename website/{static => }/performance/density.csv (100%) rename website/{static => }/performance/ffmpeg.csv (100%) rename website/{static => }/performance/fio-tmpfs.csv (100%) rename website/{static => }/performance/fio.csv (100%) rename website/{static => }/performance/httpd100k.csv (100%) rename website/{static => }/performance/httpd10240k.csv (100%) rename website/{static => }/performance/iperf.csv (100%) rename website/{static => }/performance/redis.csv (100%) rename website/{static => }/performance/startup.csv (100%) rename website/{static => }/performance/sysbench-cpu.csv (100%) rename website/{static => }/performance/sysbench-memory.csv (100%) rename website/{static => }/performance/syscall.csv (100%) rename website/{static => }/performance/tensorflow.csv (100%) diff --git a/BUILD b/BUILD index c43ce206d..962d54821 100644 --- a/BUILD +++ b/BUILD @@ -1,9 +1,48 @@ load("//tools:defs.bzl", "build_test", "gazelle", "go_path") +load("//website:defs.bzl", "doc") package(licenses = ["notice"]) exports_files(["LICENSE"]) +doc( + name = "contributing", + src = "CONTRIBUTING.md", + category = "Project", + permalink = "/contributing/", + visibility = ["//website:__pkg__"], + weight = "20", +) + +doc( + name = "security", + src = "SECURITY.md", + category = "Project", + permalink = "/security/", + visibility = ["//website:__pkg__"], + weight = "30", +) + +doc( + name = "governance", + src = "GOVERNANCE.md", + category = "Project", + permalink = "/community/governance/", + subcategory = "Community", + visibility = ["//website:__pkg__"], + weight = "91", +) + +doc( + name = "code_of_conduct", + src = "CODE_OF_CONDUCT.md", + category = "Project", + permalink = "/community/code_of_conduct/", + subcategory = "Community", + visibility = ["//website:__pkg__"], + weight = "99", +) + # The sandbox filegroup is used for sandbox-internal dependencies. package_group( name = "sandbox", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 423cf7a34..3f8f4c985 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,8 +39,8 @@ Dependencies can be added by using `go mod get`. In order to keep the All Go code should conform to the [Go style guidelines][gostyle]. C++ code should conform to the [Google C++ Style Guide][cppstyle] and the guidelines -described for [tests][teststyle]. Note that code may be automatically formatted -per the guidelines when merged. +described for tests. Note that code may be automatically formatted per the +guidelines when merged. As a secure runtime, we need to maintain the safety of all of code included in gVisor. The following rules help mitigate issues. @@ -131,4 +131,3 @@ one above, the [github]: https://github.com/google/gvisor/compare [gvisor-dev-list]: https://groups.google.com/forum/#!forum/gvisor-dev [gostyle]: https://github.com/golang/go/wiki/CodeReviewComments -[teststyle]: ./test/ diff --git a/Makefile b/Makefile index c56c6ed48..4ee55e56c 100644 --- a/Makefile +++ b/Makefile @@ -119,6 +119,38 @@ tests: ## Runs all local ptrace system call tests. @$(MAKE) test OPTIONS="--test_tag_filter runsc_ptrace test/syscalls/..." .PHONY: tests +## +## Website & documentation helpers. +## +## The website is built from repository documentation and wrappers, using +## using a locally-defined Docker image (see images/jekyll). The following +## variables may be set when using website-push: +## WEBSITE_IMAGE - The name of the container image. +## WEBSITE_SERVICE - The backend service. +## WEBSITE_PROJECT - The project id to use. +## WEBSITE_REGION - The region to deploy to. +## +WEBSITE_IMAGE := gcr.io/gvisordev/gvisordev +WEBSITE_SERVICE := gvisordev +WEBSITE_PROJECT := gvisordev +WEBSITE_REGION := us-central1 + +website-build: load-jekyll ## Build the site image locally. + @$(MAKE) run TARGETS="//website:website" +.PHONY: website-build + +website-server: website-build ## Run a local server for development. + @docker run -i -p 8080:8080 gvisor.dev/images/website +.PHONY: website-server + +website-push: website-build ## Push a new image and update the service. + @docker tag gvisor.dev/images/website $(WEBSITE_IMAGE) && docker push $(WEBSITE_IMAGE) +.PHONY: website-push + +website-deploy: website-push ## Deploy a new version of the website. + @gcloud run deploy $(WEBSITE_SERVICE) --platform=managed --region=$(WEBSITE_REGION) --project=$(WEBSITE_PROJECT) --image=$(WEBSITE_IMAGE) +.PHONY: website-push + ## ## Development helpers and tooling. ## diff --git a/g3doc/BUILD b/g3doc/BUILD new file mode 100644 index 000000000..be3653c93 --- /dev/null +++ b/g3doc/BUILD @@ -0,0 +1,37 @@ +load("//website:defs.bzl", "doc") + +package( + default_visibility = ["//website:__pkg__"], + licenses = ["notice"], +) + +doc( + name = "index", + src = "README.md", + permalink = "/docs/", + weight = "0", +) + +doc( + name = "roadmap", + src = "roadmap.md", + category = "Project", + permalink = "/roadmap/", + weight = "10", +) + +doc( + name = "basics", + src = "basics.md", + category = "Project", + permalink = "/docs/basics/", +) + +doc( + name = "community", + src = "community.md", + category = "Project", + permalink = "/community/", + subcategory = "Community", + weight = "95", +) diff --git a/g3doc/README.md b/g3doc/README.md index 49d58cdae..7c582ba79 100644 --- a/g3doc/README.md +++ b/g3doc/README.md @@ -1,2 +1,27 @@ -The gVisor logo files are licensed under CC BY-SA 4.0 (Creative Commons -Attribution-ShareAlike 4.0 International). +# What is gVisor? + +gVisor is a user-space kernel, written in Go, that implements a substantial +portion of the [Linux system call interface][linux]. It provides an additional +layer of isolation between running applications and the host operating system. + +gVisor includes an [Open Container Initiative (OCI)][oci] runtime called `runsc` +that makes it easy to work with existing container tooling. The `runsc` runtime +integrates with Docker and Kubernetes, making it simple to run sandboxed +containers. + +gVisor takes a distinct approach to container sandboxing and makes a different +set of technical trade-offs compared to existing sandbox technologies, thus +providing new tools and ideas for the container security landscape. + +gVisor can be used with Docker, Kubernetes, or directly using `runsc`. Use the +links below to see detailed instructions for each of them: + +* [Docker](./user_guide/quick_start/docker/): The quickest and easiest way to + get started. +* [Kubernetes](./user_guide/quick_start/kubernetes/): Isolate Pods in your K8s + cluster with gVisor. +* [OCI Quick Start](./user_guide/quick_start/oci/): Expert mode. Customize + gVisor for your environment. + +[linux]: https://en.wikipedia.org/wiki/Linux_kernel_interfaces +[oci]: https://www.opencontainers.org diff --git a/g3doc/architecture_guide/BUILD b/g3doc/architecture_guide/BUILD new file mode 100644 index 000000000..72038305b --- /dev/null +++ b/g3doc/architecture_guide/BUILD @@ -0,0 +1,64 @@ +load("//website:defs.bzl", "doc") + +package( + default_visibility = ["//website:__pkg__"], + licenses = ["notice"], +) + +doc( + name = "index", + src = "README.md", + category = "Architecture Guide", + data = [ + "Layers.png", + "Layers.svg", + "Machine-Virtualization.png", + "Machine-Virtualization.svg", + "Rule-Based-Execution.png", + "Rule-Based-Execution.svg", + "Sentry-Gofer.png", + "Sentry-Gofer.svg", + ], + permalink = "/docs/architecture_guide/", + weight = "0", +) + +doc( + name = "platforms", + src = "platforms.md", + category = "Architecture Guide", + data = [ + "Sentry-Gofer.png", + "Sentry-Gofer.svg", + ], + permalink = "/docs/architecture_guide/platforms/", + weight = "40", +) + +doc( + name = "resources", + src = "resources.md", + category = "Architecture Guide", + permalink = "/docs/architecture_guide/resources/", + weight = "30", +) + +doc( + name = "security", + src = "security.md", + category = "Architecture Guide", + data = [ + "Layers.png", + "Layers.svg", + ], + permalink = "/docs/architecture_guide/security/", + weight = "10", +) + +doc( + name = "performance", + src = "performance.md", + category = "Architecture Guide", + permalink = "/docs/architecture_guide/performance/", + weight = "20", +) diff --git a/website/content/docs/architecture_guide/Layers.png b/g3doc/architecture_guide/Layers.png old mode 100755 new mode 100644 similarity index 100% rename from website/content/docs/architecture_guide/Layers.png rename to g3doc/architecture_guide/Layers.png diff --git a/website/content/docs/architecture_guide/Layers.svg b/g3doc/architecture_guide/Layers.svg old mode 100755 new mode 100644 similarity index 100% rename from website/content/docs/architecture_guide/Layers.svg rename to g3doc/architecture_guide/Layers.svg diff --git a/website/content/docs/architecture_guide/Machine-Virtualization.png b/g3doc/architecture_guide/Machine-Virtualization.png old mode 100755 new mode 100644 similarity index 100% rename from website/content/docs/architecture_guide/Machine-Virtualization.png rename to g3doc/architecture_guide/Machine-Virtualization.png diff --git a/website/content/docs/architecture_guide/Machine-Virtualization.svg b/g3doc/architecture_guide/Machine-Virtualization.svg old mode 100755 new mode 100644 similarity index 100% rename from website/content/docs/architecture_guide/Machine-Virtualization.svg rename to g3doc/architecture_guide/Machine-Virtualization.svg diff --git a/website/content/docs/architecture_guide/index.md b/g3doc/architecture_guide/README.md old mode 100755 new mode 100644 similarity index 97% rename from website/content/docs/architecture_guide/index.md rename to g3doc/architecture_guide/README.md index 7ea331605..ce4c4ae69 --- a/website/content/docs/architecture_guide/index.md +++ b/g3doc/architecture_guide/README.md @@ -1,10 +1,4 @@ ---- -title: Overview -permalink: /docs/architecture_guide/ -layout: docs -category: Architecture Guide -weight: 0 ---- +# Overview gVisor provides a virtualized environment in order to sandbox untrusted containers. The system interfaces normally implemented by the host kernel are diff --git a/website/content/docs/architecture_guide/Rule-Based-Execution.png b/g3doc/architecture_guide/Rule-Based-Execution.png old mode 100755 new mode 100644 similarity index 100% rename from website/content/docs/architecture_guide/Rule-Based-Execution.png rename to g3doc/architecture_guide/Rule-Based-Execution.png diff --git a/website/content/docs/architecture_guide/Rule-Based-Execution.svg b/g3doc/architecture_guide/Rule-Based-Execution.svg old mode 100755 new mode 100644 similarity index 100% rename from website/content/docs/architecture_guide/Rule-Based-Execution.svg rename to g3doc/architecture_guide/Rule-Based-Execution.svg diff --git a/website/content/docs/architecture_guide/Sentry-Gofer.png b/g3doc/architecture_guide/Sentry-Gofer.png old mode 100755 new mode 100644 similarity index 100% rename from website/content/docs/architecture_guide/Sentry-Gofer.png rename to g3doc/architecture_guide/Sentry-Gofer.png diff --git a/website/content/docs/architecture_guide/Sentry-Gofer.svg b/g3doc/architecture_guide/Sentry-Gofer.svg old mode 100755 new mode 100644 similarity index 100% rename from website/content/docs/architecture_guide/Sentry-Gofer.svg rename to g3doc/architecture_guide/Sentry-Gofer.svg diff --git a/website/content/docs/architecture_guide/performance.md b/g3doc/architecture_guide/performance.md old mode 100755 new mode 100644 similarity index 99% rename from website/content/docs/architecture_guide/performance.md rename to g3doc/architecture_guide/performance.md index 62c7ff8b6..fd219be5e --- a/website/content/docs/architecture_guide/performance.md +++ b/g3doc/architecture_guide/performance.md @@ -1,10 +1,4 @@ ---- -title: Performance Guide -permalink: /docs/architecture_guide/performance/ -layout: docs -category: Architecture Guide -weight: 20 ---- +# Performance Guide gVisor is designed to provide a secure, virtualized environment while preserving key benefits of containerization, such as small fixed overheads and a dynamic diff --git a/website/content/docs/architecture_guide/platforms.md b/g3doc/architecture_guide/platforms.md old mode 100755 new mode 100644 similarity index 94% rename from website/content/docs/architecture_guide/platforms.md rename to g3doc/architecture_guide/platforms.md index 3a3322fc0..1f79971d1 --- a/website/content/docs/architecture_guide/platforms.md +++ b/g3doc/architecture_guide/platforms.md @@ -1,10 +1,4 @@ ---- -title: Platform Guide -permalink: /docs/architecture_guide/platforms/ -layout: docs -category: Architecture Guide -weight: 50 ---- +# Platform Guide A gVisor sandbox consists of multiple processes when running. These processes collectively comprise a shared environment in which one or more containers can @@ -19,7 +13,7 @@ Each container running in the sandbox has its own isolated instance of: * A **Gofer** which provides file system access to the container. -![gVisor architecture diagram](../Sentry-Gofer.png "gVisor architecture diagram") +![gVisor architecture diagram](Sentry-Gofer.png "gVisor architecture diagram") ## runsc diff --git a/g3doc/architecture_guide/resources.md b/g3doc/architecture_guide/resources.md new file mode 100644 index 000000000..7e45b58a9 --- /dev/null +++ b/g3doc/architecture_guide/resources.md @@ -0,0 +1 @@ +# Resource Model diff --git a/website/content/docs/architecture_guide/security.md b/g3doc/architecture_guide/security.md old mode 100755 new mode 100644 similarity index 99% rename from website/content/docs/architecture_guide/security.md rename to g3doc/architecture_guide/security.md index 56dfa28f0..59003f0a8 --- a/website/content/docs/architecture_guide/security.md +++ b/g3doc/architecture_guide/security.md @@ -1,10 +1,4 @@ ---- -title: "Security Model" -permalink: /docs/architecture_guide/security/ -layout: docs -category: Architecture Guide -weight: 10 ---- +# Security Model gVisor was created in order to provide additional defense against the exploitation of kernel bugs by untrusted userspace code. In order to understand diff --git a/website/content/docs/community/index.md b/g3doc/community.md old mode 100755 new mode 100644 similarity index 57% rename from website/content/docs/community/index.md rename to g3doc/community.md index f2eb858cc..b3dc2d2cf --- a/website/content/docs/community/index.md +++ b/g3doc/community.md @@ -1,18 +1,9 @@ ---- -title: Contributing -layout: docs -category: Project -weight: 20 -permalink: /docs/community/ ---- +# Participation -Contributions are accepted through our [GitHub][github] repositories. See the -[contribution guide][contributing]. +To contribute code, please read the [contributing guide](../CONTRIBUTING.md). -## Governance - -See the project [governance][governance]. All projects are covered by our [code -of conduct][codeofconduct]. +Please note that the [Code of Conduct](../CODE_OF_CONDUCT.md) applies to +community forums as well as technical participation. ## Communication channels @@ -23,15 +14,18 @@ The project maintains two mailing lists: We also have a [chat room hosted on Gitter][gitter-chat]. +We'd love to hear from you! + +## Community meetings + The community calendar shows upcoming public meetings and opportunities to -collaborate. +collaborate or discuss the project. Meetings are planned and announced ahead of +time via the [gvisor-users][gvisor-users] mailing list. + +These meetings are public: anyone can join. -[contributing]: https://github.com/google/gvisor/blob/master/CONTRIBUTING.md -[github]: https://github.com/google/gvisor [gitter-chat]: https://gitter.im/gvisor/community -[governance]: https://github.com/google/gvisor/blob/master/GOVERNANCE.md [gvisor-dev]: https://groups.google.com/forum/#!forum/gvisor-dev [gvisor-users]: https://groups.google.com/forum/#!forum/gvisor-users -[codeofconduct]: https://github.com/google/gvisor/blob/master/CODE_OF_CONDUCT.md diff --git a/g3doc/logo.txt b/g3doc/logo.txt new file mode 100644 index 000000000..92f9cad5f --- /dev/null +++ b/g3doc/logo.txt @@ -0,0 +1 @@ +The gVisor logo files are licensed under CC BY-SA 4.0 (Creative Commons Attribution-ShareAlike 4.0 International). diff --git a/website/content/roadmap.md b/g3doc/roadmap.md old mode 100755 new mode 100644 similarity index 93% rename from website/content/roadmap.md rename to g3doc/roadmap.md index fa12bee4b..86bb11c3b --- a/website/content/roadmap.md +++ b/g3doc/roadmap.md @@ -1,10 +1,4 @@ ---- -title: Roadmap -permalink: /roadmap/ -layout: docs -category: Project -weight: 10 ---- +# Roadmap gVisor [GitHub Issues][issues] serve as the source-of-truth for most work in flight. Specific performance and compatibility issues are generally tracked @@ -43,7 +37,7 @@ Most gVisor work is focused on four areas. Releases are available on [GitHub][releases]. As a convenience, binary packages are also published. Instructions for their use -are available via the [Installation instructions](/docs/user_guide/install/). +are available via the [Installation instructions](./user_guide/install.md). [issues]: https://github.com/google/gvisor/issues [milestones]: https://github.com/google/gvisor/milestones diff --git a/g3doc/user_guide/BUILD b/g3doc/user_guide/BUILD new file mode 100644 index 000000000..5568e1ba4 --- /dev/null +++ b/g3doc/user_guide/BUILD @@ -0,0 +1,70 @@ +load("//website:defs.bzl", "doc") + +package( + default_visibility = ["//website:__pkg__"], + licenses = ["notice"], +) + +doc( + name = "compatibility", + src = "compatibility.md", + category = "Compatibility", + permalink = "/docs/user_guide/compatibility/", + weight = "0", +) + +doc( + name = "checkpoint_restore", + src = "checkpoint_restore.md", + category = "User Guide", + permalink = "/docs/user_guide/checkpoint_restore/", + weight = "60", +) + +doc( + name = "debugging", + src = "debugging.md", + category = "User Guide", + permalink = "/docs/user_guide/debugging/", + weight = "70", +) + +doc( + name = "FAQ", + src = "FAQ.md", + category = "User Guide", + permalink = "/docs/user_guide/FAQ/", + weight = "90", +) + +doc( + name = "filesystem", + src = "filesystem.md", + category = "User Guide", + permalink = "/docs/user_guide/filesystem/", + weight = "40", +) + +doc( + name = "networking", + src = "networking.md", + category = "User Guide", + permalink = "/docs/user_guide/networking/", + weight = "50", +) + +doc( + name = "install", + src = "install.md", + category = "User Guide", + permalink = "/docs/user_guide/install/", + weight = "10", +) + +doc( + name = "platforms", + src = "platforms.md", + category = "User Guide", + permalink = "/docs/user_guide/platforms/", + weight = "30", +) diff --git a/website/content/docs/user_guide/FAQ.md b/g3doc/user_guide/FAQ.md old mode 100755 new mode 100644 similarity index 97% rename from website/content/docs/user_guide/FAQ.md rename to g3doc/user_guide/FAQ.md index 951192495..a84ac3c48 --- a/website/content/docs/user_guide/FAQ.md +++ b/g3doc/user_guide/FAQ.md @@ -1,10 +1,4 @@ ---- -title: "FAQ" -permalink: /docs/user_guide/FAQ/ -layout: docs -category: User Guide -weight: 90 ---- +# FAQ ### What operating systems are supported? {#supported-os} diff --git a/website/content/docs/user_guide/checkpoint_restore.md b/g3doc/user_guide/checkpoint_restore.md old mode 100755 new mode 100644 similarity index 96% rename from website/content/docs/user_guide/checkpoint_restore.md rename to g3doc/user_guide/checkpoint_restore.md index c7179b550..1814a2799 --- a/website/content/docs/user_guide/checkpoint_restore.md +++ b/g3doc/user_guide/checkpoint_restore.md @@ -1,10 +1,5 @@ ---- -title: "Checkpoint/Restore" -permalink: /docs/user_guide/checkpoint_restore/ -layout: docs -category: User Guide -weight: 60 ---- +# Checkpoint/Restore + gVisor has the ability to checkpoint a process, save its current state in a state file, and restore into a new container using the state file. diff --git a/website/content/docs/user_guide/compatibility/index.md b/g3doc/user_guide/compatibility.md old mode 100755 new mode 100644 similarity index 95% rename from website/content/docs/user_guide/compatibility/index.md rename to g3doc/user_guide/compatibility.md index 374a0992b..5fe9fc1e8 --- a/website/content/docs/user_guide/compatibility/index.md +++ b/g3doc/user_guide/compatibility.md @@ -1,10 +1,4 @@ ---- -title: Applications -layout: docs -category: Compatibility -weight: 0 -permalink: /docs/user_guide/compatibility/ ---- +# Applications gVisor implements a large portion of the Linux surface and while we strive to make it broadly compatible, there are (and always will be) unimplemented diff --git a/website/content/docs/user_guide/debugging.md b/g3doc/user_guide/debugging.md old mode 100755 new mode 100644 similarity index 97% rename from website/content/docs/user_guide/debugging.md rename to g3doc/user_guide/debugging.md index 9353ac907..a7c3138d7 --- a/website/content/docs/user_guide/debugging.md +++ b/g3doc/user_guide/debugging.md @@ -1,10 +1,4 @@ ---- -title: "Debugging" -permalink: /docs/user_guide/debugging/ -layout: docs -category: User Guide -weight: 70 ---- +# Debugging To enable debug and system call logging, add the `runtimeArgs` below to your [Docker](../quick_start/docker/) configuration (`/etc/docker/daemon.json`): diff --git a/website/content/docs/user_guide/filesystem.md b/g3doc/user_guide/filesystem.md old mode 100755 new mode 100644 similarity index 94% rename from website/content/docs/user_guide/filesystem.md rename to g3doc/user_guide/filesystem.md index a320b95f3..13bc07ab1 --- a/website/content/docs/user_guide/filesystem.md +++ b/g3doc/user_guide/filesystem.md @@ -1,10 +1,4 @@ ---- -title: "Filesystem" -permalink: /docs/user_guide/filesystem/ -layout: docs -category: User Guide -weight: 40 ---- +# Filesystem gVisor accesses the filesystem through a file proxy, called the Gofer. The gofer runs as a separate process, that is isolated from the sandbox. Gofer instances diff --git a/website/content/docs/user_guide/install.md b/g3doc/user_guide/install.md old mode 100755 new mode 100644 similarity index 96% rename from website/content/docs/user_guide/install.md rename to g3doc/user_guide/install.md index c5d4891bb..28422612e --- a/website/content/docs/user_guide/install.md +++ b/g3doc/user_guide/install.md @@ -1,12 +1,7 @@ ---- -title: "Installation" -permalink: /docs/user_guide/install/ -layout: docs -category: User Guide -weight: 10 ---- +# Installation -{% include required_linux.html %} +-> Note: gVisor supports only x86\_64 and requires Linux 4.14.77+ +-> ([older Linux](./networking.md#gso)). ## Versions diff --git a/website/content/docs/user_guide/networking.md b/g3doc/user_guide/networking.md old mode 100755 new mode 100644 similarity index 95% rename from website/content/docs/user_guide/networking.md rename to g3doc/user_guide/networking.md index 0971a38ff..26c76e8aa --- a/website/content/docs/user_guide/networking.md +++ b/g3doc/user_guide/networking.md @@ -1,10 +1,4 @@ ---- -title: "Networking" -permalink: /docs/user_guide/networking/ -layout: docs -category: User Guide -weight: 50 ---- +# Networking gVisor implements its own network stack called [netstack][netstack]. All aspects of the network stack are handled inside the Sentry — including TCP connection diff --git a/website/content/docs/user_guide/platforms.md b/g3doc/user_guide/platforms.md old mode 100755 new mode 100644 similarity index 96% rename from website/content/docs/user_guide/platforms.md rename to g3doc/user_guide/platforms.md index b32386bc9..fb48db34f --- a/website/content/docs/user_guide/platforms.md +++ b/g3doc/user_guide/platforms.md @@ -1,10 +1,4 @@ ---- -title: "Platforms (KVM)" -permalink: /docs/user_guide/platforms/ -layout: docs -category: User Guide -weight: 30 ---- +# Platforms (KVM) This document will help you set up your system to use a different gVisor platform. diff --git a/g3doc/user_guide/quick_start/BUILD b/g3doc/user_guide/quick_start/BUILD new file mode 100644 index 000000000..63f17f9cb --- /dev/null +++ b/g3doc/user_guide/quick_start/BUILD @@ -0,0 +1,33 @@ +load("//website:defs.bzl", "doc") + +package( + default_visibility = ["//website:__pkg__"], + licenses = ["notice"], +) + +doc( + name = "docker", + src = "docker.md", + category = "User Guide", + permalink = "/docs/user_guide/quick_start/docker/", + subcategory = "Quick Start", + weight = "11", +) + +doc( + name = "oci", + src = "oci.md", + category = "User Guide", + permalink = "/docs/user_guide/quick_start/oci/", + subcategory = "Quick Start", + weight = "12", +) + +doc( + name = "kubernetes", + src = "kubernetes.md", + category = "User Guide", + permalink = "/docs/user_guide/quick_start/kubernetes/", + subcategory = "Quick Start", + weight = "13", +) diff --git a/website/content/docs/user_guide/quick_start/docker.md b/g3doc/user_guide/quick_start/docker.md old mode 100755 new mode 100644 similarity index 94% rename from website/content/docs/user_guide/quick_start/docker.md rename to g3doc/user_guide/quick_start/docker.md index 4afeb3e2f..7dfc3d4b7 --- a/website/content/docs/user_guide/quick_start/docker.md +++ b/g3doc/user_guide/quick_start/docker.md @@ -1,11 +1,4 @@ ---- -title: "Docker Quick Start" -permalink: /docs/user_guide/quick_start/docker/ -layout: docs -category: User Guide -subcategory: Quick Start -weight: 15 ---- +# Docker > Note: This guide requires Docker version 17.09.0 or greater. Refer to the > [Docker documentation][docker] for how to install it. diff --git a/website/content/docs/user_guide/quick_start/kubernetes.md b/g3doc/user_guide/quick_start/kubernetes.md old mode 100755 new mode 100644 similarity index 91% rename from website/content/docs/user_guide/quick_start/kubernetes.md rename to g3doc/user_guide/quick_start/kubernetes.md index 689305082..237b3c17f --- a/website/content/docs/user_guide/quick_start/kubernetes.md +++ b/g3doc/user_guide/quick_start/kubernetes.md @@ -1,11 +1,4 @@ ---- -title: "Kubernetes" -permalink: /docs/user_guide/quick_start/kubernetes/ -layout: docs -category: User Guide -subcategory: Quick Start -weight: 17 ---- +# Kubernetes gVisor can be used to run Kubernetes pods and has several integration points with Kubernetes. diff --git a/website/content/docs/user_guide/quick_start/oci.md b/g3doc/user_guide/quick_start/oci.md old mode 100755 new mode 100644 similarity index 88% rename from website/content/docs/user_guide/quick_start/oci.md rename to g3doc/user_guide/quick_start/oci.md index 62e49e409..271ed24ce --- a/website/content/docs/user_guide/quick_start/oci.md +++ b/g3doc/user_guide/quick_start/oci.md @@ -1,11 +1,4 @@ ---- -title: "OCI Quick Start" -permalink: /docs/user_guide/quick_start/oci/ -layout: docs -category: User Guide -subcategory: Quick Start -weight: 19 ---- +# OCI This guide will quickly get you started running your first gVisor sandbox container using the runtime directly with the default platform. diff --git a/g3doc/user_guide/tutorials/BUILD b/g3doc/user_guide/tutorials/BUILD new file mode 100644 index 000000000..caae98623 --- /dev/null +++ b/g3doc/user_guide/tutorials/BUILD @@ -0,0 +1,37 @@ +load("//website:defs.bzl", "doc") + +package( + default_visibility = ["//website:__pkg__"], + licenses = ["notice"], +) + +doc( + name = "docker", + src = "docker.md", + category = "User Guide", + permalink = "/docs/tutorials/docker/", + subcategory = "Tutorials", + weight = "21", +) + +doc( + name = "cni", + src = "cni.md", + category = "User Guide", + permalink = "/docs/tutorials/cni/", + subcategory = "Tutorials", + weight = "22", +) + +doc( + name = "kubernetes", + src = "kubernetes.md", + category = "User Guide", + data = [ + "add-node-pool.png", + "node-pool-button.png", + ], + permalink = "/docs/tutorials/kubernetes/", + subcategory = "Tutorials", + weight = "33", +) diff --git a/website/content/docs/tutorials/add-node-pool.png b/g3doc/user_guide/tutorials/add-node-pool.png old mode 100755 new mode 100644 similarity index 100% rename from website/content/docs/tutorials/add-node-pool.png rename to g3doc/user_guide/tutorials/add-node-pool.png diff --git a/website/content/docs/tutorials/cni.md b/g3doc/user_guide/tutorials/cni.md similarity index 97% rename from website/content/docs/tutorials/cni.md rename to g3doc/user_guide/tutorials/cni.md index 28d58c946..6546f2737 100644 --- a/website/content/docs/tutorials/cni.md +++ b/g3doc/user_guide/tutorials/cni.md @@ -1,11 +1,4 @@ ---- -title: "Using CNI" -permalink: /docs/tutorials/cni/ -layout: docs -category: User Guide -subcategory: Tutorials -weight: 12 ---- +# Using CNI This tutorial will show you how to set up networking for a gVisor sandbox using the [Container Networking Interface (CNI)](https://github.com/containernetworking/cni). diff --git a/website/content/docs/tutorials/docker.md b/g3doc/user_guide/tutorials/docker.md old mode 100755 new mode 100644 similarity index 93% rename from website/content/docs/tutorials/docker.md rename to g3doc/user_guide/tutorials/docker.md index ddccbccd6..514af8489 --- a/website/content/docs/tutorials/docker.md +++ b/g3doc/user_guide/tutorials/docker.md @@ -1,11 +1,4 @@ ---- -title: "WordPress with Docker" -permalink: /docs/tutorials/docker/ -layout: docs -category: User Guide -subcategory: Tutorials -weight: 25 ---- +# WorkPress with Docker This page shows you how to deploy a sample [WordPress][wordpress] site using [Docker][docker]. diff --git a/website/content/docs/tutorials/kubernetes.md b/g3doc/user_guide/tutorials/kubernetes.md old mode 100755 new mode 100644 similarity index 95% rename from website/content/docs/tutorials/kubernetes.md rename to g3doc/user_guide/tutorials/kubernetes.md index a5383cede..a686c1982 --- a/website/content/docs/tutorials/kubernetes.md +++ b/g3doc/user_guide/tutorials/kubernetes.md @@ -1,11 +1,4 @@ ---- -title: "WordPress with Kubernetes" -permalink: /docs/tutorials/kubernetes/ -layout: docs -category: User Guide -subcategory: Tutorials -weight: 28 ---- +# WordPress with Kubernetes This page shows you how to deploy a sample [WordPress][wordpress] site using [GKE Sandbox][gke-sandbox]. @@ -30,12 +23,12 @@ gcloud beta container node-pools create sandbox-pool --cluster=${CLUSTER_NAME} - If you prefer to use the console, select your cluster and select the **ADD NODE POOL** button: -![+ ADD NODE POOL](/docs/tutorials/node-pool-button.png) +![+ ADD NODE POOL](./node-pool-button.png) Then select the **Image type** with **Containerd** and select **Enable sandbox with gVisor** option. Select other options as you like: -![+ NODE POOL](/docs/tutorials/add-node-pool.png) +![+ NODE POOL](./add-node-pool.png) ### Check that gVisor is enabled diff --git a/website/content/docs/tutorials/node-pool-button.png b/g3doc/user_guide/tutorials/node-pool-button.png old mode 100755 new mode 100644 similarity index 100% rename from website/content/docs/tutorials/node-pool-button.png rename to g3doc/user_guide/tutorials/node-pool-button.png diff --git a/images/default/Dockerfile b/images/default/Dockerfile index 2d0bb5ba5..397082b02 100644 --- a/images/default/Dockerfile +++ b/images/default/Dockerfile @@ -1,11 +1,16 @@ FROM fedora:31 +# Install bazel. RUN dnf install -y dnf-plugins-core && dnf copr enable -y vbatts/bazel RUN dnf install -y git gcc make golang gcc-c++ glibc-devel python3 which python3-pip python3-devel libffi-devel openssl-devel pkg-config glibc-static libstdc++-static patch RUN pip install pycparser RUN dnf install -y bazel3 +# Install gcloud. RUN curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-289.0.0-linux-x86_64.tar.gz | \ tar zxvf - google-cloud-sdk && \ google-cloud-sdk/install.sh && \ ln -s /google-cloud-sdk/bin/gcloud /usr/bin/gcloud +# Install Docker client for the website build. +RUN dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo +RUN dnf install -y docker-ce-cli WORKDIR /workspace ENTRYPOINT ["/usr/bin/bazel"] diff --git a/images/jekyll/Dockerfile b/images/jekyll/Dockerfile new file mode 100644 index 000000000..d0ec7f933 --- /dev/null +++ b/images/jekyll/Dockerfile @@ -0,0 +1,11 @@ +FROM jekyll/jekyll:4.0.0 +USER root +RUN gem install \ + html-proofer:3.10.2 \ + nokogiri:1.10.1 \ + jekyll-autoprefixer:1.0.2 \ + jekyll-inline-svg:1.1.4 \ + jekyll-paginate:1.1.0 \ + kramdown-parser-gfm:1.1.0 \ + jekyll-relative-links:0.6.1 +CMD ["/usr/gem/gems/jekyll-4.0.0/exe/jekyll", "build", "-t", "-s", "/input", "-d", "/output"] diff --git a/tools/bazel.mk b/tools/bazel.mk index 45fbbecca..a2ded7846 100644 --- a/tools/bazel.mk +++ b/tools/bazel.mk @@ -34,6 +34,14 @@ FULL_DOCKER_RUN_OPTIONS := $(DOCKER_RUN_OPTIONS) FULL_DOCKER_RUN_OPTIONS += -v "$(BAZEL_CACHE):$(BAZEL_CACHE)" FULL_DOCKER_RUN_OPTIONS += -v "$(GCLOUD_CONFIG):$(GCLOUD_CONFIG)" FULL_DOCKER_RUN_OPTIONS += -v "$(DOCKER_SOCKET):$(DOCKER_SOCKET)" +DOCKER_GROUP := $(shell stat -c '%g' $(DOCKER_SOCKET)) +ifneq ($(GID),$(DOCKER_GROUP)) +USERADD_OPTIONS := --groups $(DOCKER_GROUP) +DOCKER_GROUP_OPTIONS := --group-add $(DOCKER_GROUP) +else +USERADD_OPTIONS := +DOCKER_GROUP_OPTIONS := +endif ## ## Bazel helpers. @@ -51,7 +59,7 @@ FULL_DOCKER_RUN_OPTIONS += -v "$(DOCKER_SOCKET):$(DOCKER_SOCKET)" bazel-server-start: load-default ## Starts the bazel server. docker run -d --rm \ --name $(DOCKER_NAME) \ - --user 0:0 \ + --user 0:0 $(DOCKER_GROUP_OPTIONS) \ -v "$(CURDIR):$(CURDIR)" \ --workdir "$(CURDIR)" \ --tmpfs /tmp:rw,exec \ @@ -59,7 +67,7 @@ bazel-server-start: load-default ## Starts the bazel server. $(FULL_DOCKER_RUN_OPTIONS) \ gvisor.dev/images/default \ sh -c "groupadd --gid $(GID) --non-unique $(USER) && \ - useradd --uid $(UID) --non-unique --no-create-home --gid $(GID) -d $(HOME) $(USER) && \ + useradd --uid $(UID) --non-unique --no-create-home --gid $(GID) $(USERADD_OPTIONS) -d $(HOME) $(USER) && \ bazel version && \ while :; do sleep 3600; done" @while :; do if docker logs $(DOCKER_NAME) 2>/dev/null | grep "Build label:" >/dev/null; then break; fi; sleep 1; done diff --git a/website/.gitignore b/website/.gitignore deleted file mode 100644 index 111c9261f..000000000 --- a/website/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -_site -node_modules -content/docs/user_guide/compatibility/linux/ -content/.jekyll-cache/ -syscalls.json -.sass-cache/ diff --git a/website/BUILD b/website/BUILD new file mode 100644 index 000000000..8121d81a7 --- /dev/null +++ b/website/BUILD @@ -0,0 +1,158 @@ +load("//tools:defs.bzl", "go_binary", "pkg_tar") +load("//website:defs.bzl", "docs") + +package(licenses = ["notice"]) + +# website is the full container image. Note that this actually just collects +# other dependendcies and runs Docker locally to import and tag the image. +sh_binary( + name = "website", + srcs = ["import.sh"], + data = [":files"], + tags = [ + "local", + "manual", + ], +) + +# files is the full file system of the generated container. +# +# It must collect the all tarballs (produced by the rules below), and run it +# through the Dockerfile to generate the site. Note that this checks all links, +# and therefore requires all static content to be present as well. +# +# Note that this rule violates most aspects of hermetic builds. However, this +# works much more reliably than depending on the container_image rules from +# bazel itself, which are convoluted and seem to have a hard time even finding +# the toolchain. +genrule( + name = "files", + srcs = [ + ":config", + ":docs", + ":posts", + ":static", + ":syscallmd", + "//website/cmd/server", + ], + outs = ["files.tgz"], + cmd = "set -x; " + + "rm -rf $(@D)/input && mkdir -p $(@D)/input && " + + "rm -rf $(@D)/output && mkdir -p $(@D)/output/_site && " + + "tar -xf $(location :config) -C $(@D)/input && " + + "tar -xf $(location :docs) -C $(@D)/input && " + + "tar -xf $(location :posts) -C $(@D)/input && " + + "tar -xf $(location :syscallmd) -C $(@D)/input && " + + "find $(@D)/input -type f -exec chmod u+rw {} \\; && " + + "docker run -i --user $$(id -u):$$(id -g) " + + "-v $$(readlink -m $(@D)/input):/input " + + "-v $$(readlink -m $(@D)/output/_site):/output " + + "gvisor.dev/images/jekyll && " + + "tar -xf $(location :static) -C $(@D)/output/_site && " + + "docker run -i --user $$(id -u):$$(id -g) " + + "-v $$(readlink -m $(@D)/output/_site):/output " + + "gvisor.dev/images/jekyll " + + "/usr/gem/bin/htmlproofer " + + "--disable-external " + + "--check-html " + + "/output && " + + "cp $(location //website/cmd/server) $(@D)/output/server && " + + "tar -zcf $@ -C $(@D)/output . && " + + "rm -rf $(@D)/input $(@D)/output", + tags = [ + "local", + "manual", + "nosandbox", + ], +) + +# static are the purely static parts of the site. These are effectively copied +# in after jekyll generates all the dynamic content. +pkg_tar( + name = "static", + srcs = glob([ + "archive.key", + "performance/**", + ]), + strip_prefix = "./", +) + +# config is "mostly" static content. These are parts of the site that are +# present when jekyll runs, but are not dynamically generated. +pkg_tar( + name = "config", + srcs = glob([ + "assets/**", + "blog/*.html", + "*.yml", + "css/**", + "index.md", + "_includes/**", + "_layouts/**", + "_plugins/**", + "_sass/**", + ]), + strip_prefix = "./", +) + +# docs is the dynamic content of the site. +docs( + name = "docs", + deps = [ + "//:code_of_conduct", + "//:contributing", + "//:governance", + "//:security", + "//g3doc:community", + "//g3doc:index", + "//g3doc:roadmap", + "//g3doc/architecture_guide:index", + "//g3doc/architecture_guide:performance", + "//g3doc/architecture_guide:platforms", + "//g3doc/architecture_guide:resources", + "//g3doc/architecture_guide:security", + "//g3doc/user_guide:FAQ", + "//g3doc/user_guide:checkpoint_restore", + "//g3doc/user_guide:compatibility", + "//g3doc/user_guide:debugging", + "//g3doc/user_guide:filesystem", + "//g3doc/user_guide:install", + "//g3doc/user_guide:networking", + "//g3doc/user_guide:platforms", + "//g3doc/user_guide/quick_start:docker", + "//g3doc/user_guide/quick_start:kubernetes", + "//g3doc/user_guide/quick_start:oci", + "//g3doc/user_guide/tutorials:cni", + "//g3doc/user_guide/tutorials:docker", + "//g3doc/user_guide/tutorials:kubernetes", + ], +) + +# posts are moved to the _posts directory. +pkg_tar( + name = "posts", + srcs = glob([ + "blog/*.md", + ]), + package_dir = "_posts", +) + +# Generate JSON for system call tables +genrule( + name = "syscalljson", + outs = ["syscalls.json"], + cmd = "$(location //runsc) -- help syscalls -format json -filename $@", + tools = ["//runsc"], +) + +# Generate markdown from the json dump. +genrule( + name = "syscallmd", + srcs = [":syscalljson"], + outs = ["syscallsmd"], + cmd = "mkdir $(@D)/_tmp && \ + $(location //website/cmd/generate-syscall-docs) -in $< -out $(@D)/_tmp && \ + tar -C $(@D)/_tmp -czf $@ . && \ + rm -rf $(@D)/_tmp", + tools = ["//website/cmd/generate-syscall-docs"], +) diff --git a/website/Dockerfile b/website/Dockerfile deleted file mode 100644 index 0451c554e..000000000 --- a/website/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Build the system call doc generator. -FROM gcr.io/cloud-builders/go as syscalls -WORKDIR /src -COPY go.mod go.sum /src/ -COPY cmd/generate-syscall-docs /src/cmd/generate-syscall-docs -RUN CGO_ENABLED=0 go build -o /bin/generate-syscall-docs gvisor.dev/website/cmd/generate-syscall-docs - -# Generate the static site. -FROM jekyll/jekyll as jekyll -USER root -WORKDIR /site -RUN gem install html-proofer:3.10.2 nokogiri:1.10.1 -RUN gem install jekyll-autoprefixer webrick jekyll-inline-svg -COPY --from=syscalls /bin/generate-syscall-docs /bin/generate-syscall-docs -CMD ["sh", "-c", "cat syscalls.json | /bin/generate-syscall-docs -out content/docs/user_guide/compatibility/ && jekyll build -t -s content -d _site && cp -a static/* _site && (cd _site && /usr/gem/bin/htmlproofer --disable-external --check-html .)"] diff --git a/website/Makefile b/website/Makefile deleted file mode 100644 index 342d1d5a5..000000000 --- a/website/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -build: content/.jekyll-cache - @bazel run //runsc -- help syscalls -format json -filename $(PWD)/syscalls.json - @docker build -t gvisor-website . - @docker run -v $$PWD:/work -w /work gcr.io/cloud-builders/npm ci - @$(MAKE) update -.PHONY: build - -content/.jekyll-cache: - @mkdir -p $@ && chmod a+rw $@ - -lint: - @docker run -v $$PWD:/work -w /work gcr.io/cloud-builders/npm run lint-md -.PHONY: lint - -update: lint - @sudo mkdir -p _site && sudo chmod a+rw _site - @find content -type f -exec chmod a+r {} \; && find content -type d -exec chmod a+rx {} \; - @docker run -v $$PWD:/site -w /site gvisor-website -.PHONY: build - -clean: - @sudo rm -rf _site node_modules syscalls.json -.PHONY: clean - -server: - @go run gvisor.dev/website/cmd/gvisor-website -.PHONY: server - -deploy: update - @docker run --entrypoint=gcloud gvisor-website app deploy app.yaml -.PHONY: deploy diff --git a/website/README.md b/website/README.md deleted file mode 100644 index 560302c1e..000000000 --- a/website/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# gVisor Website - -This repository holds the content for the gVisor website, including -documentation. - -## Requirements - -Building the website requires Docker. - -## Contributing to Documentation - -### Using Github - -You can use the "Edit this page" link on any documentation page to edit the page -content directly via GitHub and submit a pull request. This should generally be -done for relatively small changes. - -### Using Git - -You can submit pull requests by making changes in a Git branch. See more -information on GitHub pull requests -[here](https://help.github.com/en/articles/about-pull-requests). - -Documentation is located in the [content/docs/](content/docs/) directory. - -## Building - -You can build the site locally by running: - -``` -make build -``` - -Incremental changes can be generated using: - - -``` -make update -``` - -And the site can be served locally using: - -``` -make server -``` - -Access the site at `http://localhost:8080`. - -The above will build all parts of the site, including the serving components. diff --git a/website/content/_config.yml b/website/_config.yml old mode 100755 new mode 100644 similarity index 79% rename from website/content/_config.yml rename to website/_config.yml index b286d2996..bcbc94eda --- a/website/content/_config.yml +++ b/website/_config.yml @@ -4,12 +4,13 @@ kramdown: syntax_highlighter: rouge toc_levels: "2,3" highlighter: rouge -paginate: 10 +paginate: 5 paginate_path: "/blog/page:num/" plugins: - jekyll-paginate - jekyll-autoprefixer - jekyll-inline-svg + - jekyll-relative-links site_url: https://gvisor.dev svg: optimize: true @@ -18,6 +19,7 @@ defaults: path: "" values: layout: default +analytics: "UA-150193582-1" authors: jsprad: name: Jeremiah Spradlin @@ -25,3 +27,6 @@ authors: zkoopmans: name: Zach Koopmans email: zkoopmans@google.com + igudger: + name: Ian Gudger + email: igudger@google.com diff --git a/website/content/_includes/byline.html b/website/_includes/byline.html old mode 100755 new mode 100644 similarity index 100% rename from website/content/_includes/byline.html rename to website/_includes/byline.html diff --git a/website/content/_includes/footer-links.html b/website/_includes/footer-links.html old mode 100755 new mode 100644 similarity index 74% rename from website/content/_includes/footer-links.html rename to website/_includes/footer-links.html index c2a89931e..b6a9771ca --- a/website/content/_includes/footer-links.html +++ b/website/_includes/footer-links.html @@ -3,10 +3,10 @@

About

@@ -25,12 +25,13 @@
  • User Mailing List
  • Developer Mailing List
  • Gitter Chat
  • +
  • Blog
  • -

    © {{ 'now' | date: "%Y" }} Google LLC

    +

    © {{ 'now' | date: "%Y" }} The gVisor Authors

    diff --git a/website/content/_includes/footer.html b/website/_includes/footer.html old mode 100755 new mode 100644 similarity index 84% rename from website/content/_includes/footer.html rename to website/_includes/footer.html index 3890af067..9946fc592 --- a/website/content/_includes/footer.html +++ b/website/_includes/footer.html @@ -6,6 +6,18 @@ +{% if site.analytics %} + + +{% endif %} +