Built-in System Services
To launch RancherOS, we have built-in system services. They are defined in the Docker Compose format, and can be found in the default system config file,
/usr/share/ros/os-config.yml. You can add your own system services or override services in the cloud-config.
了解更多 about image preloading.
During this service, networking is set up, e.g. hostname, interfaces, and DNS.
It is configured by
rancher.networksettings in cloud-config.
ntpd in a System Docker container.
This service provides the RancherOS user interface by running
getty. It completes the RancherOS configuration on start up:
- If the
rancher.password=<password>kernel parameter exists, it sets
<password>as the password for the
- If there are no host SSH keys, it generates host SSH keys and saves them under
cloud-init -execute, which does the following:
/home/dockerfrom cloud-config and metadata.
- Writes files specified by the
- Resizes the device specified by the
- Mount devices specified in the
- Set sysctl parameters specified in the
- If user-data contained a file that started with
#!, then a file would be saved at
/var/lib/rancher/conf/cloud-config-scriptduring cloud-init and then executed. Any errors are ignored.
/opt/rancher/bin/start.shif it exists and is executable. Any errors are ignored.
/etc/rc.localif it exists and is executable. Any errors are ignored.
This system service runs the user docker daemon. Normally it runs inside the console system container by running
docker-init script which, in turn, looks for docker binaries in
/usr/bin, adds the first found directory with docker binaries to PATH and runs
dockerlaunch docker daemon appending the passed arguments.
Docker daemon args are read from
rancher.docker.args cloud-config property (followed by