Makefile 1.13 KB
Newer Older
's avatar
committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
.DEFAULT_GOAL := prepare_demo

VERSION	:= 1.0
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
CUR_DATE := $(shell date +"%s")

PLAYBOOK_FOLDER := playbooks

INVENTORY_FOLDER := inventories

HYPERVISOR_INVENTORY := LFR028762.yml
GCHARBON_INVENTORY := demo.gcharbon.yml

VIRTUAL_INVENTORY := dynamic_inventories/demo_datalab.py

HYPERVISOR_INVENTORY_PATH := "$(INVENTORY_FOLDER)/$(HYPERVISOR_INVENTORY)"
VIRTUAL_INVENTORY_PATH := "$(INVENTORY_FOLDER)/$(VIRTUAL_INVENTORY)"
GCHARBON_INVENTORY_PATH := "$(INVENTORY_FOLDER)/$(GCHARBON_INVENTORY)"

VAULT_ID := --vault-id @prompt


setup_demo:
	ANSIBLE_ROLES_PATH=$(ROOT_DIR)/roles ansible-playbook -i $(HYPERVISOR_INVENTORY_PATH) \
	  $(PLAYBOOK_FOLDER)/demo_init_virt_setup.yml

demo:
	ANSIBLE_ROLES_PATH=$(ROOT_DIR)/roles ansible-playbook -i $(GCHARBON_INVENTORY_PATH) \
          $(PLAYBOOK_FOLDER)/demo_init_virt_setup.yml

update_demo:
	ansible-playbook -i $(HYPERVISOR_INVENTORY_PATH) \
	  $(PLAYBOOK_FOLDER)/demo_update_virt_setup.yml

provision_demo:
	ansible-playbook -i $(VIRTUAL_INVENTORY_PATH) \
	  $(PLAYBOOK_FOLDER)/demo_vm_provisioning.yml