mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-26 13:08:11 +00:00
Sync up docs with the old site, related to these PRs:
https://github.com/rancher/rancher.github.io/pull/1023 https://github.com/rancher/rancher.github.io/pull/1022 https://github.com/rancher/rancher.github.io/pull/1021 https://github.com/rancher/rancher.github.io/pull/1020 https://github.com/rancher/rancher.github.io/pull/1025 @superseb https://github.com/rancher/docs/pull/263 @JacieChao
This commit is contained in:
@@ -9,7 +9,8 @@ There are two ways to set or modify persistent kernel parameters, in-place (edit
|
||||
|
||||
### In-place editing
|
||||
|
||||
_As of v1.1+_
|
||||
_Available as of v1.1_
|
||||
|
||||
To edit the kernel boot parameters of an already installed RancherOS system, use the new `sudo ros config syslinux` editing command (uses `vi`).
|
||||
|
||||
> To activate this setting, you will need to reboot.
|
||||
@@ -32,10 +33,10 @@ If you want to set the extra kernel parameters when you are [Installing RancherO
|
||||
$ sudo ros install -d /dev/sda --append "rancheros.autologin=tty1"
|
||||
```
|
||||
|
||||
_As of v1.1_
|
||||
|
||||
### Graphical boot screen
|
||||
|
||||
_Available as of v1.1_
|
||||
|
||||
RancherOS v1.1.0 added a Syslinux boot menu, which allows you to temporarily edit the boot paramters, or to select "Debug logging", "Autologin", both "Debug logging & Autologin" and "Recovery Console".
|
||||
|
||||
On desktop systems the Syslinux boot menu can be switched to graphical mode by adding `UI vesamenu.c32` to a new line in `global.cfg` (use `sudo ros config syslinux` to edit the file).
|
||||
@@ -61,3 +62,9 @@ On desktop systems the Syslinux boot menu can be switched to graphical mode by a
|
||||
#### Enable/Disable hypervisor service auto-enable
|
||||
|
||||
RancherOS v1.1.0 added detection of Hypervisor, and then will try to download the a service called `<hypervisor>-vm-tools`. This may cause boot speed issues, and so can be disabled by setting `rancher.hypervisor_service=false`.
|
||||
|
||||
#### Auto reboot after a kernel panic
|
||||
|
||||
_Available as of v1.3_
|
||||
|
||||
`panic=10` will automatically reboot after a kernel panic, 10 means wait 10 seconds before reboot. This is a common kernel parameter, pointing out that it is because we set this parameter by default.
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: Images prefix
|
||||
weight: 121
|
||||
---
|
||||
|
||||
_Available as of v1.3_
|
||||
|
||||
When you have built your own docker registries, and have cached the `rancher/os` and other `os-services` images,
|
||||
something like a normal `docker pull rancher/os` can be cached as `docker pull dockerhub.mycompanyname.com/docker.io/rancher/os`.
|
||||
|
||||
However, you need a way to inject a prefix into RancherOS for installation or service pulls.
|
||||
RancherOS supports a global prefix you can add to force ROS to always use your mirror.
|
||||
|
||||
You can config a global image prefix:
|
||||
|
||||
```
|
||||
ros config set rancher.environment.REGISTRY_DOMAIN xxxx.yyy
|
||||
|
||||
```
|
||||
|
||||
Then you check the os list:
|
||||
|
||||
```
|
||||
$ ros os list
|
||||
xxxx.yyy/rancher/os:v1.3.0 remote latest running
|
||||
xxxx.yyy/rancher/os:v1.2.0 remote available
|
||||
...
|
||||
...
|
||||
```
|
||||
|
||||
Also you can check consoles:
|
||||
|
||||
```
|
||||
$ ros console switch ubuntu
|
||||
Switching consoles will
|
||||
1. destroy the current console container
|
||||
2. log you out
|
||||
3. restart Docker
|
||||
Continue [y/N]: y
|
||||
Pulling console (xxxx.yyy/rancher/os-ubuntuconsole:v1.3.0)...
|
||||
...
|
||||
```
|
||||
|
||||
If you want to reset this setting:
|
||||
|
||||
```
|
||||
ros config set rancher.environment.REGISTRY_DOMAIN docker.io
|
||||
```
|
||||
@@ -1,21 +1,51 @@
|
||||
---
|
||||
title: Loading Extra Kernel Modules
|
||||
title: Loading Kernel Modules
|
||||
weight: 134
|
||||
---
|
||||
|
||||
Since RancherOS v0.8, we build our own kernels using an unmodified kernel.org LTS kernel.
|
||||
We provide both loading kernel modules with parameters and loading extra kernel modules for you.
|
||||
|
||||
### Loading Kernel Modules with parameters
|
||||
|
||||
_Available as of v1.4_
|
||||
|
||||
The `rancher.modules` can help you to set kernel modules or module parameters.
|
||||
|
||||
As an example, I'm going to set a parameter for kernel module `ndb`
|
||||
|
||||
```
|
||||
sudo ros config set rancher.modules "['nbd nbds_max=1024', 'nfs']"
|
||||
```
|
||||
|
||||
Or
|
||||
|
||||
```
|
||||
#cloud-config
|
||||
rancher:
|
||||
modules: [nbd nbds_max=1024, nfs]
|
||||
```
|
||||
|
||||
After rebooting, you can check that `ndbs_max` parameter has been updated.
|
||||
|
||||
```
|
||||
# cat /sys/module/nbd/parameters/nbds_max
|
||||
1024
|
||||
```
|
||||
|
||||
### Loading Extra Kernel Modules
|
||||
|
||||
We also build almost all optional extras as modules - so most in-tree modules are available
|
||||
in the `kernel-extras` service.
|
||||
|
||||
If you do need to build kernel modules for RancherOS, there are 4 options:
|
||||
|
||||
If you do need to build kernel modules for RancherOS, there are 3 options:
|
||||
* Try the `kernel-extras` service
|
||||
* Ask us to add it into the next release
|
||||
* If its out of tree, copy the methods used for the zfs and open-iscsi services
|
||||
* Build it yourself.
|
||||
|
||||
0 Try the `kernel-extras` service
|
||||
1 Ask us to add it into the next release
|
||||
2 If its out of tree, copy the methods used for the zfs and open-iscsi services
|
||||
3 Build it yourself.
|
||||
|
||||
## Try the kernel-extras service
|
||||
#### Try the kernel-extras service
|
||||
|
||||
We build the RancherOS kernel with most of the optional drivers as kernel modules, packaged
|
||||
into an optional RancherOS service.
|
||||
@@ -29,13 +59,13 @@ sudo ros service up kernel-extras
|
||||
|
||||
The modules should now be available for you to `modprobe`
|
||||
|
||||
## Ask us to do it
|
||||
#### Ask us to do it
|
||||
|
||||
Open a GitHub issue in the https://github.com/rancher/os repository - we'll probably add
|
||||
it to the kernel-extras next time we build a kernel. Tell us if you need the module at initial
|
||||
configuration or boot, and we can add it to the default kernel modules.
|
||||
|
||||
## Copy the out of tree build method
|
||||
#### Copy the out of tree build method
|
||||
|
||||
See https://github.com/rancher/os-services/blob/master/z/zfs.yml and
|
||||
https://github.com/rancher/os-services/tree/master/images/20-zfs
|
||||
@@ -43,19 +73,17 @@ https://github.com/rancher/os-services/tree/master/images/20-zfs
|
||||
The build container and build.sh script build the source, and then create a tools image, which is used to
|
||||
"wonka.sh" import those tools into the console container using `docker run`
|
||||
|
||||
|
||||
## Build your own.
|
||||
#### Build your own.
|
||||
|
||||
As an example I'm going build the `intel-ishtp` hid driver using the `rancher/os-zfs:<version>` images to build in, as they should contain the right tools versions for that kernel.
|
||||
|
||||
|
||||
```
|
||||
sudo docker run --rm -it --privileged -v $(pwd):/data -w /data rancher/os-zfs:$(ros -v | cut -d ' ' -f 3) bash
|
||||
sudo docker run --rm -it --entrypoint bash --privileged -v /lib:/host/lib -v $(pwd):/data -w /data rancher/os-zfs:$(ros -v | cut -d ' ' -f 2)
|
||||
|
||||
apt-get update
|
||||
apt-get install -qy libncurses5-dev bc libssh-dev
|
||||
curl -SsL -o src.tgz https://github.com/rancher/os-kernel/releases/download/v$(uname -r)/linux-$(uname -r)-src.tgz
|
||||
tar zxvf src/tgz
|
||||
tar zxvf src.tgz
|
||||
zcat /proc/config.gz >.config
|
||||
# Yes, ignore the name of the directory :/
|
||||
cd v*
|
||||
@@ -70,7 +98,8 @@ insmod drivers/hid/intel-ish-hid/intel-ishtp.ko
|
||||
rmmod intel-ishtp
|
||||
|
||||
# install it
|
||||
cp drivers/hid/intel-ish-hid/*.ko /lib/modules/4.9.45-rancher/kernel/drivers/hid/
|
||||
ln -s /host/lib/modules/ /lib/
|
||||
cp drivers/hid/intel-ish-hid/*.ko /host/lib/modules/$(uname -r)/kernel/drivers/hid/
|
||||
depmod
|
||||
|
||||
# done
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: SSH Keys
|
||||
title: SSH Settings
|
||||
weight: 121
|
||||
---
|
||||
|
||||
@@ -19,3 +19,21 @@ $ ssh -i /path/to/private/key rancher@<ip-address>
|
||||
```
|
||||
|
||||
Please note that OpenSSH 7.0 and greater similarly disable the ssh-dss (DSA) public key algorithm. It too is weak and we recommend against its use.
|
||||
|
||||
### SSHD Port and IP
|
||||
|
||||
_Available as of v1.3_
|
||||
|
||||
RancherOS supports changing the sshd port and IP, you can use these in the cloud-config file:
|
||||
|
||||
```
|
||||
rancher:
|
||||
ssh:
|
||||
port: 10022
|
||||
listen_address: 172.22.100.100
|
||||
```
|
||||
|
||||
These settings are only designed for default console.
|
||||
Because if you change sshd-config, restart the host will restore the default, the new configuration will not take effect.
|
||||
|
||||
For other consoles, all files are persistent, you can modify sshd-config by yourself.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: sysctl Settings
|
||||
title: Sysctl Settings
|
||||
weight: 132
|
||||
---
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ rancher:
|
||||
|
||||
### Run custom network configuration commands
|
||||
|
||||
_As of v1.1_
|
||||
_Available as of v1.1_
|
||||
|
||||
You can configure `pre` and `post` network configuration commands to run in the `network` service container by adding `pre_cmds` and `post_cmds` array keys to `rancher.network`, or `pre_up` and`post_up` keys for specific `rancher.network.interfaces`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user