Last active
May 13, 2021 18:51
-
-
Save rnwilson/5a3368c1016f477e197eb5cff9922f96 to your computer and use it in GitHub Desktop.
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 | |
# https://github.com/number5/cloud-init/blob/master/doc/examples/cloud-config.txt | |
package_update: true | |
runcmd: | |
# Docker | |
- curl -fsSL get.docker.com -o /tmp/get-docker.sh && sh /tmp/get-docker.sh | |
- wget https://dl.bintray.com/docker-compose/master/docker-compose-Linux-x86_64 -O /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose | |
# Node.js | |
- wget https://nodejs.org/dist/latest-v10.x/node-v10.6.0-linux-x64.tar.xz -O /tmp/node.tar.xz && tar -C /usr/local -xf /tmp/node.tar.xz --strip-components=1 | |
# Go | |
- wget https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz -O /tmp/go.tar.gz && tar -C /usr/local -xzf /tmp/go.tar.gz | |
- echo PATH=$PATH:/usr/local/go/bin >> /etc/profile.d/env_load.sh | |
- wget -P /etc/skel/ https://rawgit.com/rnwilson/7c6f908da99d7000ccf640eea233bb23/raw/ea797e6149ff3dcb9d9d8d2fd173736173b6fc4a/.bash_aliases | |
- wget -P /etc/skel/ https://rawgit.com/rnwilson/bab242f89dac79bac7cb0747d3cf2960/raw/b3450c6885407b1260b675ca0bde0afe99a598be/.docker_aliases | |
- cp /etc/hosts /etc/hosts.bak | |
- echo 127.0.0.1 localhost.localdomain localhost >> /etc/hosts | |
- echo $(curl http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address) $(curl http://169.254.169.254/metadata/v1/hostname) $(hostname) >> /etc/hosts | |
ssh_authorized_keys: | |
- ssh-rsa | |
users: | |
- name: boss | |
sudo: ['ALL=(ALL) NOPASSWD:ALL'] | |
groups: sudo, docker, adm | |
shell: /bin/bash | |
ssh_authorized_keys: | |
- ssh-rsa | |
#bootcmd: | |
# - echo $(curl http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address) $(curl http://169.254.169.254/metadata/v1/hostname) $(hostname) > /etc/hosts | |
# | |
#final_message: "The system is finally up, after $UPTIME seconds" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment