Adding
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
nodes:
|
||||
- role: control-plane
|
||||
extraPortMappings:
|
||||
- containerPort: 30000
|
||||
hostPort: 81
|
||||
@@ -0,0 +1,29 @@
|
||||
APP_NAME="document-ingestor"
|
||||
APP_VERSION="1.0"
|
||||
echo "Setting up cluster..."
|
||||
mkdir -p logs
|
||||
LOG_FILE="logs/k8s_setup.log"
|
||||
kind create cluster --config ../kind.cluster.config --wait 300s --name $APP_NAME 2>&1 | tee -a $LOG_FILE
|
||||
kubectl create namespace landmarkcu --dry-run=client -o yaml | kubectl apply -f - 2>&1 >> $LOG_FILE
|
||||
|
||||
echo "deploying ingress-nginx..." 2>&1 | tee -a $LOG_FILE
|
||||
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx 2>&1 >> $LOG_FILE
|
||||
helm repo update 2>&1 >> $LOG_FILE
|
||||
|
||||
helm upgrade --install my-release ingress-nginx/ingress-nginx \
|
||||
--set controller.service.type=LoadBalancer \
|
||||
--set controller.service.nodePorts.http=30000 \
|
||||
--set controller.service.nodePorts.https=30001 2>&1 >> $LOG_FILE
|
||||
|
||||
echo "...ingress-nginx deployed!" 2>&1 >> $LOG_FILE
|
||||
|
||||
echo "performing docker build..." 2>&1 >> $LOG_FILE
|
||||
LOG_FILE="logs/docker_build.log"
|
||||
docker build -t local/$APP_NAME:$APP_VERSION ../.. 2>&1 >> $LOG_FILE
|
||||
echo "docker build complete!"
|
||||
|
||||
kind load docker-image local/$APP_NAME:$APP_VERSION --name $APP_NAME 2>&1 >> $LOG_FILE
|
||||
|
||||
echo "applying $app_name to kubernetes cluster" 2>&1 | tee -a $LOG_FILE
|
||||
LOG_FILE="logs/kubectl_apply.log"
|
||||
kubectl apply -k ../../_deploy/overlays/local 2>&1 >> $LOG_FILE
|
||||
@@ -0,0 +1,5 @@
|
||||
APP_NAME="document-ingestor"
|
||||
mkdir -p logs
|
||||
LOG_FILE="logs/cluster_teardown.log"
|
||||
kind delete cluster --name $APP_NAME 2>&1 | tee -a $LOG_FILE
|
||||
echo "Deletion complete!" 2>&1 | tee -a $LOG_FILE
|
||||
@@ -0,0 +1,2 @@
|
||||
kubectl delete -k ../../_deploy/overlays/local
|
||||
kubectl apply -k ../../_deploy/overlays/local
|
||||
@@ -0,0 +1,2 @@
|
||||
cinst -y kind
|
||||
cinst -y kubernetes-helm
|
||||
@@ -0,0 +1,19 @@
|
||||
$APP_NAME = "blend-api-wrapper"
|
||||
$APP_VERSION = "1.0"
|
||||
kind create cluster --config ../kind.cluster.config --wait 300s
|
||||
|
||||
kubectl create namespace landmarkcu
|
||||
|
||||
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
|
||||
helm repo update
|
||||
|
||||
helm install my-release ingress-nginx/ingress-nginx `
|
||||
--set controller.service.type=LoadBalancer `
|
||||
--set controller.service.nodePorts.http=30000 `
|
||||
--set controller.service.nodePorts.https=30001
|
||||
|
||||
docker build -t local/${APP_NAME}:${APP_VERSION} ../..
|
||||
|
||||
kind load docker-image local/${APP_NAME}:${APP_VERSION}
|
||||
|
||||
kubectl apply -k ..\..\_deploy\overlays\local
|
||||
@@ -0,0 +1,2 @@
|
||||
$APP_NAME="document-ingestor"
|
||||
kind delete cluster --name $APP_NAME
|
||||
Reference in New Issue
Block a user