18F / azure-sandbox

Temporary home for deploying services into Azure: reliably, repeatably, compliantly
Other
17 stars 8 forks source link

Create ARM single node that connects to chef server, sets message of the day. #2

Closed pburkholder closed 8 years ago

pburkholder commented 8 years ago

THIS: https://github.com/Azure/azure-quickstart-templates/tree/master/chef-json-parameters-linux-vm (and https://github.com/chef-partners/azure-chef-extension).

Also: https://github.com/Azure/azure-quickstart-templates/tree/master/multi-vm-chef-template-ubuntu-vm

pburkholder commented 8 years ago

Azure Ruby SDK seems pretty complete: https://github.com/Azure/azure-sdk-for-ruby. Wonder how it compares to AWS in practice.

As for the templates:

# brew install azure-cli
git clone git@github.com:Azure/azure-quickstart-templates.git
cd azure-quickstart-templates
./azure-group-deploy.sh -a multi-vm-chef-template-ubuntu-vm -l eastus
# .. fails because we haven't set parameters
pburkholder commented 8 years ago
  1. get the correct azuredeploy.parameters.json from a secret gist
  2. make sure Chef server doesn't have a client named azjen2client0
  3. Run: ./azure-group-deploy.sh -a chef-json-parameters-linux-vm -l eastus
  4. ssh: ssh azure@azjen2client0.eastus.cloudapp.azure.com

As in:

The authenticity of host 'azjen2client0.eastus.cloudapp.azure.com (40.80.144.11)' can't be established.
ECDSA key fingerprint is SHA256:by5PsJp6xl8RVEcymZ4B3mrhQ4HKu5M4MMHpqSDnT9Q.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'azjen2client0.eastus.cloudapp.azure.com,40.80.144.11' (ECDSA) to the list of known hosts.
azure@azjen2client0.eastus.cloudapp.azure.com's password: (password)
...
Welcome to Azure
azure@azjen2client0:~$ more /etc/motd
Welcome to Azure

Woot.