From 3433a7c04627896f9c2ef7e6128e52082f114693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 7 Jan 2019 08:10:30 +0100 Subject: [PATCH] Improve make commands documentation --- Makefile | 2 +- deploy/Makefile | 2 +- deploy/k8s/Makefile | 16 +++++++++++----- deploy/local/Makefile | 4 ++-- docs/k8s.rst | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 60324ce..0f549bd 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ USERID ?= $$(id -u) build: ## Build all docker images cd build/ && make build -config.json: +config.json: ## Generate config.json configuration file interactively @$(MAKE) -s upgrade-to-tutor @$(MAKE) -s -C build/ build-configurator 1> /dev/null @docker run --rm -it \ diff --git a/deploy/Makefile b/deploy/Makefile index c57a6d1..d1870e1 100644 --- a/deploy/Makefile +++ b/deploy/Makefile @@ -1,5 +1,5 @@ .PHONY: env PWD = $$(pwd) -env: ## Create the platform environment +env: ## Generate the environment from templates and configuration values @$(MAKE) -s -C .. substitute TEMPLATES=$(PWD)/templates OUTPUT=$(PWD)/env diff --git a/deploy/k8s/Makefile b/deploy/k8s/Makefile index c657165..256986a 100644 --- a/deploy/k8s/Makefile +++ b/deploy/k8s/Makefile @@ -6,11 +6,11 @@ podexec = kubectl exec -n openedx -it $$($(call podname,$(1))) -- $(2) all: configure deploy databases ## Provision a full platform from scratch -configure: +configure: ## Interactive configuration @$(MAKE) -s -C ../.. --always-make config.json @$(MAKE) -s env -env: +env: ## Generate the environment from templates and configuration values @$(MAKE) -s -C .. env @$(MAKE) -s -C ../.. substitute TEMPLATES=$(PWD)/templates OUTPUT=$(PWD)/env @@ -96,8 +96,14 @@ create-staff-user: ## Create a user with admin rights: make create-staff-user US ##################### Various minikube command -minikube-open: - minikube service nginx --namespace=openedx +minikube-start: ## Start minikube + minikube start +minikube-stop: ## Stop minikube + minikube stop +minikube-dashboard: ## Open the minikube dashboard + minikube dashboard +minikube-ingress: ## Enable the ingress addon + minikube addons enable ingress ##################### Various k8s commands @@ -114,6 +120,6 @@ k8s-admin-token: ## Print the admin token required to log in the dashboard ESCAPE =  help: ## Print this help - @grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \ + @grep -E '^([a-zA-Z0-9_-]+:.*?## .*|######* .+)$$' Makefile \ | sed 's/######* \(.*\)/\n $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' \ | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/deploy/local/Makefile b/deploy/local/Makefile index 971fe9b..5af1246 100644 --- a/deploy/local/Makefile +++ b/deploy/local/Makefile @@ -46,11 +46,11 @@ update: ## Download most recent images ##################### Configuration -configure: +configure: ## Interactive configuration @$(MAKE) -s -C ../.. --always-make config.json @$(MAKE) -s env -env: +env: ## Generate the environment from templates and configuration values @$(MAKE) -s -C .. env @$(MAKE) -s -C ../.. substitute TEMPLATES=$(PWD)/templates OUTPUT=$(PWD) diff --git a/docs/k8s.rst b/docs/k8s.rst index f0db67e..127e512 100644 --- a/docs/k8s.rst +++ b/docs/k8s.rst @@ -23,7 +23,7 @@ In the following, we assume you have a working Kubernetes platform. For a start, Start Minikube:: - minikube start + make minikube-start When minikube starts, it spawns a virtual machine (VM) which you can configure in your VM manager: on most platforms, this is Virtualbox. You should configure your VM to have at least 4Gb RAM; otherwise, database migrations will crash halfway, and that's a nasty issue...