cloud-init
Ubuntu
#cloud-config
# This is the cloud-init configuration file
# Set hostname
hostname: testcloudinit
fqdn: testcloudinit.local
# Manage users and groups
users:
- name: ubuntu
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, admin
home: /home/ubuntu
shell: /bin/bash
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDm6+LrQaZwJozJUa5me7LYToR7ZbRL2Ui0yzvcflv65nLjNRuNMy/Ljcor2GQ/UoPtVjv+8959O9BI+E3QE2quDEVQn5LWTkDiEaSpEyRUs+0jNDFmqc/a25s5acGaJkcwoTFdrvMF8HEBoqnvQCpjkcpiCg5157o3WG5uk7i38RSzcEKFqRFZYMoqkNAd3bZUtywkksZpTxlXHsmrZoZ7z/wOK8lFRKpReOODdJb5zQtlTvqNDToJ0x5GfRpLRQP7XdXZJjb7+tBEp8QzKInS/TLM1WjTTyUmMFenR9xOArBOgFAlOBqgIGBYt4Fu/pW26RE26N0eV9eufpFVgEf5tv6sdkAEscd3w49oUp94evQDdsoyhnSezZLBFjoY20e2PkcCKh9UOZzXdj7Pru7gfagm/dcBscUZLgEIyi89F9ZeTnWjgsK4CivAllMVAxQU7+3slKe20YWN1gOo2+lCwjLyx88e34KHt+UvUiZyXDI41z8INNs4gXs8hygJXqGyc5IZ+50RKRNwLpI9rXxn5U13y/EspVWH9vLJAvzsvEeGVZ/GawHFEW8aEJOn65bHgZkzycdZm2HheZ152UG/zS6RFvPrZ1Mac8HDYwkoVXSzyPWzasTUxj6cnwxTPJnu+F7mLn1GKVAkshV7uJGdoXbFUU1Ke6MqAEMUJjLCKQ== purex230@dentropydaemon.io
apt:
sources:
docker.list:
source: deb [arch=amd64] https://download.docker.com/linux/ubuntu $RELEASE stable
keyid: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
# Update all packages on first boot
package_update: true
package_upgrade: true
# Install packages
packages:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- build-essential
- git
- rsync
- htop
- curl
- unzip
- awscli
- vim
- resolvconf
- wireugard
- openvpn
- python3-pip
- tmux
- traceroute
- cifs-utils
- traceroute
- ncdu
- jq
- ripgrep
- net-tools
- glances
- docker-ce
- docker-ce-cli
- containerd.io
# Run commands
runcmd:
- echo "Hello, cloud-init!" > /tmp/testfile
# Write out arbitrary files
write_files:
- path: /etc/motd
content: |
Welcome to your Ubuntu instance managed by cloud-init!
# create the docker group
groups:
- docker
# Add default auto created user to docker group
system_info:
default_user:
groups: [docker]
# Configure the timezone
timezone: America/New_York