-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
54 lines (42 loc) · 1.97 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 OAI_ROOT_DIR ?= $(ROOT_DIR)
export ANSIBLE_NAME ?= ansible-oai
export HOSTS_INI_FILE ?= hosts.ini
export EXTRA_VARS ?= ""
#### Start Ansible docker ####
oai-ansible:
export ANSIBLE_NAME=$(ANSIBLE_NAME); \
sh $(OAI_ROOT_DIR)/scripts/ansible ssh-agent bash
#### a. Debugging ####
oai-pingall:
ansible-playbook -i $(HOSTS_INI_FILE) $(OAI_ROOT_DIR)/pingall.yml \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
#### b. Provision docker ####
oai-docker-install:
ansible-playbook -i $(HOSTS_INI_FILE) $(OAI_ROOT_DIR)/docker.yml --tags install \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
oai-docker-uninstall:
ansible-playbook -i $(HOSTS_INI_FILE) $(OAI_ROOT_DIR)/docker.yml --tags uninstall \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
oai-router-install:
ansible-playbook -i $(HOSTS_INI_FILE) $(OAI_ROOT_DIR)/router.yml --tags install \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
oai-router-uninstall:
ansible-playbook -i $(HOSTS_INI_FILE) $(OAI_ROOT_DIR)/router.yml --tags uninstall \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
oai-gnb-start:
ansible-playbook -i $(HOSTS_INI_FILE) $(OAI_ROOT_DIR)/gNb.yml --tags start \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
oai-gnb-stop:
ansible-playbook -i $(HOSTS_INI_FILE) $(OAI_ROOT_DIR)/gNb.yml --tags stop \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
oai-uesim-start:
ansible-playbook -i $(HOSTS_INI_FILE) $(OAI_ROOT_DIR)/uEsimulator.yml --tags start \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
oai-uesim-stop:
ansible-playbook -i $(HOSTS_INI_FILE) $(OAI_ROOT_DIR)/uEsimulator.yml --tags stop \
--extra-vars "ROOT_DIR=$(ROOT_DIR)" --extra-vars $(EXTRA_VARS)
# run oai-docker-install before running setup
oai-gnb-install: oai-docker-install oai-router-install oai-gnb-start
oai-gnb-uninstall: oai-gnb-stop oai-router-uninstall