Skip to content

Instantly share code, notes, and snippets.

@peteraritchie
Last active November 14, 2022 16:14
Show Gist options
  • Save peteraritchie/bacbdccfe276a8973314272d2726c8b5 to your computer and use it in GitHub Desktop.
Save peteraritchie/bacbdccfe276a8973314272d2726c8b5 to your computer and use it in GitHub Desktop.
#!/bin/bash
az configure --defaults location=westus
az configure --defaults group="scalesetrg"
az vmss create \
--name webServerScaleSet \
--lb-sku Standard \
--image UbuntuLTS \
--upgrade-policy-mode automatic \
--custom-data cloud-init.yaml \
--admin-username azureuser \
--generate-ssh-keys
#cloud-config
package_upgrade: true
packages:
- nginx
write_files:
- owner: www-data:www-data
- path: /var/www/html/index.html
content: |
Hello world from Virtual Machine Scale Set !
runcmd:
- service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment