Merge pull request #2425 from catherineluse/rancheros

Clarify K3s options
This commit is contained in:
Catherine Luse
2020-04-02 05:38:10 -07:00
committed by GitHub
58 changed files with 277 additions and 116 deletions
@@ -9,9 +9,13 @@ This page focuses on the options that can be used when you set up K3s for the fi
- [Installing K3s from the binary](#installing-k3s-from-the-binary)
- [Registration options for the K3s server](#registration-options-for-the-k3s-server)
- [Registration options for the K3s agent](#registration-options-for-the-k3s-agent)
- [How to Use Flags and Environment Variables](#how-to-use-flags-and-environment-variables)
For more advanced options, refer to [this page.]({{<baseurl>}}/k3s/latest/en/advanced)
> Throughout the K3s documentation, you will see some options that can be passed in as both command flags and environment variables. For help with passing in options, refer to [How to Use Flags and Environment Variables.](#how-to-use-flags-and-environment-variables)
# Installation Script Options
As mentioned in the [Quick-Start Guide]({{<baseurl>}}/k3s/latest/en/quick-start/), you can use the installation script available at https://get.k3s.io to install K3s as a service on systemd and openrc based systems.
@@ -23,58 +27,24 @@ curl -sfL https://get.k3s.io | sh -
When using this method to install K3s, the following environment variables can be used to configure the installation:
- `INSTALL_K3S_SKIP_DOWNLOAD`
| Environment Variable | Description |
|-----------------------------|---------------------------------------------|
| `INSTALL_K3S_SKIP_DOWNLOAD` | If set to true will not download K3s hash or binary. |
| `INSTALL_K3S_SYMLINK` | If set to 'skip' will not create symlinks, 'force' will overwrite, default will symlink if command does not exist in path. |
| `INSTALL_K3S_SKIP_START` | If set to true will not start K3s service. |
| `INSTALL_K3S_VERSION` | Version of K3s to download from github. Will attempt to download the latest version if not specified. |
| `INSTALL_K3S_BIN_DIR` | Directory to install K3s binary, links, and uninstall script to, or use `/usr/local/bin` as the default. |
| `INSTALL_K3S_BIN_DIR_READ_ONLY` | If set to true will not write files to `INSTALL_K3S_BIN_DIR`, forces setting `INSTALL_K3S_SKIP_DOWNLOAD=true`. |
| `INSTALL_K3S_SYSTEMD_DIR` | Directory to install systemd service and environment files to, or use `/etc/systemd/system` as the default. |
| `INSTALL_K3S_EXEC` | Command with flags to use for launching K3s in the service. If the command is not specified, it will default to "agent" if `K3S_URL` is set, or "server" if it is not set. For help, refer to [this example.](#example-a-install-k3s-exec) |
| `INSTALL_K3S_NAME` | Name of systemd service to create, will default from the K3s exec command if not specified. If specified the name will be prefixed with 'k3s-'. |
| `INSTALL_K3S_TYPE` | Type of systemd service to create, will default from the K3s exec command if not specified.
If set to true will not download K3s hash or binary.
Environment variables which begin with `K3S_` will be preserved for the systemd and openrc services to use.
- `INSTALL_K3S_SYMLINK`
If set to 'skip' will not create symlinks, 'force' will overwrite, default will symlink if command does not exist in path.
- `INSTALL_K3S_SKIP_START`
If set to true will not start K3s service.
- `INSTALL_K3S_VERSION`
Version of K3s to download from github. Will attempt to download the latest version if not specified.
- `INSTALL_K3S_BIN_DIR`
Directory to install K3s binary, links, and uninstall script to, or use `/usr/local/bin` as the default.
- `INSTALL_K3S_BIN_DIR_READ_ONLY`
If set to true will not write files to `INSTALL_K3S_BIN_DIR`, forces setting `INSTALL_K3S_SKIP_DOWNLOAD=true`.
- `INSTALL_K3S_SYSTEMD_DIR`
Directory to install systemd service and environment files to, or use `/etc/systemd/system` as the default.
- `INSTALL_K3S_EXEC`
Command with flags to use for launching K3s in the service. If the command is not specified, it will default to "agent" if `K3S_URL` is set or "server" if it is not set.
The final systemd command resolves to a combination of this environment variable and script args. To illustrate this, the following commands result in the same behavior of registering a server without flannel:
```sh
curl ... | INSTALL_K3S_EXEC="--no-flannel" sh -s -
curl ... | INSTALL_K3S_EXEC="server --no-flannel" sh -s -
curl ... | INSTALL_K3S_EXEC="server" sh -s - --no-flannel
curl ... | sh -s - server --no-flannel
curl ... | sh -s - --no-flannel
```
- `INSTALL_K3S_NAME`
Name of systemd service to create, will default from the K3s exec command if not specified. If specified the name will be prefixed with 'k3s-'.
- `INSTALL_K3S_TYPE`
Type of systemd service to create, will default from the K3s exec command if not specified.
Environment variables which begin with `K3S_` will be preserved for the systemd and openrc services to use. Setting `K3S_URL` without explicitly setting an exec command will default the command to "agent". When running the agent `K3S_TOKEN` must also be set.
Setting `K3S_URL` without explicitly setting an exec command will default the command to "agent".
When running the agent `K3S_TOKEN` must also be set.
# Installing K3s from the Binary
@@ -92,7 +62,10 @@ Command | Description
The `k3s server` and `k3s agent` commands have additional configuration options that can be viewed with <span class='nowrap'>`k3s server --help`</span> or <span class='nowrap'>`k3s agent --help`</span>. For convenience, that help text is presented here:
# Registration Options for the K3s Server
```
> If an option appears in brackets below, for example `[$K3S_TOKEN]`, it means that the option can be passed in as an environment variable of that name.
```bash
NAME:
k3s server - Run management server
@@ -160,7 +133,10 @@ OPTIONS:
```
# Registration Options for the K3s Agent
```
> If an option appears in brackets below, for example `[$K3S_URL]`, it means that the option can be passed in as an environment variable of that name.
```bash
NAME:
k3s agent - Run node agent
@@ -201,10 +177,41 @@ OPTIONS:
K3s agents can be configured with the options `--node-label` and `--node-taint` which adds a label and taint to the kubelet. The two options only add labels and/or taints at registration time, so they can only be added once and not changed after that again by running K3s commands.
Below is an example showing how to add labels and a taint:
```
```bash
--node-label foo=bar \
--node-label hello=world \
--node-taint key1=value1:NoExecute
```
If you want to change node labels and taints after node registration you should use `kubectl`. Refer to the official Kubernetes documentation for details on how to add [taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) and [node labels.](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/#add-a-label-to-a-node)
# How to Use Flags and Environment Variables
Throughout the K3s documentation, you will see some options that can be passed in as both command flags and environment variables. The below examples show how these options can be passed in both ways.
### Example A: K3S_KUBECONFIG_MODE
The option to allow writing to the kubeconfig file is useful for allowing a K3s cluster to be imported into Rancher. Below are two ways to pass in the option.
Using the flag `--write-kubeconfig-mode 644`:
```bash
$ curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644
```
Using the environment variable `K3S_KUBECONFIG_MODE`:
```bash
$ curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
```
### Example B: INSTALL_K3S_EXEC
If this command is not specified as a server or agent command, it will default to "agent" if `K3S_URL` is set, or "server" if it is not set.
The final systemd command resolves to a combination of this environment variable and script args. To illustrate this, the following commands result in the same behavior of registering a server without flannel:
```bash
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--no-flannel" sh -s -
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --no-flannel" sh -s -
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server" sh -s - --no-flannel
curl -sfL https://get.k3s.io | sh -s - server --no-flannel
curl -sfL https://get.k3s.io | sh -s - --no-flannel
```
+1 -1
View File
@@ -29,7 +29,7 @@ You can adjust memory requirements by custom building RancherOS, please refer to
### How RancherOS Works
Everything in RancherOS is a Docker container. We accomplish this by launching two instances of Docker. One is what we call **System Docker** and is the first process on the system. All other system services, like `ntpd`, `syslog`, and `console`, are running in Docker containers. System Docker replaces traditional init systems like `systemd` and is used to launch [additional system services](installation/system-services/adding-system-services/).
Everything in RancherOS is a Docker container. We accomplish this by launching two instances of Docker. One is what we call **System Docker** and is the first process on the system. All other system services, like `ntpd`, `syslog`, and `console`, are running in Docker containers. System Docker replaces traditional init systems like `systemd` and is used to launch [additional system services](installation/system-services/).
System Docker runs a special container called **Docker**, which is another Docker daemon responsible for managing all of the users containers. Any containers that you launch as a user from the console will run inside this Docker. This creates isolation from the System Docker containers and ensures that normal user commands dont impact system services.
+3 -3
View File
@@ -1,6 +1,6 @@
---
title: About
weight: 4
title: Additional Resources
weight: 200
---
## Developing
@@ -59,7 +59,7 @@ All of repositories are located within our main GitHub [page](https://github.com
[RancherOS Repo](https://github.com/rancher/os): This repo contains the bulk of the RancherOS code.
[RancherOS Services Repo](https://github.com/rancher/os-services): This repo is where any [system-services]({{<baseurl>}}/os/v1.x/en//installation/system-services/adding-system-services/) can be contributed.
[RancherOS Services Repo](https://github.com/rancher/os-services): This repo is where any [system-services]({{< baseurl >}}/os/v1.x/en//system-services/) can be contributed.
[RancherOS Images Repo](https://github.com/rancher/os-images): This repo is for the corresponding service images.
@@ -7,7 +7,7 @@ RancherOS can be used to launch [Rancher](/rancher/) and be used as the OS to ad
### Launching Agents using Cloud-Config
You can easily add hosts into Rancher by using [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config) to launch the rancher/agent container.
You can easily add hosts into Rancher by using [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config) to launch the rancher/agent container.
After Rancher is launched and host registration has been saved, you will be able to find use the custom option to add Rancher OS nodes.
@@ -1,6 +1,8 @@
---
title: Configuration
weight: 120
aliases:
- /os/v1.x/en/installation/configuration
---
There are two ways that RancherOS can be configured.
@@ -34,7 +36,7 @@ In our example above, we have our `#cloud-config` line to indicate it's a cloud-
### Manually Changing Configuration
To update RancherOS configuration after booting, the `ros config set <key> <value>` command can be used.
For more complicated settings, like the [sysctl settings]({{<baseurl>}}/os/v1.x/en/installation/configuration/sysctl/), you can also create a small YAML file and then run `sudo ros config merge -i <your yaml file>`.
For more complicated settings, like the [sysctl settings]({{< baseurl >}}/os/v1.x/en/configuration/sysctl/), you can also create a small YAML file and then run `sudo ros config merge -i <your yaml file>`.
#### Getting Values
@@ -1,6 +1,8 @@
---
title: Kernel boot parameters
weight: 133
aliases:
- /os/v1.x/en/installation/configuration/adding-kernel-parameters
---
RancherOS parses the Linux kernel boot cmdline to add any keys it understands to its configuration. This allows you to modify what cloud-init sources it will use on boot, to enable `rancher.debug` logging, or to almost any other configuration setting.
@@ -27,7 +29,7 @@ $ sudo system-docker run --rm -it -v /:/host alpine vi /host/boot/global.cfg
### During installation
If you want to set the extra kernel parameters when you are [Installing RancherOS to Disk]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/server/install-to-disk/) please use the `--append` parameter.
If you want to set the extra kernel parameters when you are [Installing RancherOS to Disk]({{< baseurl >}}/os/v1.x/en/installation/server/install-to-disk/) please use the `--append` parameter.
```bash
$ sudo ros install -d /dev/sda --append "rancheros.autologin=tty1"
@@ -1,6 +1,8 @@
---
title: Air Gap Configuration
weight: 138
aliases:
- /os/v1.x/en/installation/configuration/airgap-configuration
---
In the air gap environment, the Docker registry, RancherOS repositories URL, and the RancherOS upgrade URL should be configured to ensure the OS can pull images, update OS services, and upgrade the OS.
@@ -10,10 +12,10 @@ In the air gap environment, the Docker registry, RancherOS repositories URL, and
You should use a private Docker registry so that `user-docker` and `system-docker` can pull images.
1. Add the private Docker registry domain to the [images prefix]({{<baseurl>}}/os/v1.x/en/installation/configuration/images-prefix/).
2. Set the private registry certificates for `user-docker`. For details, refer to [Certificates for Private Registries]({{<baseurl>}}/os/v1.x/en/installation/configuration/private-registries/#certificates-for-private-registries)
1. Add the private Docker registry domain to the [images prefix]({{< baseurl >}}/os/v1.x/en/configuration/images-prefix/).
2. Set the private registry certificates for `user-docker`. For details, refer to [Certificates for Private Registries]({{< baseurl >}}/os/v1.x/en/configuration/private-registries/#certificates-for-private-registries)
3. Set the private registry certificates for `system-docker`. There are two ways to set the certificates:
- To set the private registry certificates before RancherOS starts, you can run a script included with RancherOS. For details, refer to [Set Custom Certs in ISO]({{<baseurl>}}/os/v1.x/en/installation/configuration/airgap-configuration/#set-custom-certs-in-iso).
- To set the private registry certificates before RancherOS starts, you can run a script included with RancherOS. For details, refer to [Set Custom Certs in ISO]({{< baseurl >}}/os/v1.x/en/configuration/airgap-configuration/#set-custom-certs-in-iso).
- To set the private registry certificates after RancherOS starts, append your private registry certs to the `/etc/ssl/certs/ca-certificates.crt.rancher` file. Then reboot to make the certs fully take effect.
4. The images used by RancherOS should be pushed to your private registry.
@@ -84,7 +86,11 @@ $ sudo ros config set rancher.upgrade.url https://foo.bar.com/os/releases.yml
Here is a total cloud-config example for using RancherOS in an air gap environment.
<<<<<<< HEAD:content/os/v1.x/en/installation/configuration/airgap-configuration/_index.md
For `system-docker`, see [Configuring Private Docker Registry]({{<baseurl>}}/os/v1.x/en/installation/configuration/airgap-configuration/#configuring-private-docker-registry).
=======
For `system-docker`, see [Configuring Private Docker Registry]({{< baseurl >}}/os/v1.x/en/configuration/airgap-configuration/#configuring-private-docker-registry).
>>>>>>> Reorganize RancherOS docs:content/os/v1.x/en/configuration/airgap-configuration/_index.md
```yaml
#cloud-config
@@ -1,11 +1,13 @@
---
title: Date and time zone
weight: 121
aliases:
- /os/v1.x/en/installation/configuration/date-and-timezone
---
The default console keeps time in the Coordinated Universal Time (UTC) zone and synchronizes clocks with the Network Time Protocol (NTP). The Network Time Protocol daemon (ntpd) is an operating system program that maintains the system time in synchronization with time servers using the NTP.
RancherOS can run ntpd in the System Docker container. You can update its configurations by updating `/etc/ntp.conf`. For an example of how to update a file such as `/etc/ntp.conf` within a container, refer to [this page.]({{<baseurl>}}/os/v1.x/en/installation/configuration/write-files/#writing-files-in-specific-system-services)
RancherOS can run ntpd in the System Docker container. You can update its configurations by updating `/etc/ntp.conf`. For an example of how to update a file such as `/etc/ntp.conf` within a container, refer to [this page.]({{< baseurl >}}/os/v1.x/en/configuration/write-files/#writing-files-in-specific-system-services)
The default console cannot support changing the time zone because including `tzdata` (time zone data) will increase the ISO size. However, you can change the time zone in the container by passing a flag to specify the time zone when you run the container:
@@ -1,6 +1,8 @@
---
title: Disabling Access to RancherOS
weight: 136
aliases:
- /os/v1.x/en/installation/configuration/disable-access-to-system
---
_Available as of v1.5_
@@ -1,9 +1,11 @@
---
title: Configuring Docker or System Docker
weight: 126
aliases:
- /os/v1.x/en/installation/configuration/docker
---
In RancherOS, you can configure System Docker and Docker daemons by using [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config).
In RancherOS, you can configure System Docker and Docker daemons by using [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config).
### Configuring Docker
@@ -61,7 +63,7 @@ Key | Value | Default | Description
---|---|---| ---
`extra_args` | List of Strings | `[]` | Arbitrary daemon arguments, appended to the generated command
`environment` | List of Strings | `[]` |
`tls` | Boolean | `false` | When [setting up TLS]({{<baseurl>}}/os/v1.x/en/installation/configuration/setting-up-docker-tls/), this key needs to be set to true.
`tls` | Boolean | `false` | When [setting up TLS]({{< baseurl >}}/os/v1.x/en/configuration/setting-up-docker-tls/), this key needs to be set to true.
`tls_args` | List of Strings (used only if `tls: true`) | `[]` |
`server_key` | String (used only if `tls: true`)| `""` | PEM encoded server TLS key.
`server_cert` | String (used only if `tls: true`) | `""` | PEM encoded server TLS certificate.
@@ -0,0 +1,13 @@
---
title: Setting the Hostname
weight: 124
aliases:
- /os/v1.x/en/installation/configuration/hostname
---
You can set the hostname of the host using [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config). The example below shows how to configure it.
```yaml
#cloud-config
hostname: myhost
```
@@ -1,6 +1,8 @@
---
title: Images prefix
weight: 121
aliases:
- /os/v1.x/en/installation/configuration/images-prefix
---
_Available as of v1.3_
@@ -1,6 +1,8 @@
---
title: Installing Kernel Modules that require Kernel Headers
weight: 135
aliases:
- /os/v1.x/en/installation/configuration/kernel-modules-kernel-headers
---
To compile any kernel modules, you will need to download the kernel headers. The kernel headers are available in the form of a system service. Since the kernel headers are a system service, they need to be enabled using the `ros service` command.
@@ -1,6 +1,8 @@
---
title: Loading Kernel Modules
weight: 134
aliases:
- /os/v1.x/en/installation/configuration/loading-kernel-modules
---
Since RancherOS v0.8, we build our own kernels using an unmodified kernel.org LTS kernel.
@@ -1,9 +1,11 @@
---
title: Private Registries
weight: 128
aliases:
- /os/v1.x/en/installation/configuration/private-registries
---
When launching services through a [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config), it is sometimes necessary to pull a private image from DockerHub or from a private registry. Authentication for these can be embedded in your cloud-config.
When launching services through a [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config), it is sometimes necessary to pull a private image from DockerHub or from a private registry. Authentication for these can be embedded in your cloud-config.
For example, to add authentication for DockerHub:
@@ -61,7 +63,7 @@ write_files:
### Certificates for Private Registries
Certificates can be stored in the standard locations (i.e. `/etc/docker/certs.d`) following the [Docker documentation](https://docs.docker.com/registry/insecure). By using the `write_files` directive of the [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config), the certificates can be written directly into `/etc/docker/certs.d`.
Certificates can be stored in the standard locations (i.e. `/etc/docker/certs.d`) following the [Docker documentation](https://docs.docker.com/registry/insecure). By using the `write_files` directive of the [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config), the certificates can be written directly into `/etc/docker/certs.d`.
```yaml
#cloud-config
@@ -1,6 +1,8 @@
---
title: Resizing a Device Partition
weight: 131
aliases:
- /os/v1.x/en/installation/configuration/resizing-device-partition
---
The `resize_device` cloud config option can be used to automatically extend the first partition (assuming its `ext4`) to fill the size of it's device.
@@ -1,6 +1,8 @@
---
title: Running Commands
weight: 123
aliases:
- /os/v1.x/en/installation/configuration/running-commands
---
You can automate running commands on boot using the `runcmd` cloud-config directive. Commands can be specified as either a list or a string. In the latter case, the command is executed with `sh`.
@@ -31,4 +33,4 @@ write_files:
docker run -d nginx
```
Running Docker commands in this manner is useful when pieces of the `docker run` command are dynamically generated. For services whose configuration is static, [adding a system service]({{<baseurl>}}/os/v1.x/en/installation/system-services/adding-system-services/) is recommended.
Running Docker commands in this manner is useful when pieces of the `docker run` command are dynamically generated. For services whose configuration is static, [adding a system service]({{< baseurl >}}/os/v1.x/en/system-services/) is recommended.
@@ -1,6 +1,8 @@
---
title: Setting up Docker TLS
weight: 127
aliases:
- /os/v1.x/en/installation/configuration/setting-up-docker-tls
---
`ros tls generate` is used to generate both the client and server TLS certificates for Docker.
@@ -1,9 +1,11 @@
---
title: SSH Settings
weight: 121
aliases:
- /os/v1.x/en/installation/configuration/ssh-keys
---
RancherOS supports adding SSH keys through the [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config) file. Within the cloud-config file, you simply add the ssh keys within the `ssh_authorized_keys` key.
RancherOS supports adding SSH keys through the [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config) file. Within the cloud-config file, you simply add the ssh keys within the `ssh_authorized_keys` key.
```yaml
#cloud-config
@@ -1,8 +1,11 @@
---
title: Switching Consoles
weight: 125
aliases:
- /os/v1.x/en/installation/configuration/switching-consoles
---
<<<<<<< HEAD:content/os/v1.x/en/installation/configuration/switching-consoles/_index.md
When [booting from the ISO]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/workstation/boot-from-iso/), RancherOS starts with the default console, which is based on busybox.
You can select which console you want RancherOS to start with using the [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config).
@@ -10,6 +13,15 @@ You can select which console you want RancherOS to start with using the [cloud-c
### Enabling Consoles using Cloud-Config
When launching RancherOS with a [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config) file, you can select which console you want to use.
=======
When [booting from the ISO]({{< baseurl >}}/os/v1.x/en/installation/workstation//boot-from-iso/), RancherOS starts with the default console, which is based on busybox.
You can select which console you want RancherOS to start with using the [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config).
### Enabling Consoles using Cloud-Config
When launching RancherOS with a [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config) file, you can select which console you want to use.
>>>>>>> Reorganize RancherOS docs:content/os/v1.x/en/configuration/switching-consoles/_index.md
Currently, the list of available consoles are:
@@ -1,9 +1,15 @@
---
title: Switching Docker Versions
weight: 129
aliases:
- /os/v1.x/en/installation/configuration/switching-docker-versions
---
<<<<<<< HEAD:content/os/v1.x/en/installation/configuration/switching-docker-versions/_index.md
The version of User Docker used in RancherOS can be configured using a [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config) file or by using the `ros engine` command.
=======
The version of User Docker used in RancherOS can be configured using a [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config) file or by using the `ros engine` command.
>>>>>>> Reorganize RancherOS docs:content/os/v1.x/en/configuration/switching-docker-versions/_index.md
> **Note:** There are known issues in Docker when switching between versions. For production systems, we recommend setting the Docker engine only once [using a cloud-config](#setting-the-docker-engine-using-cloud-config).
@@ -83,7 +89,11 @@ FROM scratch
COPY engine /engine
```
<<<<<<< HEAD:content/os/v1.x/en/installation/configuration/switching-docker-versions/_index.md
Once the image is built a [system service]({{<baseurl>}}/os/v1.x/en/installation/system-services/adding-system-services/) configuration file must be created. An [example file](https://github.com/rancher/os-services/blob/master/d/docker-18.06.3-ce.yml) can be found in the rancher/os-services repo. Change the `image` field to point to the Docker engine image you've built.
=======
Once the image is built a [system service]({{< baseurl >}}/os/v1.x/en/system-services/) configuration file must be created. An [example file](https://github.com/rancher/os-services/blob/master/d/docker-18.06.3-ce.yml) can be found in the rancher/os-services repo. Change the `image` field to point to the Docker engine image you've built.
>>>>>>> Reorganize RancherOS docs:content/os/v1.x/en/configuration/switching-docker-versions/_index.md
All of the previously mentioned methods of switching Docker engines are now available. For example, if your service file is located at `https://myservicefile` then the following cloud-config file could be used to use your custom Docker engine.
@@ -1,6 +1,8 @@
---
title: Sysctl Settings
weight: 132
aliases:
- /os/v1.x/en/installation/configuration/sysctl
---
The `rancher.sysctl` cloud-config key can be used to control sysctl parameters. This works in a manner similar to `/etc/sysctl.conf` for other Linux distros.
@@ -1,6 +1,8 @@
---
title: Users
weight: 130
aliases:
- /os/v1.x/en/installation/configuration/users
---
Currently, we don't support adding other users besides `rancher`.
@@ -1,6 +1,8 @@
---
title: Writing Files
weight: 122
aliases:
- /os/v1.x/en/installation/configuration/write-files
---
You can automate writing files to disk using the `write_files` cloud-config directive.
+32 -2
View File
@@ -1,4 +1,34 @@
---
title: Installation
weight: 2
title: Installing and Running RancherOS
weight: 100
aliases:
- /os/v1.x/en/installation/running-rancheros
---
RancherOS runs on virtualization platforms, cloud providers and bare metal servers. We also support running a local VM on your laptop.
To start running RancherOS as quickly as possible, follow our [Quick Start Guide]({{< baseurl >}}/os/v1.x/en/quick-start-guide/).
# Platforms
Refer to the below resources for more information on installing Rancher on your platform.
### Workstation
- [Docker Machine]({{< baseurl >}}/os/v1.x/en/installation/workstation//docker-machine)
- [Boot from ISO]({{< baseurl >}}/os/v1.x/en/installation/workstation//boot-from-iso)
### Cloud
- [Amazon EC2]({{< baseurl >}}/os/v1.x/en/installation/cloud/aws)
- [Google Compute Engine]({{< baseurl >}}/os/v1.x/en/installation/cloud/gce)
- [DigitalOcean]({{< baseurl >}}/os/v1.x/en/installation/cloud/do)
- [Azure]({{< baseurl >}}/os/v1.x/en/installation/cloud/azure)
- [OpenStack]({{< baseurl >}}/os/v1.x/en/installation/cloud/openstack)
- [VMware ESXi]({{< baseurl >}}/os/v1.x/en/installation/cloud/vmware-esxi)
- [Aliyun]({{< baseurl >}}/os/v1.x/en/installation/cloud/aliyun)
### Bare Metal & Virtual Servers
- [PXE]({{< baseurl >}}/os/v1.x/en/installation/server/pxe)
- [Install to Hard Disk]({{< baseurl >}}/os/v1.x/en/installation/server/install-to-disk)
- [Raspberry Pi]({{< baseurl >}}/os/v1.x/en/installation/server/raspberry-pi)
@@ -11,13 +11,13 @@ Prior to launching RancherOS EC2 instances, the [ECS Container Instance IAM Role
### Launching an instance with ECS
RancherOS makes it easy to join your ECS cluster. The ECS agent is a [system service]({{<baseurl>}}/os/v1.x/en/installation/system-services/adding-system-services/) that is enabled in the ECS enabled AMI. There may be other RancherOS AMIs that don't have the ECS agent enabled by default, but it can easily be added in the user data on any RancherOS AMI.
RancherOS makes it easy to join your ECS cluster. The ECS agent is a [system service]({{< baseurl >}}/os/v1.x/en/system-services/) that is enabled in the ECS enabled AMI. There may be other RancherOS AMIs that don't have the ECS agent enabled by default, but it can easily be added in the user data on any RancherOS AMI.
When launching the RancherOS AMI, you'll need to specify the **IAM Role** and **Advanced Details** -> **User Data** in the **Configure Instance Details** step.
For the **IAM Role**, you'll need to be sure to select the ECS Container Instance IAM role.
For the **User Data**, you'll need to pass in the [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config) file.
For the **User Data**, you'll need to pass in the [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config) file.
```yaml
#cloud-config
@@ -37,7 +37,7 @@ rancher:
By default, the ECS agent will be using the `latest` tag for the `amazon-ecs-agent` image. In v0.5.0, we introduced the ability to select which version of the `amazon-ecs-agent`.
To select the version, you can update your [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config) file.
To select the version, you can update your [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config) file.
```yaml
#cloud-config
@@ -3,7 +3,7 @@ title: Built-in System Services
weight: 150
---
To launch RancherOS, we have built-in system services. They are defined in the [Docker Compose](https://docs.docker.com/compose/compose-file/) format, and can be found in the default system config file, `/usr/share/ros/os-config.yml`. You can [add your own system services]({{<baseurl>}}/os/v1.x/en/installation/system-services/adding-system-services/) or override services in the cloud-config.
To launch RancherOS, we have built-in system services. They are defined in the [Docker Compose](https://docs.docker.com/compose/compose-file/) format, and can be found in the default system config file, `/usr/share/ros/os-config.yml`. You can [add your own system services]({{< baseurl >}}/os/v1.x/en/system-services/) or override services in the cloud-config.
### preload-user-images
@@ -13,7 +13,7 @@ Read more about [image preloading]({{<baseurl>}}/os/v1.x/en/installation/boot-pr
During this service, networking is set up, e.g. hostname, interfaces, and DNS.
It is configured by `hostname` and `rancher.network`settings in [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config).
It is configured by `hostname` and `rancher.network`settings in [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config).
### ntp
@@ -24,13 +24,13 @@ Runs `ntpd` in a System Docker container.
This service provides the RancherOS user interface by running `sshd` and `getty`. It completes the RancherOS configuration on start up:
1. If the `rancher.password=<password>` kernel parameter exists, it sets `<password>` as the password for the `rancher` user.
2. If there are no host SSH keys, it generates host SSH keys and saves them under `rancher.ssh.keys` in [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config).
2. If there are no host SSH keys, it generates host SSH keys and saves them under `rancher.ssh.keys` in [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config).
3. Runs `cloud-init -execute`, which does the following:
* Updates `.ssh/authorized_keys` in `/home/rancher` and `/home/docker` from [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/ssh-keys/) and metadata.
* Writes files specified by the `write_files` [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/write-files/) setting.
* Resizes the device specified by the `rancher.resize_device` [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/resizing-device-partition/) setting.
* Mount devices specified in the `mounts` [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/storage/additional-mounts/) setting.
* Set sysctl parameters specified in the`rancher.sysctl` [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/sysctl/) setting.
* Updates `.ssh/authorized_keys` in `/home/rancher` and `/home/docker` from [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/ssh-keys/) and metadata.
* Writes files specified by the `write_files` [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/write-files/) setting.
* Resizes the device specified by the `rancher.resize_device` [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/resizing-device-partition/) setting.
* Mount devices specified in the `mounts` [cloud-config]({{< baseurl >}}/os/v1.x/en/storage/additional-mounts/) setting.
* Set sysctl parameters specified in the`rancher.sysctl` [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/sysctl/) setting.
4. If user-data contained a file that started with `#!`, then a file would be saved at `/var/lib/rancher/conf/cloud-config-script` during cloud-init and then executed. Any errors are ignored.
5. Runs `/opt/rancher/bin/start.sh` if it exists and is executable. Any errors are ignored.
6. Runs `/etc/rc.local` if it exists and is executable. Any errors are ignored.
@@ -7,7 +7,7 @@ Userdata and metadata can be fetched from a cloud provider, VM runtime, or manag
### Userdata
Userdata is a file given by users when launching RancherOS hosts. It is stored in different locations depending on its format. If the userdata is a [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config) file, indicated by beginning with `#cloud-config` and being in YAML format, it is stored in `/var/lib/rancher/conf/cloud-config.d/boot.yml`. If the userdata is a script, indicated by beginning with `#!`, it is stored in `/var/lib/rancher/conf/cloud-config-script`.
Userdata is a file given by users when launching RancherOS hosts. It is stored in different locations depending on its format. If the userdata is a [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config) file, indicated by beginning with `#cloud-config` and being in YAML format, it is stored in `/var/lib/rancher/conf/cloud-config.d/boot.yml`. If the userdata is a script, indicated by beginning with `#!`, it is stored in `/var/lib/rancher/conf/cloud-config-script`.
### Metadata
@@ -15,7 +15,7 @@ Although the specifics vary based on provider, a metadata file will typically co
## Configuration Load Order
[Cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config/) is read by system services when they need to get configuration. Each additional file overwrites and extends the previous configuration file.
[Cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config/) is read by system services when they need to get configuration. Each additional file overwrites and extends the previous configuration file.
1. `/usr/share/ros/os-config.yml` - This is the system default configuration, which should **not** be modified by users.
2. `/usr/share/ros/oem/oem-config.yml` - This will typically exist by OEM, which should **not** be modified by users.
@@ -1,6 +1,8 @@
---
title: Aliyun
weight: 111
aliases:
- /os/v1.x/en/installation/running-rancheros/cloud/aliyun
---
# Adding the RancherOS Image into Aliyun
@@ -1,6 +1,8 @@
---
title: Amazon EC2
weight: 105
aliases:
- /os/v1.x/en/installation/running-rancheros/cloud/aws
---
RancherOS is available as an Amazon Web Services AMI, and can be easily run on EC2. You can launch RancherOS either using the AWS Command Line Interface (CLI) or using the AWS console.
@@ -28,7 +30,11 @@ Lets walk through how to import and create a RancherOS on EC2 machine using t
{{< img "/img/os/Rancher_aws1.png" "RancherOS on AWS 1">}}
2. Select the **Community AMIs** on the sidebar and search for **RancherOS**. Pick the latest version and click **Select**.
{{< img "/img/os/Rancher_aws2.png" "RancherOS on AWS 2">}}
<<<<<<< HEAD:content/os/v1.x/en/installation/running-rancheros/cloud/aws/_index.md
3. Go through the steps of creating the instance type through the AWS console. If you want to pass in a [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config) file during boot of RancherOS, you'd pass in the file as **User data** by expanding the **Advanced Details** in **Step 3: Configure Instance Details**. You can pass in the data as text or as a file.
=======
3. Go through the steps of creating the instance type through the AWS console. If you want to pass in a [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config) file during boot of RancherOS, you'd pass in the file as **User data** by expanding the **Advanced Details** in **Step 3: Configure Instance Details**. You can pass in the data as text or as a file.
>>>>>>> Reorganize RancherOS docs:content/os/v1.x/en/installation/cloud/aws/_index.md
{{< img "/img/os/Rancher_aws6.png" "RancherOS on AWS 6">}}
After going through all the steps, you finally click on **Launch**, and either create a new key pair or choose an existing key pair to be used with the EC2 instance. If you have created a new key pair, download the key pair. If you have chosen an existing key pair, make sure you have the key pair accessible. Click on **Launch Instances**.
{{< img "/img/os/Rancher_aws3.png" "RancherOS on AWS 3">}}
@@ -1,6 +1,8 @@
---
title: Azure
weight: 110
aliases:
- /os/v1.x/en/installation/running-rancheros/cloud/azure
---
RancherOS has been published in Azure Marketplace, you can get it from [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/rancher.rancheros).
@@ -1,6 +1,8 @@
---
title: Digital Ocean
weight: 107
aliases:
- /os/v1.x/en/installation/running-rancheros/cloud/do
---
RancherOS is available in the Digital Ocean portal. RancherOS is a member of container distributions and you can find it easily.
@@ -1,9 +1,11 @@
---
title: Google Compute Engine (GCE)
weight: 106
aliases:
- /os/v1.x/en/installation/running-rancheros/cloud/gce
---
> **Note:** Due to the maximum transmission unit (MTU) of [1460 bytes on GCE](https://cloud.google.com/compute/docs/troubleshooting#packetfragmentation), you will need to configure your [network interfaces]({{<baseurl>}}/os/v1.x/en/installation/networking/interfaces/) and both the [Docker and System Docker]({{<baseurl>}}/os/v1.x/en/installation/configuration/docker/) to use a MTU of 1460 bytes or you will encounter weird networking related errors.
> **Note:** Due to the maximum transmission unit (MTU) of [1460 bytes on GCE](https://cloud.google.com/compute/docs/troubleshooting#packetfragmentation), you will need to configure your [network interfaces]({{< baseurl >}}/os/v1.x/en/networking/interfaces/) and both the [Docker and System Docker]({{< baseurl >}}/os/v1.x/en/configuration/docker/) to use a MTU of 1460 bytes or you will encounter weird networking related errors.
### Adding the RancherOS Image into GCE
@@ -26,7 +28,7 @@ $ gcloud compute instances create --project <PROJECT_ID> --zone <ZONE_TO_CREATE_
### Using a Cloud Config File with GCE
If you want to pass in your own cloud config file that will be processed by [cloud init]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config), you can pass it as metadata upon creation of the instance during the `gcloud compute` command. The file will need to be stored locally before running the command. The key of the metadata will be `user-data` and the value is the location of the file. If any SSH keys are added in the cloud config file, it will also be added to the **rancher** user.
If you want to pass in your own cloud config file that will be processed by [cloud init]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config), you can pass it as metadata upon creation of the instance during the `gcloud compute` command. The file will need to be stored locally before running the command. The key of the metadata will be `user-data` and the value is the location of the file. If any SSH keys are added in the cloud config file, it will also be added to the **rancher** user.
```
$ gcloud compute instances create --project <PROJECT_ID> --zone <ZONE_TO_CREATE_INSTANCE> <INSTANCE_NAME> --image <PRIVATE_IMAGE_NAME> --metadata-from-file user-data=/Directory/of/Cloud_Config.yml
@@ -1,8 +1,10 @@
---
title: OpenStack
weight: 109
aliases:
- /os/v1.x/en/installation/running-rancheros/cloud/openstack
---
As of v0.5.0, RancherOS releases include an Openstack image that can be found on our [releases page](https://github.com/rancher/os/releases). The image format is [QCOW3](https://wiki.qemu.org/Features/Qcow3#Fully_QCOW2_backwards-compatible_feature_set) that is backward compatible with QCOW2.
When launching an instance using the image, you must enable **Advanced Options** -> **Configuration Drive** and in order to use a [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config) file.
When launching an instance using the image, you must enable **Advanced Options** -> **Configuration Drive** and in order to use a [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config) file.
@@ -1,6 +1,8 @@
---
title: VMware ESXi
weight: 108
aliases:
- /os/v1.x/en/installation/running-rancheros/cloud/vmware-esxi
---
As of v1.1.0, RancherOS automatically detects that it is running on VMware ESXi, and automatically adds the `open-vm-tools` service to be downloaded and started, and uses `guestinfo` keys to set the cloud-init data.
@@ -1,11 +0,0 @@
---
title: Setting the Hostname
weight: 124
---
You can set the hostname of the host using [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config). The example below shows how to configure it.
```yaml
#cloud-config
hostname: myhost
```
@@ -3,6 +3,7 @@ title: Custom Console
weight: 180
---
<<<<<<< HEAD
When [booting from the ISO]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/workstation/boot-from-iso/), RancherOS starts with the default console, which is based on busybox.
You can select which console you want RancherOS to start with using the [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config).
@@ -10,6 +11,15 @@ You can select which console you want RancherOS to start with using the [cloud-c
### Enabling Consoles using Cloud-Config
When launching RancherOS with a [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config) file, you can select which console you want to use.
=======
When [booting from the ISO]({{< baseurl >}}/os/v1.x/en/installation/workstation//boot-from-iso/), RancherOS starts with the default console, which is based on busybox.
You can select which console you want RancherOS to start with using the [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config).
### Enabling Consoles using Cloud-Config
When launching RancherOS with a [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config) file, you can select which console you want to use.
>>>>>>> Reorganize RancherOS docs
Currently, the list of available consoles are:
@@ -29,7 +29,7 @@ If you need a compressed ISO, you can run this command:
$ make release
```
The `rancheros.iso` is ready to be used to [boot RancherOS from ISO]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/workstation/boot-from-iso/) or [launch RancherOS using Docker Machine]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/workstation/docker-machine).
The `rancheros.iso` is ready to be used to [boot RancherOS from ISO]({{< baseurl >}}/os/v1.x/en/installation/workstation//boot-from-iso/) or [launch RancherOS using Docker Machine]({{< baseurl >}}/os/v1.x/en/installation/workstation//docker-machine).
## Creating a GCE Image Archive
@@ -1,9 +1,11 @@
---
title: Installing to Disk
weight: 111
aliases:
- /os/v1.x/en/installation/running-rancheros/server/install-to-disk
---
RancherOS comes with a simple installer that will install RancherOS on a given target disk. To install RancherOS on a new disk, you can use the `ros install` command. Before installing, you'll need to have already [booted RancherOS from ISO]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/workstation/boot-from-iso). Please be sure to pick the `rancheros.iso` from our release [page](https://github.com/rancher/os/releases).
RancherOS comes with a simple installer that will install RancherOS on a given target disk. To install RancherOS on a new disk, you can use the `ros install` command. Before installing, you'll need to have already [booted RancherOS from ISO]({{< baseurl >}}/os/v1.x/en/installation/workstation//boot-from-iso). Please be sure to pick the `rancheros.iso` from our release [page](https://github.com/rancher/os/releases).
### Using `ros install` to Install RancherOS
@@ -11,7 +13,7 @@ The `ros install` command orchestrates the installation from the `rancher/os` co
#### Cloud-Config
The easiest way to log in is to pass a `cloud-config.yml` file containing your public SSH keys. To learn more about what's supported in our cloud-config, please read our [documentation]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config).
The easiest way to log in is to pass a `cloud-config.yml` file containing your public SSH keys. To learn more about what's supported in our cloud-config, please read our [documentation]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config).
The `ros install` command will process your `cloud-config.yml` file specified with the `-c` flag. This file will also be placed onto the disk and installed to `/var/lib/rancher/conf/`. It will be evaluated on every boot.
@@ -61,7 +63,7 @@ Status: Downloaded newer image for rancher/os:v0.5.0
Continue with reboot [y/N]:
```
After installing RancherOS to disk, you will no longer be automatically logged in as the `rancher` user. You'll need to have added in SSH keys within your [cloud-config file]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config).
After installing RancherOS to disk, you will no longer be automatically logged in as the `rancher` user. You'll need to have added in SSH keys within your [cloud-config file]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config).
#### Installing a Different Version
@@ -1,6 +1,8 @@
---
title: iPXE
weight: 112
aliases:
- /os/v1.x/en/installation/running-rancheros/server/pxe
---
```
@@ -63,11 +65,11 @@ Valid cloud-init datasources for RancherOS.
| cmdline | Kernel command line: `cloud-config-url=http://link/user_data` |
| configdrive | /media/config-2 |
| url | URL address |
| vmware| Set `guestinfo` cloud-init or interface data as per [VMware ESXi]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/cloud/vmware-esxi) |
| vmware| Set `guestinfo` cloud-init or interface data as per [VMware ESXi]({{< baseurl >}}/os/v1.x/en/installation/cloud/vmware-esxi) |
| * | This will add ["configdrive", "vmware", "ec2", "digitalocean", "packet", "gce"] into the list of datasources to try |
The vmware datasource was added as of v1.1.
### Cloud-Config
When booting via iPXE, RancherOS can be configured using a [cloud-config file]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config).
When booting via iPXE, RancherOS can be configured using a [cloud-config file]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config).
@@ -1,11 +1,13 @@
---
title: Raspberry Pi
weight: 113
aliases:
- /os/v1.x/en/installation/running-rancheros/server/raspberry-pi
---
As of v0.5.0, RancherOS releases include a Raspberry Pi image that can be found on our [releases page](https://github.com/rancher/os/releases). The official Raspberry Pi documentation contains instructions on how to [install operating system images](https://www.raspberrypi.org/documentation/installation/installing-images/).
When installing, there is no ability to pass in a [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config). You will need to boot up, change the configuration and then reboot to apply those changes.
When installing, there is no ability to pass in a [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config). You will need to boot up, change the configuration and then reboot to apply those changes.
Currently, only Raspberry Pi 3 is tested and known to work.
@@ -1,6 +1,8 @@
---
title: Booting from ISO
weight: 102
aliases:
- /os/v1.x/en/installation/running-rancheros/workstation/boot-from-iso
---
The RancherOS ISO file can be used to create a fresh RancherOS install on KVM, VMware, VirtualBox, Hyper-V, Proxmox VE, or bare metal servers. You can download the `rancheros.iso` file from our [releases page](https://github.com/rancher/os/releases/).
@@ -17,4 +19,4 @@ You must boot with enough memory which you can refer to [here]({{<baseurl>}}/os/
### Install to Disk
After you boot RancherOS from ISO, you can follow the instructions [here]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/server/install-to-disk/) to install RancherOS to a hard disk.
After you boot RancherOS from ISO, you can follow the instructions [here]({{< baseurl >}}/os/v1.x/en/installation/server/install-to-disk/) to install RancherOS to a hard disk.
@@ -1,6 +1,8 @@
---
title: Using Docker Machine
weight: 101
aliases:
- /os/v1.x/en/installation/running-rancheros/workstation/docker-machine
---
Before we get started, you'll need to make sure that you have docker machine installed. Download it directly from the docker machine [releases](https://github.com/docker/machine/releases).
@@ -116,7 +118,7 @@ Logging into RancherOS follows the standard Docker Machine commands. To login in
$ docker-machine ssh <MACHINE-NAME>
```
You'll be logged into RancherOS and can start exploring the OS, This will log you into the RancherOS VM. You'll then be able to explore the OS by [adding system services]({{<baseurl>}}/os/v1.x/en/installation/system-services/adding-system-services/), [customizing the configuration]({{<baseurl>}}/os/v1.x/en/installation/configuration/), and launching containers.
You'll be logged into RancherOS and can start exploring the OS, This will log you into the RancherOS VM. You'll then be able to explore the OS by [adding system services]({{< baseurl >}}/os/v1.x/en/system-services/), [customizing the configuration]({{< baseurl >}}/os/v1.x/en/configuration/), and launching containers.
If you want to exit out of RancherOS, you can exit by pressing `Ctrl+D`.
@@ -1,6 +1,8 @@
---
title: Configuring DNS
weight: 171
aliases:
- /os/v1.x/en/installation/networking/dns
---
If you wanted to configure the DNS through the cloud config file, you'll need to place DNS configurations within the `rancher` key.
@@ -1,6 +1,8 @@
---
title: Configuring Network Interfaces
weight: 170
aliases:
- /os/v1.x/en/installation/networking/interfaces
---
Using `ros config`, you can configure specific interfaces. Wildcard globbing is supported so `eth*` will match `eth1` and `eth2`. The available options you can configure are `address`, `gateway`, `mtu`, and `dhcp`.
@@ -1,6 +1,8 @@
---
title: Configuring Proxy Settings
weight: 172
aliases:
- /os/v1.x/en/installation/networking/proxy-settings
---
HTTP proxy settings can be set directly under the `network` key. This will automatically configure proxy settings for both Docker and System Docker.
+1 -1
View File
@@ -29,7 +29,7 @@ You can adjust memory requirements by custom building RancherOS, please refer to
### How RancherOS Works
Everything in RancherOS is a Docker container. We accomplish this by launching two instances of Docker. One is what we call **System Docker** and is the first process on the system. All other system services, like `ntpd`, `syslog`, and `console`, are running in Docker containers. System Docker replaces traditional init systems like `systemd` and is used to launch [additional system services]({{<baseurl>}}/os/v1.x/en/installation/system-services/adding-system-services/).
Everything in RancherOS is a Docker container. We accomplish this by launching two instances of Docker. One is what we call **System Docker** and is the first process on the system. All other system services, like `ntpd`, `syslog`, and `console`, are running in Docker containers. System Docker replaces traditional init systems like `systemd` and is used to launch [additional system services]({{< baseurl >}}/os/v1.x/en/system-services/).
System Docker runs a special container called **Docker**, which is another Docker daemon responsible for managing all of the users containers. Any containers that you launch as a user from the console will run inside this Docker. This creates isolation from the System Docker containers and ensures that normal user commands dont impact system services.
@@ -3,7 +3,7 @@ title: Quick Start
weight: 1
---
If you have a specific RanchersOS machine requirements, please check out our [guides on running RancherOS]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/). With the rest of this guide, we'll start up a RancherOS using [Docker machine]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/workstation/docker-machine/) and show you some of what RancherOS can do.
If you have a specific RanchersOS machine requirements, please check out our [guides on running RancherOS]({{< baseurl >}}/os/v1.x/en/installation/platform/). With the rest of this guide, we'll start up a RancherOS using [Docker machine]({{< baseurl >}}/os/v1.x/en/installation/workstation//docker-machine/) and show you some of what RancherOS can do.
### Launching RancherOS using Docker Machine
@@ -1,9 +1,15 @@
---
title: Additional Mounts
weight: 161
aliases:
- /os/v1.x/en/installation/storage/additional-mounts
---
<<<<<<< HEAD:content/os/v1.x/en/installation/storage/additional-mounts/_index.md
Additional mounts can be specified as part of your [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config). These mounts are applied within the console container. Here's a simple example that mounts `/dev/vdb` to `/mnt/s`.
=======
Additional mounts can be specified as part of your [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config). These mounts are applied within the console container. Here's a simple example that mounts `/dev/vdb` to `/mnt/s`.
>>>>>>> Reorganize RancherOS docs:content/os/v1.x/en/storage/additional-mounts/_index.md
```yaml
#cloud-config
@@ -1,6 +1,8 @@
---
title: Persistent State Partition
weight: 160
aliases:
- /os/v1.x/en/installation/storage/state-partition
---
RancherOS will store its state in a single partition specified by the `dev` field. The field can be a device such as `/dev/sda1` or a logical name such `LABEL=state` or `UUID=123124`. The default value is `LABEL=RANCHER_STATE`. The file system type of that partition can be set to `auto` or a specific file system type such as `ext4`.
@@ -1,6 +1,8 @@
---
title: Using ZFS
weight: 162
aliases:
- /os/v1.x/en/installation/storage/using-zfs
---
#### Installing the ZFS service
@@ -1,6 +1,8 @@
---
title: System Services
weight: 140
aliases:
- /os/v1.x/en/installation/system-services/adding-system-services
---
A system service is a container that can be run in either System Docker or Docker. Rancher provides services that are already available in RancherOS by adding them to the [os-services repo](https://github.com/rancher/os-services). Anything in the `index.yml` file from the repository for the tagged release will be an available system service when using the `ros service list` command.
@@ -1,9 +1,11 @@
---
title: Custom System Services
weight: 141
aliases:
- /os/v1.x/en/installation/system-services/custom-system-services
---
You can also create your own system service in [Docker Compose](https://docs.docker.com/compose/) format. After creating your own custom service, you can launch it in RancherOS in a couple of methods. The service could be directly added to the [cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/#cloud-config), or a `docker-compose.yml` file could be saved at a http(s) url location or in a specific directory of RancherOS.
You can also create your own system service in [Docker Compose](https://docs.docker.com/compose/) format. After creating your own custom service, you can launch it in RancherOS in a couple of methods. The service could be directly added to the [cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/#cloud-config), or a `docker-compose.yml` file could be saved at a http(s) url location or in a specific directory of RancherOS.
### Launching Services through Cloud-Config
@@ -1,6 +1,8 @@
---
title: Environment
weight: 143
aliases:
- /os/v1.x/en/installation/system-services/environment
---
The [environment key](https://docs.docker.com/compose/compose-file/#environment) can be used to customize system services. When a value is not assigned, RancherOS looks up the value from the `rancher.environment` key.
@@ -1,6 +1,8 @@
---
title: System Docker Volumes
weight: 142
aliases:
- /os/v1.x/en/installation/system-services/system-docker-volumes
---
A few services are containers in `created` state. Their purpose is to provide volumes for other services.
+2 -2
View File
@@ -9,7 +9,7 @@ Since RancherOS is a kernel and initrd, the upgrade process is downloading a new
Before upgrading to any version, please review the release notes on our [releases page](https://github.com/rancher/os/releases) in GitHub to review any updates in the release.
> **Note:** If you are using [`docker-machine`]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/workstation/docker-machine/) then you will not be able to upgrade your RancherOS version. You need to delete and re-create the machine.
> **Note:** If you are using [`docker-machine`]({{< baseurl >}}/os/v1.x/en/installation/workstation//docker-machine/) then you will not be able to upgrade your RancherOS version. You need to delete and re-create the machine.
### Version Control
@@ -64,7 +64,7 @@ $ sudo ros -v
ros version v0.5.0
```
> **Note:** If you are booting from ISO and have not installed to disk, your upgrade will not be saved. You can view our guide to [installing to disk]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/server/install-to-disk/).
> **Note:** If you are booting from ISO and have not installed to disk, your upgrade will not be saved. You can view our guide to [installing to disk]({{< baseurl >}}/os/v1.x/en/installation/server/install-to-disk/).
#### Upgrading to a Specific Version
@@ -226,7 +226,7 @@ To make use of cloud-init initialization, create a cloud config file using valid
{{% /tab %}}
{{% tab "Rancher prior to v2.3.3" %}}
You may specify the URL of a RancherOS cloud-config.yaml file in the the **Cloud Init** field. Refer to the [RancherOS Documentation]https://rancher.com/docs/os/v1.x/en/installation/configuration/#cloud-config) for details on the supported configuration directives. Note that the URL must be network accessible from the VMs created by the template.
You may specify the URL of a RancherOS cloud-config.yaml file in the the **Cloud Init** field. Refer to the [RancherOS Documentation]https://rancher.com/docs/os/v1.x/en/configuration/#cloud-config) for details on the supported configuration directives. Note that the URL must be network accessible from the VMs created by the template.
{{% /tab %}}
{{% /tabs %}}
@@ -48,7 +48,7 @@ The options for creating and configuring an instance are different depending on
| Creation method | * | The method for setting up an operating system on the node. The operating system can be installed from an ISO or from a VM template. Depending on the creation method, you will also have to specify a VM template, content library, existing VM, or ISO. For more information on creation methods, refer to the section on [configuring instances.]({{<baseurl>}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/node-pools/vsphere/provisioning-vsphere-clusters/#c-configure-instances-and-operating-systems) |
| Cloud Init | | URL of a `cloud-config.yml` file or URL to provision VMs with. This file allows further customization of the operating system, such as network configuration, DNS servers, or system daemons. The operating system must support `cloud-init`. |
| Networks | | Name(s) of the network to attach the VM to. |
| Configuration Parameters used for guestinfo | | Additional configuration parameters for the VMs. These correspond to the [Advanced Settings](https://kb.vmware.com/s/article/1016098) in the vSphere console. Example use cases include providing RancherOS [guestinfo]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/cloud/vmware-esxi/#vmware-guestinfo) parameters or enabling disk UUIDs for the VMs (`disk.EnableUUID=TRUE`). |
| Configuration Parameters used for guestinfo | | Additional configuration parameters for the VMs. These correspond to the [Advanced Settings](https://kb.vmware.com/s/article/1016098) in the vSphere console. Example use cases include providing RancherOS [guestinfo]({{< baseurl >}}/os/v1.x/en/installation/cloud/vmware-esxi/#vmware-guestinfo) parameters or enabling disk UUIDs for the VMs (`disk.EnableUUID=TRUE`). |
{{% /tab %}}
{{% tab "Rancher prior to v2.3.3" %}}
@@ -58,9 +58,9 @@ The options for creating and configuring an instance are different depending on
| CPUs | * | Number of vCPUS to assign to VMs. |
| Memory | * | Amount of memory to assign to VMs. |
| Disk | * | Size of the disk (in MB) to attach to the VMs. |
| Cloud Init | | URL of a [RancherOS cloud-config]({{<baseurl>}}/os/v1.x/en/installation/configuration/) file to provision VMs with. This file allows further customization of the RancherOS operating system, such as network configuration, DNS servers, or system daemons.|
| Cloud Init | | URL of a [RancherOS cloud-config]({{< baseurl >}}/os/v1.x/en/configuration/) file to provision VMs with. This file allows further customization of the RancherOS operating system, such as network configuration, DNS servers, or system daemons.|
| OS ISO URL | * | URL of a RancherOS vSphere ISO file to boot the VMs from. You can find URLs for specific versions in the [Rancher OS GitHub Repo](https://github.com/rancher/os). |
| Configuration Parameters | | Additional configuration parameters for the VMs. These correspond to the [Advanced Settings](https://kb.vmware.com/s/article/1016098) in the vSphere console. Example use cases include providing RancherOS [guestinfo]({{<baseurl>}}/os/v1.x/en/installation/running-rancheros/cloud/vmware-esxi/#vmware-guestinfo) parameters or enabling disk UUIDs for the VMs (`disk.EnableUUID=TRUE`). |
| Configuration Parameters | | Additional configuration parameters for the VMs. These correspond to the [Advanced Settings](https://kb.vmware.com/s/article/1016098) in the vSphere console. Example use cases include providing RancherOS [guestinfo]({{< baseurl >}}/os/v1.x/en/installation/cloud/vmware-esxi/#vmware-guestinfo) parameters or enabling disk UUIDs for the VMs (`disk.EnableUUID=TRUE`). |
{{% /tab %}}
{{% /tabs %}}