|
1 |
| -# sysboxd-external |
2 |
| -Sysboxd external repository |
| 1 | +Nestybox Sysboxd |
| 2 | +================ |
| 3 | + |
| 4 | +## About Nestybox |
| 5 | + |
| 6 | +Nestybox is re-imagining server virtualization. |
| 7 | + |
| 8 | +We are developing software solutions that improve efficiency, |
| 9 | +performance, portability, and security over current Linux container |
| 10 | +and server virtualization technologies. |
| 11 | + |
| 12 | +## About Sysboxd |
| 13 | + |
| 14 | +Sysboxd is software that installs on a Linux host and integrates with Docker, |
| 15 | +enabling Docker to create **system containers**. See [here](docs/system-containers.md) |
| 16 | +for a description of what a system container is and the use cases |
| 17 | +we envision for them. |
| 18 | + |
| 19 | +Users do not normally interact with Sysboxd directly. Instead, users |
| 20 | +create system containers with Docker. See [Usage](#usage) below for more info. |
| 21 | + |
| 22 | +## Features |
| 23 | + |
| 24 | +**NOTE**: It's early days for Nestybox, so our system containers |
| 25 | +support a reduced set of features and use-cases at this time. |
| 26 | + |
| 27 | +Below is a list of features currently supported by sysboxd. Please |
| 28 | +see our [Roadmap](#roadmap) for a list of features we are working on. |
| 29 | + |
| 30 | +### Deployment |
| 31 | + |
| 32 | +* Supports deployment of system containers with Docker. |
| 33 | + |
| 34 | +* System containers can run concurrently with regular Docker |
| 35 | + containers, without conflict. |
| 36 | + |
| 37 | +### System Container Software |
| 38 | + |
| 39 | +* Supports running Docker inside the system container. |
| 40 | + |
| 41 | + - Cleanly & securely, without using privileged containers or |
| 42 | + bind-mounting the host's Docker socket into the container. |
| 43 | + |
| 44 | + - This is useful for testing & CI/CD use cases. |
| 45 | + |
| 46 | +### Security & Isolation |
| 47 | + |
| 48 | +* Strong system container isolation |
| 49 | + |
| 50 | + - System containers use the Linux user namespace and exclusive |
| 51 | + user-ID and group-ID mappings for increased container-to-host and |
| 52 | + container-to-container isolation. |
| 53 | + |
| 54 | +* Exposes a partially virtualized procfs (`/proc`) to the container. |
| 55 | + |
| 56 | + - This makes the container more closely resemble a real host. |
| 57 | + |
| 58 | + - Prevents processes within the container from changing global kernel |
| 59 | + settings via `/proc`. |
| 60 | + |
| 61 | +## Supported Linux Distros |
| 62 | + |
| 63 | +* Ubuntu 19.04 "Disco" |
| 64 | +* Ubuntu 18.04 "Bionic" (kernel upgrade required; see [Host Requirements](#host-requirements) below) |
| 65 | + |
| 66 | +The supported distros increase when Docker is configured with |
| 67 | +[userns-remap](docs/usage.md#interaction-with-docker-userns-remap) enabled. In this case, the supported distros are: |
| 68 | + |
| 69 | +* Ubuntu 19.04 "Disco" |
| 70 | +* Ubuntu 18.10 "Cosmic" |
| 71 | +* Ubuntu 18.04 "Bionic" |
| 72 | + |
| 73 | +We plan to add support for more distros in the future. |
| 74 | + |
| 75 | +## Host Requirements |
| 76 | + |
| 77 | +The Linux host on which sysboxd runs must meet the following requirements: |
| 78 | + |
| 79 | +1) Systemd must be running as the system's process-manager. |
| 80 | + |
| 81 | +2) Docker must be installed on the host machine. |
| 82 | + |
| 83 | +3) The host's kernel must be configured to allow unprivileged users |
| 84 | + to create namespaces. For Ubuntu: |
| 85 | + |
| 86 | + ``` |
| 87 | + sudo sh -c "echo 1 > /proc/sys/kernel/unprivileged_userns_clone" |
| 88 | + ``` |
| 89 | + |
| 90 | + **Note:** This instruction will be *automatically* executed by the |
| 91 | + Sysboxd package installer, so there is no need for the user to |
| 92 | + manually type it. |
| 93 | + |
| 94 | +4) Sysboxd stores some internal state in `/var/lib/sysboxd`. This directory |
| 95 | + must be on one of the following filesystems: |
| 96 | + |
| 97 | + * ext4 |
| 98 | + * btrfs |
| 99 | + |
| 100 | + The same requirement applies to the `/var/lib/docker` directory. |
| 101 | + |
| 102 | + This is normally the case for vanilla Ubuntu installations. |
| 103 | + |
| 104 | +5) If the host runs Ubuntu-Bionic, you'll need to update the Linux kernel to |
| 105 | + 5.X+ (unless you enable docker [userns-remap](docs/usage.md#interaction-with-docker-userns-remap)). |
| 106 | + |
| 107 | + Note that you must use the Ubuntu 5.X+ kernel, **not** the Linux |
| 108 | + upstream kernel (because Ubuntu carries patches that are not |
| 109 | + present in the upstream kernel). The easiest way to do this is to |
| 110 | + use Ubuntu's [LTS-enablement](https://wiki.ubuntu.com/Kernel/LTSEnablementStack) package: |
| 111 | + |
| 112 | + ``` |
| 113 | + $ sudo apt-get update && sudo apt install --install-recommends linux-generic-hwe-18.04 -y |
| 114 | + ``` |
| 115 | + |
| 116 | +## Installation |
| 117 | + |
| 118 | +1) Download the latest package from the [release](https://github.com/nestybox/sysboxd-external/releases) page. |
| 119 | + |
| 120 | +2) Verify that the checksum of the downloaded file fully matches the expected/published one: |
| 121 | + |
| 122 | +```bash |
| 123 | +$ sha256sum ~/sysboxd_0.0.1-0~ubuntu-bionic_amd64.deb |
| 124 | +2a02898dc53b4751cf413464b977f5b296d9aac3c5b477e05272bfa881d69cfc /home/user/sysboxd_0.0.1-0~ubuntu-bionic_amd64.deb |
| 125 | +``` |
| 126 | + |
| 127 | +3) Install the Sysboxd package: |
| 128 | + |
| 129 | +```bash |
| 130 | +$ sudo dpkg -i sysboxd_0.0.1-0~ubuntu-bionic_amd64.deb |
| 131 | +``` |
| 132 | + |
| 133 | +In case you hit an error with missing dependencies, fix this with: |
| 134 | + |
| 135 | +```bash |
| 136 | +$ sudo apt-get install -f -y |
| 137 | +``` |
| 138 | + |
| 139 | +This will install the missing dependencies and automatically re-launch |
| 140 | +the Sysboxd installation process. |
| 141 | + |
| 142 | + |
| 143 | +4) Verify that Sysboxd's systemd units have been properly installed, and |
| 144 | + associated daemons are properly running: |
| 145 | + |
| 146 | +``` |
| 147 | +$ systemctl list-units -t service --all | grep sysbox |
| 148 | +sysbox-fs.service loaded active running sysbox-fs component |
| 149 | +sysbox-mgr.service loaded active running sysbox-mgr component |
| 150 | +sysboxd.service loaded active exited Sysboxd General Service |
| 151 | +``` |
| 152 | + |
| 153 | +The sysboxd.service is ephemeral (it exits once it launches the other sysboxd services). |
| 154 | + |
| 155 | +If you are curious on what the other Sysboxd services are, refer to the [Sysboxd design document](docs/design.md). |
| 156 | + |
| 157 | +If you hit problems during installation, see the [Troubleshooting document](docs/troubleshoot.md). |
| 158 | + |
| 159 | +## Usage |
| 160 | + |
| 161 | +To launch a system container with Docker, point Docker to the Sysboxd container |
| 162 | +runtime, using the `--runtime=sysbox-runc` option: |
| 163 | + |
| 164 | +```bash |
| 165 | +$ docker run --runtime=sysbox-runc --rm -it --hostname my_cont debian:latest |
| 166 | +root@my_cont:/# |
| 167 | +``` |
| 168 | + |
| 169 | +If you omit the `--runtime` option, Docker will use its default `runc` |
| 170 | +runtime to launch regular application containers (rather than system |
| 171 | +containers). |
| 172 | + |
| 173 | +It's perfectly fine to run system containers along side with regular |
| 174 | +Docker application containers on the host at the same time; they won't |
| 175 | +conflict. |
| 176 | + |
| 177 | +Refer to the [Sysboxd User's Guide](docs/usage.md) for other ways to |
| 178 | +run system containers with Sysboxd. |
| 179 | + |
| 180 | +If you hit problems with the instructions above, see the |
| 181 | +[Troubleshooting document](docs/troubleshoot.md). |
| 182 | + |
| 183 | +## Software supported inside the System Container |
| 184 | + |
| 185 | +A system container is logically a super-set of a regular Docker |
| 186 | +application container, and thus should be able to run any application |
| 187 | +that runs in a regular Docker container. In addition, it runs |
| 188 | +system-level software that does not run in a regular Docker container. |
| 189 | + |
| 190 | +For system-level software, we currently only support running Docker |
| 191 | +inside the system container. See [here](docs/usage.md#running-software-inside-the-system-container) |
| 192 | +for more info on this. |
| 193 | + |
| 194 | +## Integration with Container Managers |
| 195 | + |
| 196 | +Sysboxd is designed to work with Docker / containerd. |
| 197 | + |
| 198 | +We don't yet support other container managers (e.g., cri-o). |
| 199 | + |
| 200 | +## Design |
| 201 | + |
| 202 | +For more detailed info about Sysboxd's design, refer to the |
| 203 | +[Sysboxd design document](docs/design.md). |
| 204 | + |
| 205 | +## OCI Compatibility |
| 206 | + |
| 207 | +Sysboxd is a fork of the [OCI runc](https://github.com/opencontainers/runc). It is mostly |
| 208 | +(but not 100%) compatible with the OCI runtime specification. See [here](docs/design.md#oci-compatibility) |
| 209 | +for a list of incompatibilities. |
| 210 | + |
| 211 | +We believe these incompatibilities won't negatively affect users of |
| 212 | +Sysboxd and should mostly be transparent to them. |
| 213 | + |
| 214 | +## Production Readiness |
| 215 | + |
| 216 | +Sysboxd is still in Beta. It's stable, but not production ready yet. |
| 217 | + |
| 218 | +## Troubleshooting |
| 219 | + |
| 220 | +Refer to the [Troubleshooting document](docs/troubleshoot.md). |
| 221 | + |
| 222 | +## Issues |
| 223 | + |
| 224 | +We apologize for any problems in the product or documentation, and we appreciate |
| 225 | +customers filing issues that help us improve them. |
| 226 | + |
| 227 | +To file issues with Sysboxd (e.g., bugs, feature requests, documentation changes, etc.), |
| 228 | +please refer to the [issue guidelines](docs/issue-guidelines.md) document. |
| 229 | + |
| 230 | +## Roadmap |
| 231 | + |
| 232 | +The following is a list of features in the Sysboxd roadmap. |
| 233 | + |
| 234 | +We list these here so that our users can get a better idea of where we |
| 235 | +are going and can give us feedback on which of these they like best |
| 236 | +(or least). |
| 237 | + |
| 238 | +Nestybox reserves the right to change these based on business |
| 239 | +priorities. |
| 240 | + |
| 241 | +Here is the list: |
| 242 | + |
| 243 | +* Support for more Linux distros. |
| 244 | + |
| 245 | +* Support for Docker volume plugins for use with system containers. |
| 246 | + |
| 247 | +* Support for other container managers (e.g., cri-o) |
| 248 | + |
| 249 | +* Running Kubernetes inside the system container |
| 250 | + |
| 251 | +* Running Systemd inside the system container |
| 252 | + |
| 253 | +* Running window managers (e.g., X) inside the system container (for GUI apps & desktops). |
| 254 | + |
| 255 | +* More virtualization of non-namespaced resources in procfs (`/proc/`). |
| 256 | + |
| 257 | +## Feedback |
| 258 | + |
| 259 | +We love feedback, as it helps us improve Sysboxd and set its future |
| 260 | +direction. |
| 261 | + |
| 262 | +We would much appreciate if you would take a couple of minutes to |
| 263 | +answer the following survey: |
| 264 | + |
| 265 | +https://www.surveymonkey.com/r/SH8HMGY |
| 266 | + |
| 267 | +## Uninstallation |
| 268 | + |
| 269 | +Prior to uninstalling Sysboxd, make sure all system containers are removed. |
| 270 | +There is a simple shell script to do this [here](scr/rm_all_syscont). |
| 271 | + |
| 272 | +1) Uninstall Sysboxd binaries: |
| 273 | + |
| 274 | +```bash |
| 275 | +$ sudo dpkg --remove sysboxd |
| 276 | +``` |
| 277 | + |
| 278 | +Alternatively, remove the above items plus all the associated |
| 279 | +configuration and systemd files (recommended): |
| 280 | + |
| 281 | +```bash |
| 282 | +$ sudo dpkg --purge sysboxd |
| 283 | +``` |
| 284 | + |
| 285 | +2) Unload the `nbox_shiftfs` module: |
| 286 | + |
| 287 | +```bash |
| 288 | +$ sudo rmmod nbox_shiftfs |
| 289 | +``` |
| 290 | + |
| 291 | +3) Finally remove the `sysboxd` user from the system: |
| 292 | + |
| 293 | +```bash |
| 294 | +$ sudo userdel sysboxd |
| 295 | +``` |
| 296 | + |
| 297 | +## Thank You! |
| 298 | + |
| 299 | +We thank you **very much** for using Sysboxd. We hope you find it useful. |
| 300 | + |
| 301 | +Your trust in us is very much appreciated. |
| 302 | + |
| 303 | +-- *The Nestybox Team* |
0 commit comments