-
-
Save mybigman/45282cd0fe637a855147362ca26f45a4 to your computer and use it in GitHub Desktop.
Example RancherOS configuration
This file contains hidden or 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: host-0815 | |
ssh_authorized_keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDA61LSHA7iU+82Z2qypYLx2gB9uHydUOoDON30ceAKl5dSgzShtF5XS5sqABYBMowDcvdkNyUDdt1Druv82iu/scATLFmxTQ8R2XIL33dMO6IpBg0d3WQcU5Xqeor9s5LTpln7F0V+9vaYG/nXqQtnz4PEnZGA+f9ddHuvcDajqKLNTDyriL87E6HAfjNU+1ShI2Qv8Zqhq8rYW0zkn2C+4vVKpgzq8B91R7hSXZwUTU9+bIq3uqTfe/t9/5hFNZEUo/ezV25DFvWDmvKcXt1QRoLxL/NI7h00fEJY7QVh2eevtiA9BdthI2LHx2tm2LoMYHQVZUVljm033xh2UISx | |
runcmd: | |
- echo "true" > /home/rancher/provisioned | |
write_files: | |
- path: /etc/docker/certs.d/private-registry.internal/ca.crt | |
permissions: "0644" | |
owner: root | |
content: | | |
-----BEGIN CERTIFICATE----- | |
MIICKzCCAdWgAwIBAgIJAIMGUj8Nj8nNMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV | |
BAYTAkRFMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX | |
aWRnaXRzIFB0eSBMdGQwHhcNMTgxMTI4MTg0OTUwWhcNMjAxMTI3MTg0OTUwWjBF | |
MQswCQYDVQQGEwJERTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 | |
ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALL7 | |
789lpQLardPKcuFGAWE9+NwEqjogccYCNzTHVEeuaTfkzUEQkwfc2CdpLDjimeTd | |
mZlBlAC89PDRpQlLd7ECAwEAAaOBpzCBpDAdBgNVHQ4EFgQUhR930x7NxpBnUucH | |
MXNbJgwLno8wdQYDVR0jBG4wbIAUhR930x7NxpBnUucHMXNbJgwLno+hSaRHMEUx | |
CzAJBgNVBAYTAkRFMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRl | |
cm5ldCBXaWRnaXRzIFB0eSBMdGSCCQCDBlI/DY/JzTAMBgNVHRMEBTADAQH/MA0G | |
CSqGSIb3DQEBBQUAA0EAoKHUppdUCyrMZLRJsrm/pnLq5WqFysT39976/vQvOiP6 | |
+23OO/Qf3vJZo59MEE2B3hJl0UfkNXobQyDun9gySw== | |
-----END CERTIFICATE----- | |
mounts: | |
# Mount NFS4 share | |
# Note: Mount paths for nfs/nfs4 mounts are created automatically. | |
- ["<nfs_4_server_ip>:/", "/mnt/nfs", "nfs4", "<optional mount options>"] | |
# Note: If disk is not pre-formatted, use `runcmd` cloud-config directive to create filesystem | |
# Note: Mount path needs to exist. Use `runcmd` to create if necessary. | |
- ["/dev/nvme0n1p1","/mnt/data","ext4","<optional mount options>"] | |
rancher: | |
network: | |
dns: | |
nameservers: | |
- 1.1.1.1 | |
- 1.0.0.1 | |
override: true # Override DHCP assigned nameservers | |
interfaces: | |
eth0: | |
dhcp: true | |
eth1: | |
dhcp: false | |
address: 172.68.1.100/24 | |
gateway: 172.68.1.1 | |
mtu: 1500 | |
vlans: 100 | |
services: | |
custom-service: | |
image: nginx | |
ports: | |
- "80:80" | |
labels: | |
io.rancher.os.scope: system # Remove to run in User Docker | |
docker: | |
registry_mirror: "https://mirror.gcr.io" | |
extra_args: ['--bip=172.20.0.1/16','--fixed-cidr=172.20.0.0/17'] | |
engine: docker-17.03.2-ce | |
system_docker: | |
# Configure registry mirror (pull through cache) for System Docker | |
# Ref: https://docs.docker.com/registry/recipes/mirror/ | |
registry_mirror: "http://10.10.10.23:5555" | |
sysctl: | |
vm.max_map_count: 262144 | |
registry_auths: | |
https://index.docker.io/v1/: | |
username: me | |
password: secret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment