-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·72 lines (54 loc) · 1.9 KB
/
Copy pathMakefile
File metadata and controls
executable file
·72 lines (54 loc) · 1.9 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.DEFAULT_GOAL := help
CLUSTER_NAME ?= ans-$(shell whoami)
RESOURCE_GROUP ?= ans-$(shell whoami)-rg
EXTRA_VARS ?= --extra-vars "azr_aro_cluster=$(CLUSTER_NAME) azr_resource_group=$(RESOURCE_GROUP)"
VIRTUALENV ?= "./virtualenv/"
PYTHON ?= python3.12
ANSIBLE = $(VIRTUALENV)/bin/ansible-playbook $(EXTRA_VARS)
.PHONY: help
help:
@echo GLHF
.PHONY: virtualenv
virtualenv:
LC_ALL=en_US.UTF-8 $(PYTHON) -m venv $(VIRTUALENV)
. $(VIRTUALENV)/bin/activate
$(VIRTUALENV)/bin/python -m pip install pip --upgrade
LC_ALL=en_US.UTF-8 $(VIRTUALENV)/bin/python -m pip install -r requirements.txt
$(VIRTUALENV)/bin/ansible-galaxy collection install -r collections/requirements.yml --force
$(VIRTUALENV)/bin/python -m pip install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements.txt
.PHONY: help
# docker.image:
# docker build -t quay.io/pczar/ansible-rosa .
# docker.image.push:
# docker push quay.io/pczar/ansible-rosa
# docker.image.pull:
# docker pull quay.io/pczar/ansible-rosa
# # docker shortcuts
# build: docker.image
# image: docker.image
# push: docker.image.push
# pull: docker.image.pull
create:
$(ANSIBLE) -v create-cluster.yaml
delete:
$(ANSIBLE) -v delete-cluster.yaml
create.private:
$(ANSIBLE) -v create-cluster.yaml -i ./environment/private/hosts
delete.private:
$(ANSIBLE) -v delete-cluster.yaml -i ./environment/private/hosts
create.mobb-infra-aro:
$(ANSIBLE) -v create-cluster.yaml -i ../mobb-infra/aro/hosts
pull-secret:
$(ANSIBLE) -v pull-secret.yaml
# docker.create: image
# docker run --rm \
# -v $(HOME)/.ocm.json:/home/ansible/.ocm.json \
# -v $(HOME)/.aws:/home/ansible/.aws \
# -ti quay.io/pczar/ansible-rosa \
# $(ANSIBLE) -v create-cluster.yaml
# docker.delete: image
# docker run --rm \
# -v $(HOME)/.ocm.json:/home/ansible/.ocm.json \
# -v $(HOME)/.aws:/home/ansible/.aws \
# -ti quay.io/pczar/ansible-rosa \
# $(ANSIBLE) -v delete-cluster.yaml