Created
December 5, 2020 20:54
-
-
Save frezbo/e124b2c57b407b99aaff5cf82d50721d to your computer and use it in GitHub Desktop.
LongHorn on K3s on FlatCar on DigitalOcean
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
| { | |
| "ignition": { | |
| "version": "2.1.0" | |
| }, | |
| "storage": { | |
| "files": [ | |
| { | |
| "filesystem": "root", | |
| "path": "/etc/modules-load.d/iscsi_tcp.conf", | |
| "mode": 420, | |
| "contents": { | |
| "source": "data:,iscsi_tcp" | |
| } | |
| } | |
| ] | |
| }, | |
| "systemd": { | |
| "units": [ | |
| { | |
| "name": "locksmithd.service", | |
| "mask": true | |
| }, | |
| { | |
| "name": "update-engine.service", | |
| "enabled": true | |
| }, | |
| { | |
| "name": "iscsid-initiatorname.service", | |
| "dropins": [ | |
| { | |
| "name": "iscsi-initiatorname.conf", | |
| "contents": "[Install]\n\tWantedBy=multi-user.target\n" | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "iscsid-initiatorname.service", | |
| "enabled": true | |
| }, | |
| { | |
| "name": "install-opt-dir.service", | |
| "enabled": true, | |
| "contents": "[Unit]\n\tDescription=Install /opt directories\n\tConditionPathIsDirectory=!/opt/libexec\n\tConditionPathIsDirectory=!/opt/libexec.wd\n\n[Service]\n\tType=oneshot\n\tExecStart=/usr/bin/mkdir -p /opt/libexec /opt/libexec.wd\n\n[Install]\n\tWantedBy=multi-user.target\n" | |
| }, | |
| { | |
| "name": "usr-libexec.mount", | |
| "enabled": true, | |
| "contents": "[Unit]\n\tDescription=Allow k8s CNI plugins to be installed\n\tBefore=local-fs.target\n\tRequires=install-opt-dir.service\n\tConditionPathExists=/opt/libexec\n\tConditionPathExists=/opt/libexec.wd\n[Mount]\n\tType=overlay\n\tWhat=overlay\n\tWhere=/usr/libexec\n\tOptions=lowerdir=/usr/libexec,upperdir=/opt/libexec,workdir=/opt/libexec.wd\n[Install]\n\tWantedBy=local-fs.target\n" | |
| }, | |
| { | |
| "name": "install-k3s.service", | |
| "enabled": true, | |
| "contents": "[Unit]\n\tDescription=Install k3s\n\tRequires=usr-libexec.mount\n\tConditionPathExists=!/etc/.k3s-installed\n[Service]\n\tType=oneshot\n\tEnvironment=INSTALL_K3S_BIN_DIR=/opt/bin INSTALL_K3S_SELINUX_WARN=true K3S_TOKEN=0pH3wFBZOu6a8v0zaJ29ZBCHy0BWG6HVvT5FvKtmFhMLOVcVBae56iU814A2VSoz23Mr4Y INSTALL_K3S_EXEC=\"server --cluster-init --disable local-storage\"\n\tExecStart=/usr/bin/mkdir -p /opt/bin\n\tExecStart=/usr/bin/curl -sfSL -o /tmp/k3s.sh https://get.k3s.io\n\tExecStart=/usr/bin/chmod +x /tmp/k3s.sh\n\tExecStart=/tmp/k3s.sh\n\tExecStart=/usr/bin/touch /etc/.k3s-installed\n[Install]\n\tWantedBy=multi-user.target\n" | |
| } | |
| ] | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The K3S token in the gist is a dummy one, so no dice to honkers 😉 /goose 🦢