NDBoost
By:
NDBoost

Trying to figure out how to use this deployment cloud-config on ubuntu 14.10

November 4, 2014 867 views

Like the title says, for some reason this cloud config doesn't finish.. It creates the user with the right keys the run_cmd doesnt finish nor does the group creation.. What am I missing?

Also how do you specify passwd: the doc's state a password hash but i'm really not sure how to generate such a thing for a linux system.

#cloud-config
users:
  - name: alpha
    groups: sudo
    shell: /bin/zsh
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    ssh-authorized-keys:
      - key1goeshere
groups:
  - npm: [alpha]
packages:
  - git
  - vim
  - zsh
  - htop
run_cmd:
  - curl -sL https://deb.nodesource.com/setup | sudo bash -
  - apt-get install nodejs -y
  - npm set prefix /usr/local
  - chown -R /usr/lib/node/* /usr/local/bin /usr/local/lib
  - chmod -R 2775 /usr/local/lib /usr/local/bin /usr/lib/node/*
1 Answer

The commands do not run as the module should be runcmd not run_cmd One thing that has personally frustrated me when working with cloud-config files is that they are a bit inconsistent about naming.

As for the passwd, it takes a SHA-512 password hash. On a Unix system, you can generate that using:

mkpasswd --method=SHA-512 --rounds=4096
Have another answer? Share your knowledge.