Hey Guys,
I’ve deployed a fair few rancher installs to bare metal through ISO’s mounted to the servers.
I’ll see if i can write something up ‘proper’ soon, in the meantime, below is an extract of the documentation we use, you may need to adjust it but hopefully it helps.
(These instructions are for an environment without DHCP, DHCP should be easier if you have that).
Preperation
- Log in through the iLo (see the BladeSystem Overview page for access details.)
- Mount the image and boot
- If you have previously installed RancherOS on this host it may have auto-mounted the disk device. If that happens, you need to use fdisk to wipe the partition table, then reboot before continuing.
sudo umount /dev/sda1
sudo fdisk /dev/sda
d <enter>
w <enter>
sudo reboot
Boot Machine from ISO
…
After Booting
Log in with the default credentials: rancher/rancher
Use the following commands to set up the network configuration:
# disable the dhcp settings applied to all ethernet adaptors
sudo ros config set rancher.network.interfaces.eth*.dhcp false
# set a new static network config
sudo ros config set rancher.network.interfaces.eth0.address <ipaddress>/<mask> # e.g. 10.10.10.10/24
sudo ros config set rancher.network.interfaces.eth0.gateway <ipaddress> # e.g. 10.10.10.1
sudo ros config set rancher.network.interfaces.eth0.mtu 1500
# view the new network config
sudo ros config get rancher.network
Reload the networking by finding the ID of the existing networking container and restarting it:
sudo system-docker restart network
Run ip a
to check that the new IP has been assigned on eth0
Ping an external server, e.g. 8.8.8.8, to test network connectivity
Create your cloud config
You can manually create this, we do this once the first time then store it in git. If you need an example, i can paste one in?
We put our SSH key details in here, when the host is built you can connect straight in.
Upload configuration and install
- SCP the cloud-config.yml to the RancherOS host home directory (/home/rancher).
- Ensure that your public key is listed in the ssh_authorized_keys section. If it is not, please add and commit it to all cloud-configs.
#Install RancherOS to the disk
sudo ros install -c cloud-config.yml -d /dev/sda -i rancher/os:v0.4.3
# Add -f to suppress the disk related prompt
# press 'y' to install
Once complete, shutdown the host, unmount the optical drive image and turn the host back on.
RancherOS should come up and you should now be able to SSH into it:
ssh -i <privatekey> rancher@<ip>
This pretty much works for us, hope it’s of use.