@@ -34,7 +34,10 @@ help: ## Display this help message
3434 @echo -e ' \n${COLOUR_RED}Usage: make <command>${COLOUR_END}'
3535 @cat $(MAKEFILE_LIST ) | grep ' ^[a-zA-Z]' | \
3636 awk -F ' :.*?## ' ' NF==2 {printf " %-26s%s\n\n", $$1, "${COLOUR_GREEN}"$$2"${COLOUR_END}"}'
37- @echo -e ' ${COLOUR_RED}OSISM helperscript usage: make <command>${COLOUR_END}'
37+ @echo -e ' ${COLOUR_RED}Container related commands${COLOUR_END}'
38+ @cat $(MAKEFILE_LIST ) | grep ' ^[a-zA-Z]' | \
39+ awk -F ' :.*?#container# ' ' NF==2 {printf " %-26s%s\n\n", $$1, "${COLOUR_GREEN}"$$2"${COLOUR_END}"}'
40+ @echo -e ' ${COLOUR_RED}OSISM helperscripts${COLOUR_END}'
3841 @cat $(MAKEFILE_LIST ) | grep ' ^[a-zA-Z]' | \
3942 awk -F ' :.*?#osism# ' ' NF==2 {printf " %-26s%s\n\n", $$1, "${COLOUR_GREEN}"$$2"${COLOUR_END}"}'
4043
@@ -66,53 +69,55 @@ check-radoslib: ## Checks if radoslib is installed and if it contains the right
6669 ./scripts/check_local_rados_lib_installation.sh ${RADOSLIB_VERSION}
6770
6871.PHONY : build-local-rookify
69- build-local-rookify : # # This builds rookify into .venv/bin/rookify
72+ build-local-rookify : setup # # This builds rookify into .venv/bin/rookify
7073 source .venv/bin/activate && pip install -e .
7174
72- .PHONY : build-container
73- build-container : # # Build container from Dockerfile, add e.g. ROOKIFY_VERSION=0.0.1 to specify the version. Default value is 0.0.0.dev1
74- ${CONTAINERCMD} build --build-arg ROOKIFY_VERSION=$(ROOKIFY_VERSION ) --target rookify -t rookify:latest -f Dockerfile .
75-
7675.PHONY : run-local-rookify
77- run-local-rookify : # # Runs rookify in the local development environment (requires setup-venv)
78- source ./.venv/bin/activate && pip install -e . && rookify
79-
80- .PHONY : run-rookify
81- run-rookify : # # Runs rookify in the container
82- docker exec -it rookify-dev /app/rookify/.venv/bin/rookify
83-
84- .PHONY : get-testbed-configs-for-rookify-testing
85- get-testbed-configs-for-rookify-testing : # # Gets the needed config (like .kube, /etc/ceph and so on) from the testbed
86- bash ./scripts/get_configs_from_testbed.sh
76+ run-local-rookify : build-local-rookify # # Runs rookify in the local development environment (requires setup-venv)
77+ ./.venv/bin/rookify
8778
8879.PHONY : run-tests-locally
89- run-tests-locally : # # Runs the tests in the tests directory. NB: check that your local setup is connected through vpn to the testbed!
80+ run-tests-locally : setup-venv # # Runs the tests in the tests directory. NB: check that your local setup is connected through vpn to the testbed!
9081 .venv/bin/python -m pytest
9182
83+ # #
84+ # Add container related commands here (so they appear below the container header)
85+ # Note: use #container# so command appear under header in menu
86+ # #
87+
9288.PHONY : run-tests
93- run-tests : up # # Runs the tests in the container
89+ run-tests : up # container # Runs the tests in the container
9490 ${CONTAINERCMD} exec -it rookify-dev bash -c " /app/rookify/.venv/bin/python -m pytest"
9591
92+ .PHONY : run-rookify
93+ run-rookify : up # container# Runs rookify in the container
94+ ${CONTAINERCMD} exec -it rookify-dev /app/rookify/.venv/bin/rookify
95+
9696.PHONY : enter
97- enter : # # Enter the container
97+ enter : up # container # Enter the container
9898 ${CONTAINERCMD} exec -it rookify-dev bash
9999
100100.PHONY : logs
101- logs : # # Logs the container
101+ logs : # container # Logs the container
102102 ${CONTAINERCMD} logs -f rookify-dev
103103
104104.PHONY : down
105- down : # # Remove the containers as setup by docker-compose.yml
105+ down : # container # Remove the containers as setup by docker-compose.yml
106106 ${CONTAINERCMD} compose down
107107
108108.PHONY : up
109- up : # # Sets up the container as specified in docker-compose.yml and opens a bash terminal
109+ up : # container # Sets up the container as specified in docker-compose.yml and opens a bash terminal
110110 ${CONTAINERCMD} compose up -d
111111
112+ .PHONY : build-container
113+ build-container : # container# Build container from Dockerfile only, add e.g. ROOKIFY_VERSION=0.0.1 to specify the version. Default value is 0.0.0.dev1
114+ ${CONTAINERCMD} build --build-arg ROOKIFY_VERSION=$(ROOKIFY_VERSION ) --target rookify -t rookify:latest -f Dockerfile .
115+
112116# #
113- # Add osism specific scripts below here (so they appear below helper header)
117+ # Add osism specific scripts below here
118+ # Note: use #osism# so command appear under header in menu
114119# #
115120
116121.PHONY : get-config
117122get-config : # osism# Gets configuration files from the OSISM testbed
118- ./scripts/osism/get_osism_configs_from_testbed .sh
123+ ./scripts/osism/get_configs_from_testbed .sh
0 commit comments