From 272d966d947d761dd442929777e60b917b802fc5 Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" Date: Tue, 16 Aug 2016 22:59:58 -0700 Subject: [PATCH 1/2] Separate the build recipe in federation Makefile into separate phases. --- federation/Makefile | 48 ++++++++++++++++++++++++++++++++++++++++++-- federation/README.md | 17 +--------------- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/federation/Makefile b/federation/Makefile index 2cac8af9b6b..091f8021202 100644 --- a/federation/Makefile +++ b/federation/Makefile @@ -21,6 +21,50 @@ else MAKEFLAGS += -s endif +.PHONY: all +all: init build push deploy + +.PHONY: init +init: + ./develop/develop.sh init + .PHONY: build -build: - ./build.sh $(do) +build: build_binaries build_image + +.PHONY: push +push: + ./develop/develop.sh push + +.PHONY: deploy +deploy: deploy_clusters deploy_federation + +.PHONY: destroy +destroy: destroy_federation destroy_clusters + +.PHONY: build_binaries +build_binaries: + ./develop/develop.sh build_binaries + +.PHONY: build_image +build_image: + ./develop/develop.sh build_image + +.PHONY: deploy_clusters +deploy_clusters: + ./develop/develop.sh deploy_clusters + +.PHONY: deploy_federation +deploy_federation: + ./develop/develop.sh deploy_federation + +.PHONY: destroy_federation +destroy_federation: + ./develop/develop.sh destroy_federation + +.PHONY: destroy_clusters +destroy_clusters: + ./develop/develop.sh destroy_clusters + +.PHONY: redeploy_federation +redeploy_federation: + ./develop/develop.sh redeploy_federation diff --git a/federation/README.md b/federation/README.md index f85c20137df..e89a10310f4 100644 --- a/federation/README.md +++ b/federation/README.md @@ -57,22 +57,7 @@ make destroy # Ideas for improvement -1. Split the `build` phase (make recipe) into multiple phases: - 1. `init`: pull installer images - 2. `build-binaries` - 3. `build-docker` - 4. `build`: build-binary + build-docker - 5. `push`: to push the built images - 6. `genconfig` - 7. `deploy-clusters` - 8. `deploy-federation` - 9. `deploy`: deploy-clusters + deploy-federation - 10. `destroy-federation` - 11. `destroy-clusters` - 12. `destroy`: destroy-federation + destroy-clusters - 13. `redeploy-federation`: just redeploys the federation components. - -2. Continue with `destroy` phase even in the face of errors. +1. Continue with `destroy` phase even in the face of errors. The bash script sets `set -e errexit` which causes the script to exit at the very first error. This should be the default mode for deploying From 9989d5d483c033c07ec103b157fb2abfc0bac04c Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" Date: Mon, 29 Aug 2016 14:17:18 -0700 Subject: [PATCH 2/2] Federation README typo fix. --- federation/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/federation/README.md b/federation/README.md index e89a10310f4..38d5b021b45 100644 --- a/federation/README.md +++ b/federation/README.md @@ -35,7 +35,7 @@ make push To initialize the deployment run: -(This pull the installer images) +(This pulls the installer images) ```shell make init