github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/deploy/dev/k8s/Makefile (about) 1 # Usage: 2 # $ make try CPU=8 MEMORY=16000 3 # $ make dev CPU=12 MEMORY=24000 4 # $ HTTPS=true make try 5 6 # Defaults 7 CPU ?= 4 8 MEMORY ?= 7000 9 MODE ?= "debug" 10 REGISTRY_URL ?= docker.io 11 LOCAL_REGISTRY_URL ?= localhost:5000 12 DOCKER_IMAGE ?= aistorage/aisnode-minikube 13 IMAGE_TAG ?= latest 14 HTTPS ?= false 15 16 # Run AIStore cluster consisting of 1 proxy/gateway and 1 target 17 # Note that minikube must be already running 18 minimal: 19 @ ./minimal.sh $(HTTPS) 20 21 # Check if everything is installed correctly, start minikube and run minimal inside of it 22 try: stop 23 @ minikube config set cpus $(CPU) 24 @ minikube config set memory $(MEMORY) 25 @ minikube start --driver=docker 26 @ ./minimal.sh $(HTTPS) 27 28 # Configure and deploy everything 29 dev: 30 @ set -e 31 @ ./utils/disable_vpn.sh && \ 32 ./utils/deploy_minikube.sh && \ 33 ./utils/deploy_ais.sh 34 35 # Redeploy AIStore without minikube and Docker registry deployment 36 redeploy-ais: 37 @ ./utils/disable_vpn.sh && \ 38 ./utils/deploy_ais.sh 39 40 # Used by CI runners. Expects an image $AISNODE and kubectl with access to a running k8s cluster 41 deploy-ci: 42 ./deploy_ci.sh 43 44 # Used by CI runners. Clean-up created K8s resources 45 cleanup-ci: 46 ./utils/cleanup_k8s_ci.sh 47 48 # Set up minikube and deploy a minimal cluster with the new aisnode container including local changes 49 minimal-local: 50 @ export USE_LOCAL_REGISTRY=true && \ 51 export DEPLOY_METRICS=false && \ 52 ./utils/deploy_minikube.sh 53 @ make redeploy-local 54 55 # Rebuild the local container and restart the minimal cluster without restarting minikube 56 redeploy-local: 57 @ export REGISTRY_URL=${LOCAL_REGISTRY_URL} && \ 58 ./utils/build_aisnode.sh && \ 59 ./minimal.sh $(HTTPS) 60 61 # Stops AIS running on minikube 62 stop-ais: 63 @ kubectl delete pod -l type=aisproxy 64 @ kubectl delete pod -l type=aistarget 65 66 # Stops AIS cluster as well as minikube 67 stop: 68 @ minikube delete 69 70 docker-build: 71 @ docker build ./../../../ --force-rm -t $(REGISTRY_URL)/$(DOCKER_IMAGE):$(IMAGE_TAG) --build-arg MODE="$(MODE)" -f Dockerfile 72 73 docker-push: 74 @ docker push $(REGISTRY_URL)/$(DOCKER_IMAGE):$(IMAGE_TAG) 75 76 docker-all: docker-build docker-push