JokerQyou
5/4/2019 - 5:12 AM

Cloud-init user data to install some fundamental components

Cloud-init user data to install some fundamental components

#cloud-config

runcmd:
  - curl -fsSL https://get.docker.com | sh
  - curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  - chmod +x /usr/local/bin/docker-compose
  - ln -s /usr/local/bin/docker-compose /usr/local/bin/dc
  - apt-get install -y zsh git

groups:
  - ubuntu: [ docker ]

users:
  - name: <place your username here>
    primary-group: <place your username here>
    groups: [ sudo, docker ]
    sudo: [ "ALL=(ALL) NOPASSWD:ALL" ]  # delete this line if you don't need passwordless sudo access
    shell: /usr/bin/zsh  # change to whatever shell you need
    ssh-authorized-keys:
    - <place your ssh pubkey content here ... ssh-rsa ...>