You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
938 B

  1. #!/usr/bin/env bash
  2. set -e
  3. AZURE_RESOURCE_GROUP="$1"
  4. if [ "$AZURE_RESOURCE_GROUP" == "" ]; then
  5. echo "AZURE_RESOURCE_GROUP is missing"
  6. exit 1
  7. fi
  8. if az &>/dev/null; then
  9. echo "azure cli 2.0 found, using it instead of 1.0"
  10. ./apply-rg_2.sh "$AZURE_RESOURCE_GROUP"
  11. elif azure &>/dev/null; then
  12. ansible-playbook generate-templates.yml
  13. azure group deployment create -f ./.generated/network.json -g $AZURE_RESOURCE_GROUP
  14. azure group deployment create -f ./.generated/storage.json -g $AZURE_RESOURCE_GROUP
  15. azure group deployment create -f ./.generated/availability-sets.json -g $AZURE_RESOURCE_GROUP
  16. azure group deployment create -f ./.generated/bastion.json -g $AZURE_RESOURCE_GROUP
  17. azure group deployment create -f ./.generated/masters.json -g $AZURE_RESOURCE_GROUP
  18. azure group deployment create -f ./.generated/minions.json -g $AZURE_RESOURCE_GROUP
  19. else
  20. echo "Azure cli not found"
  21. fi