a423607000
Introduces Airship in pod. This includes: * A base image which sets up common requirements * An image for the libvirt service * An image for building a specified instance of airshipctl * An image for initializing the various libvirt infrastructure required for a deployment * An image which runs the deployment scripts Closes: #313 Change-Id: Ib1114350190b0fe0c0761ff67b38b3eca783161a
40 lines
1.1 KiB
Makefile
40 lines
1.1 KiB
Makefile
IMAGE_REGISTRY ?= quay.io/airshipit
|
|
IMAGES := infra-builder airshipctl-builder runner
|
|
IMAGE_TAG ?= latest
|
|
|
|
PUSH_IMAGES ?= false
|
|
|
|
.PHONY: help base libvirt $(IMAGES) build test
|
|
|
|
SHELL:=/bin/bash
|
|
.ONESHELL:
|
|
|
|
help: ## This help.
|
|
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
|
|
|
build: base
|
|
build: libvirt
|
|
build: $(IMAGES) ## Build the containers.
|
|
|
|
base:
|
|
docker build --tag ianhowell/base:$(IMAGE_TAG) --build-arg BASE_IMAGE=ubuntu:20.04 ./base
|
|
ifeq (true, $(PUSH_IMAGES))
|
|
docker push ianhowell/base:$(IMAGE_TAG)
|
|
endif
|
|
|
|
libvirt:
|
|
docker build --tag ianhowell/libvirt:$(IMAGE_TAG) ./libvirt
|
|
ifeq (true, $(PUSH_IMAGES))
|
|
docker push ianhowell/libvirt:$(IMAGE_TAG)
|
|
endif
|
|
|
|
$(IMAGES):
|
|
docker build --tag $(IMAGE_REGISTRY)/aiap-$@:$(IMAGE_TAG) ./$@
|
|
ifeq (true, $(PUSH_IMAGES))
|
|
docker push $(IMAGE_REGISTRY)/aiap-$@:$(IMAGE_TAG)
|
|
endif
|
|
|
|
test: build ## Test airship-in-a-pod
|
|
kubectl delete -f airship-in-a-pod.yaml || true
|
|
kubectl create -f airship-in-a-pod.yaml
|