-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
53 lines (41 loc) · 1.95 KB
/
Makefile
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
#### Variables ####
export ROOT_DIR ?= $(PWD)
export 5GC_ROOT_DIR ?= $(ROOT_DIR)
export HOSTS_INI_FILE ?= $(5GC_ROOT_DIR)/hosts.ini
export EXTRA_VARS ?= "@$(5GC_ROOT_DIR)/vars/main.yml"
#### a. Debugging ####
5gc-debug:
ansible-playbook -i $(HOSTS_INI_FILE) $(5GC_ROOT_DIR)/debug.yml \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
5gc-pingall:
ansible-playbook -i $(HOSTS_INI_FILE) $(5GC_ROOT_DIR)/pingall.yml \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
#### b. Provision k8s ####
5gc-install: 5gc-router-install 5gc-sriov-install 5gc-core-install
5gc-uninstall: 5gc-core-uninstall 5gc-router-uninstall
#### c. Provision router ####
5gc-router-install:
ansible-playbook -i $(HOSTS_INI_FILE) $(5GC_ROOT_DIR)/router.yml --tags install \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
5gc-router-uninstall:
ansible-playbook -i $(HOSTS_INI_FILE) $(5GC_ROOT_DIR)/router.yml --tags uninstall \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
#### d. Provision sriov ####
5gc-sriov-install:
ansible-playbook -i $(HOSTS_INI_FILE) $(5GC_ROOT_DIR)/sriov.yml --tags install \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
#### e. Provision core ####
5gc-core-install:
ansible-playbook -i $(HOSTS_INI_FILE) $(5GC_ROOT_DIR)/core.yml --tags install \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
5gc-core-uninstall:
ansible-playbook -i $(HOSTS_INI_FILE) $(5GC_ROOT_DIR)/core.yml --tags uninstall \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
5gc-core-reset: 5gc-core-uninstall 5gc-core-install
#### f. Provision Multiple UPF ###
5gc-upf-install:
ansible-playbook -i $(HOSTS_INI_FILE) $(5GC_ROOT_DIR)/upf.yml --tags install \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
5gc-upf-uninstall:
ansible-playbook -i $(HOSTS_INI_FILE) $(5GC_ROOT_DIR)/upf.yml --tags uninstall \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)