diff --git a/Makefile b/Makefile index 9ef41ea5a86f7b4f0a1a20e52f635491c0396515..c044e1c0b9b962d688d4aae16b80629bc3bdaa5a 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,11 @@ check-machine: ## Check your local machine setup to be prepared for the installa .PHONY: cli cli: ## Install koolbox CLI (Contains all tools used in this project) - cd ./cli && make install + cd ./images/koolbox && make install .PHONY: cli-config cli-config: ## Configure koolbox CLI (To setup terraform values as well was tokens) - cd ./cli && make config + cd ./images/koolbox && make config .PHONY: docs docs: cli ## Build and render docs locally @@ -27,15 +27,3 @@ docs: cli ## Build and render docs locally .PHONY: validate validate: ./scripts/validate.sh - -.PHONY: deploy -deploy: check-machine ## Deploy infrastructure on Hetzner Cloud - cd ./terraform && make apply - date - sleep 300 - make kubernetes-install - -.PHONY: destroy -destroy: check-machine ## Destroy infrastructure on Hetzner Cloud - cd ./terraform && make destroy - for i in cp0{1..3}.$(TF_VAR_dns_domain); do ssh-keygen -R "$$i"; done diff --git a/cli/Makefile b/cli/Makefile deleted file mode 100644 index 3d84b6274ec11b5106fb1eaad79ff13b1c745d87..0000000000000000000000000000000000000000 --- a/cli/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -.DEFAULT_GOAL := help - -XDG_CONFIG_HOME ?= $(HOME)/.config -EDITOR ?= "vi" - -# Do not adjust. -KOOLBOX_IMAGE = "quay.io/sheogorath/koolbox:latest" - -include ../utils/help.mk - -.PHONY: preflight -preflight: - # Check for required tools - command -v podman > /dev/null - -.PHONY: install -install: preflight build-if-not-exists ## Install koolbox, the Kubernetes Toolbox for SI-Infrastructure - install -m 755 ./koolbox ~/bin/koolbox - -.PHONY: build -build: preflight ## Build container locally instead of using one from upstream - podman build -t $(KOOLBOX_IMAGE) . - -.PHONY: build-if-not-exists -build-if-not-exists: preflight - podman image exists $(KOOLBOX_IMAGE) || make build - -.PHONY: config -config: ## Edit your koolbox environment config - mkdir -p "${XDG_CONFIG_HOME}/koolbox/" - ${EDITOR} "${XDG_CONFIG_HOME}/koolbox/env" diff --git a/images/.utils/gitlab-ci.yaml b/images/.utils/gitlab-ci.yaml index 6c0537c39c077c30ca4b719982f5ad95d20c999c..1063877c01b309fed74af6d3168124ab6949b5d7 100644 --- a/images/.utils/gitlab-ci.yaml +++ b/images/.utils/gitlab-ci.yaml @@ -4,6 +4,7 @@ - IMAGE: - dovecot - postfix + - koolbox container-build: diff --git a/images/koolbox/.release b/images/koolbox/.release new file mode 100644 index 0000000000000000000000000000000000000000..85f180f38cd7bb8259cfadf2e12bfde62fc8f99d --- /dev/null +++ b/images/koolbox/.release @@ -0,0 +1 @@ +release=0.1.0 diff --git a/cli/Dockerfile b/images/koolbox/Dockerfile similarity index 100% rename from cli/Dockerfile rename to images/koolbox/Dockerfile diff --git a/images/koolbox/Makefile b/images/koolbox/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..b3ce0f42492b2f05368906f5371f7f10f7263da3 --- /dev/null +++ b/images/koolbox/Makefile @@ -0,0 +1,21 @@ +.DEFAULT_GOAL := help + +XDG_CONFIG_HOME ?= $(HOME)/.config +EDITOR ?= "vi" + +include ../.utils/container-build.mk +include ../../utils/help.mk + +.PHONY: preflight +preflight: + # Check for required tools + command -v podman > /dev/null + +.PHONY: install +install: preflight build ## Install koolbox, the Kubernetes Toolbox for SI-Infrastructure + install -m 755 ./koolbox ~/bin/koolbox + +.PHONY: config +config: ## Edit your koolbox environment config + mkdir -p "${XDG_CONFIG_HOME}/koolbox/" + ${EDITOR} "${XDG_CONFIG_HOME}/koolbox/env" diff --git a/cli/README.md b/images/koolbox/README.md similarity index 100% rename from cli/README.md rename to images/koolbox/README.md diff --git a/cli/koolbox b/images/koolbox/koolbox similarity index 96% rename from cli/koolbox rename to images/koolbox/koolbox index 8b49d2adfbe8b43a711048accb200f444d0639d8..784bb22d793e45c4abc6195e630163b884c23ddd 100755 --- a/cli/koolbox +++ b/images/koolbox/koolbox @@ -31,4 +31,4 @@ podman run --rm -it \ -v "$CONFIG_DIR/helm:/root/.cache/helm:z" \ -v "$DATA_DIR/helm:/root/.local/share/helm:z" \ -v "$(pwd):/workspace:z" -w /workspace \ - quay.io/sheogorath/koolbox:latest $@ + quay.io/shivering-isles/koolbox:latest $@ diff --git a/cli/koolbox.dummy b/images/koolbox/koolbox.dummy similarity index 100% rename from cli/koolbox.dummy rename to images/koolbox/koolbox.dummy