-
-
Save faddat/33c9fdfb5e6d7f960049 to your computer and use it in GitHub Desktop.
RancherOS iPXE boot script and cloud-config. Ramdisk based deployment with persistent storage on disk. Configures private IP on eth1 from EC2 metadata.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
hostname: rancher-os | |
ssh_authorized_keys: | |
- ssh-rsa AAAABBBBBBCCCCCCC... | |
write_files: | |
- path: /opt/rancher/bin/start.sh | |
permissions: 0700 | |
content: | | |
#!/bin/bash | |
# Configure private network on eth1 | |
sudo netconf | |
rm -- "$0" | |
rancher: | |
cloud_init: | |
datasources: | |
- ec2 | |
network: | |
dns: | |
nameserver: | |
- 8.8.4.4 | |
- 4.2.2.3 | |
interfaces: | |
eth0: | |
dhcp: true | |
eth1: | |
address: $private_ipv4/16 | |
mtu: 1450 | |
state: | |
fstype: auto | |
dev: LABEL=RANCHER_STATE | |
autoformat: | |
- /dev/vda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!ipxe | |
# Boots RangerOS in Ramdisk with persistent storage on disk /dev/vda | |
# Location of Kernel/Initrd images | |
set base-url https://releases.rancher.com/os/latest | |
kernel ${base-url}/vmlinuz rancher.state.autoformat=[/dev/vda] rancher.cloud_init.datasources=[ec2] | |
initrd ${base-url}/initrd | |
boot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment