{"id":21024897,"url":"https://github.com/nestybox/sysbox-flatcar-preview","last_synced_at":"2025-03-13T18:24:37.811Z","repository":{"id":117725402,"uuid":"382194731","full_name":"nestybox/sysbox-flatcar-preview","owner":"nestybox","description":"Preview repo for running Sysbox on Kinvolk's Flatcar OS.","archived":false,"fork":false,"pushed_at":"2021-09-29T07:52:36.000Z","size":31415,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T13:45:54.128Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nestybox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-02T01:07:18.000Z","updated_at":"2021-07-06T04:38:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa8f1437-308c-474a-b94b-c3313bf14fd3","html_url":"https://github.com/nestybox/sysbox-flatcar-preview","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestybox%2Fsysbox-flatcar-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestybox%2Fsysbox-flatcar-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestybox%2Fsysbox-flatcar-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestybox%2Fsysbox-flatcar-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nestybox","download_url":"https://codeload.github.com/nestybox/sysbox-flatcar-preview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243456651,"owners_count":20293907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T11:29:08.501Z","updated_at":"2025-03-13T18:24:37.784Z","avatar_url":"https://github.com/nestybox.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sysbox on Flatcar Preview Repo\n\nThis is a preview repository for running the\n[Sysbox](https://github.com/nestybox/sysbox) container runtime on [Kinvolk's Flatcar OS](https://kinvolk.io/flatcar-container-linux/).\n\nThe repo contains Sysbox binaries built specifically for Flatcar, as well as the\nContainer Linux configuration yaml needed to install Sysbox on Flatcar.\n\n**NOTE: This is a preview repo while Nestybox tests Sysbox on Flatcar. Once\ntesting completes, this repo will be removed and the information here will be\ntransferred to the main Sysbox repo.**\n\n## Contents\n\n*   [Why Sysbox on Flatcar?](#why-sysbox-on-flatcar)\n*   [Supported Flatcar Releases](#supported-flatcar-releases)\n*   [Installing Sysbox on Flatcar](#installing-sysbox-on-flatcar)\n*   [Sysbox Components](#sysbox-components)\n*   [Contact](#contact)\n*   [Thank You!](#thank-you)\n\n## Why Sysbox on Flatcar?\n\nFlatcar is a container-optimized Linux distro, meaning that the OS is designed\nto run workloads inside containers efficiently and securely.\n\nRunning Sysbox on Flatcar further increases container security and flexibility,\nas Sysbox enables containers deployed by Docker or Kubernetes to run with\nstronger isolation (Linux user-namespace, procfs and sysfs virtualization,\ninitial mount locking, etc.). In addition, Sysbox enables containers to run most\nworkloads that run in virtual machines (including systemd, Docker, and even\nKubernetes), thus enabling new powerful use cases for containers beyond\nmicroservice deployment.\n\n## Supported Flatcar Releases\n\n* 2765.2.6 (Oklo)\n\n## Installing Sysbox on Flatcar\n\nThe method of installation depends on whether Sysbox is installed on\na Docker host or a Kubernetes node.\n\n### Installing Sysbox on Flatcar Docker Hosts\n\nTo install Sysbox on a host machine (physical or VM) running Flatcar, simply use\nthis [Container Linux configuration file](config/config.yaml). This config\ninstalls the [Sysbox components](#sysbox-components) on the Flatcar\nhost.\n\n**NOTE**: Add to the config file any other configurations you need for the machine\n(e.g., users, ssh keys, etc.)\n\nFor example, the steps below deploy Sysbox on a Google Compute Engine (GCE)\nvirtual machine:\n\n1) Add the ssh authorized key to the [config.yaml](config/config.yaml):\n\n```yaml\npasswd:\n  users:\n    - name: core\n      ssh_authorized_keys:\n        - \"ssh-rsa AAAAB3NzaC1yc...\"\n```\n\n2) Convert the config to the Ignition format. This is done using the `ct` tool,\nas described [in this Kinvolk doc](https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/config-transpiler/):\n\n```console\n$ ct --platform=gce \u003c config.yaml \u003e config.ign\n```\n\n3) Provision the GCE VM and pass the `config.ign` generated in the prior step as \"user-data\".\n\n```console\n$ gcloud compute instances create flatcar-vm --image-project kinvolk-public --image-family flatcar-stable --zone us-central1-a --machine-type n2-standard-4 --metadata-from-file user-data=config.ign\nCreated [https://www.googleapis.com/compute/v1/projects/predictive-fx-309900/zones/us-central1-a/instances/flatcar-vm].\nNAME        ZONE           MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP    EXTERNAL_IP    STATUS\nflatcar-vm  us-central1-a  n2-standard-4               10.128.15.196  34.132.170.36  RUNNING\n```\n\nWhen the VM boots, Sysbox will already be installed and running. You can verify\nthis as follows:\n\n```console\ncore@flatcar-vm ~ $ systemctl status sysbox\n● sysbox.service - Sysbox container runtime\n     Loaded: loaded (/etc/systemd/system/sysbox.service; enabled; vendor preset: enabled)\n     Active: active (running) since Mon 2021-07-05 19:35:41 UTC; 3h 10min ago\n       Docs: https://github.com/nestybox/sysbox\n   Main PID: 1064 (sh)\n      Tasks: 2 (limit: 19154)\n     Memory: 704.0K\n     CGroup: /system.slice/sysbox.service\n             ├─1064 /bin/sh -c /opt/bin/sysbox/sysbox-runc --version \u0026\u0026 /opt/bin/sysbox/sysbox-mgr --version \u0026\u0026 /opt/bin/sysbox/sysbox-fs --version \u0026\u0026 /bin/sleep infinity\n             └─1084 /bin/sleep infinity\n```\n\nYou can now deploy containers with Docker + Sysbox as follows:\n\n```console\ncore@flatcar-vm ~ $ docker run --runtime=sysbox-runc -it --rm \u003csome-image\u003e\n```\n\nThis will create a container that is strongly secured and is capable of running\nmicroservices as well as full OS environments (similar to a VM, but with the\nefficiency and speed of containers).\n\nFor example, to deploy a \"VM-like\" container that runs Ubuntu Focal + systemd +\nDocker inside:\n\n```console\ncore@flatcar-vm ~ $ docker run --runtime=sysbox-runc -it --rm nestybox/ubuntu-focal-systemd-docker\n```\n\nPlease refer the [Sysbox Quickstart Guide](https://github.com/nestybox/sysbox/tree/master/docs/quickstart) and [Nestybox blog site](https://blog.nestybox.com/)\nfor may more usage examples.\n\n**NOTE:** If you exclude the `--runtime=sysbox-runc` flag, Docker will launch\ncontainers with it's default runtime (aka runc). You can have regular Docker\ncontainers live side-by-side and communicate with Docker + Sysbox containers\nwithout problem.\n\n### Installing Sysbox on Flatcar Kubernetes Nodes\n\nThough Sysbox supports [installation on K8s nodes](https://github.com/nestybox/sysbox/blob/master/docs/user-guide/install-k8s.md),\nthis is not yet supported on K8s nodes using Flatcar.\n\nIf you are interested in running Sysbox on Flatcar K8s nodes, please [contact us](#contact) and let us know.\n\n## Sysbox Components\n\nThe [config.yaml](config/config.yaml) performs the following configurations on a Flatcar host:\n\n* Places the Sysbox binaries in a directory called `/opt/bin/sysbox`. The binaries include:\n\n  - sysbox-mgr, sysbox-runc, sysbox-fs, the `shiftfs` module, and `fusermount`.\n\n* Loads the `shiftfs` module into the kernel.\n\n  - This module is present in Ubuntu kernels, but typically not present on other\n    distros. It brings multiple functional benefits, such as giving Sysbox the\n    ability to isolate containers with the Linux user-namespace without changes\n    in Docker's configuration. More on shiftfs [here](https://github.com/nestybox/sysbox/blob/master/docs/user-guide/design.md#ubuntu-shiftfs-module).\n\n* Configures some kernel sysctl parameters (the config.yaml has the details).\n\n* Installs and starts the Sysbox systemd units.\n\n* Configures Docker to learn about Sysbox and restarts Docker.\n\nThe result is that the host is fully configured to run Docker containers\nwith Sysbox.\n\n## Contact\n\nSlack: [Nestybox Slack Workspace][slack]\n\nEmail: contact@nestybox.com\n\nWe are available from Monday-Friday, 9am-5pm Pacific Time.\n\n## Thank You!\n\nWe thank you **very much** for using Sysbox on Flatcar! We hope you find it\ninteresting and that it helps you use containers in new and more secure and\npowerful ways.\n\n[slack]: https://nestybox-support.slack.com/join/shared_invite/enQtOTA0NDQwMTkzMjg2LTAxNGJjYTU2ZmJkYTZjNDMwNmM4Y2YxNzZiZGJlZDM4OTc1NGUzZDFiNTM4NzM1ZTA2NDE3NzQ1ODg1YzhmNDQ#/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestybox%2Fsysbox-flatcar-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnestybox%2Fsysbox-flatcar-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestybox%2Fsysbox-flatcar-preview/lists"}