Skip to content

Commit

Permalink
Update new install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
oveldman committed Dec 21, 2023
1 parent 8ccccd5 commit 69f9852
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ spec:
spec:
containers:
- name: madworld-admin
image: madworld/vps/admin:latest
imagePullPolicy: Never
image: rodero/madworld-admin:latest
imagePullPolicy: Always
ports:
- containerPort: 80
---
Expand Down
4 changes: 2 additions & 2 deletions MadWorld/Deployments/Kubernetes/Internal/Api-Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
spec:
containers:
- name: madworld-api
image: madworld/vps/api:latest
image: rodero/madworld-api:latest
args:
- /server
livenessProbe:
Expand All @@ -40,7 +40,7 @@ spec:
secretKeyRef:
name: madworld-secrets
key: jwtkey
imagePullPolicy: Never
imagePullPolicy: Always
ports:
- containerPort: 80
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
spec:
containers:
- name: madworld-identity
image: madworld/vps/identity:latest
image: rodero/madworld-identity:latest
args:
- /server
livenessProbe:
Expand All @@ -40,7 +40,7 @@ spec:
secretKeyRef:
name: madworld-secrets
key: jwtkey
imagePullPolicy: Never
imagePullPolicy: Always
ports:
- containerPort: 80
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
spec:
containers:
- name: madworld-shipsimulator-backend
image: madworld/vps/shipsimulatorbackend:latest
image: rodero/madworld-shipsimulator-apilatest
args:
- /server
livenessProbe:
Expand All @@ -40,7 +40,7 @@ spec:
secretKeyRef:
name: madworld-secrets
key: jwtkey
imagePullPolicy: Never
imagePullPolicy: Always
ports:
- containerPort: 80
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ spec:
spec:
containers:
- name: madworld-shipsimulator-frontend
image: madworld/vps/shipsimulatorfrontend:latest
imagePullPolicy: Never
image: rodero/madworld-shipsimulator-ui:latest
imagePullPolicy: Always
ports:
- containerPort: 80
---
Expand Down
4 changes: 2 additions & 2 deletions MadWorld/Deployments/Kubernetes/Internal/UI-Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ spec:
spec:
containers:
- name: madworld-ui
image: madworld/vps/ui:latest
imagePullPolicy: Never
image: rodero/madworld-ui:latest
imagePullPolicy: Always
ports:
- containerPort: 80
---
Expand Down
14 changes: 0 additions & 14 deletions MadWorld/Deployments/Scripts/local-build-and-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
#!/bin/bash
build_and_load_image () {
sudo minikube image rm docker.io/madworld/vps/$2
sudo docker build -f $1/Dockerfile -t madworld/vps/$2 .
sudo minikube image load --overwrite madworld/vps/$2
echo "$2 image loaded"
}

#This removes the error of nginx image not found while building the image
sudo docker pull nginx

sudo kubectl delete deployment,pods,services --all -n madworld
sudo kubectl delete deployment,pods,services --all -n default

build_and_load_image "MadWorld.Backend.API" "api"
build_and_load_image "MadWorld.Backend.Identity" "identity"
build_and_load_image "MadWorld.Frontend.Admin" "admin"
build_and_load_image "MadWorld.Frontend.UI" "ui"
build_and_load_image "MadWorld.ShipSimulator.API" "shipsimulatorbackend"
build_and_load_image "MadWorld.ShipSimulator.UI" "shipsimulatorfrontend"

sudo docker image prune -f

minikube kubectl -- apply -f Deployments/Kubernetes/Environment/Config.yaml
Expand Down
14 changes: 0 additions & 14 deletions MadWorld/Deployments/Scripts/prod-build-and-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
#!/bin/bash
build_and_load_image () {
docker build -f $1/Dockerfile -t madworld/vps/$2 .
docker save madworld/vps/$2 > Deployment/Kubernetes/images/madworld-vps-$2.tar
sudo microk8s images import < Deployment/Kubernetes/images/madworld-vps-$2.tar
echo "$2 image loaded"
}

#This removes the error of nginx image not found while building the image
sudo docker pull nginx

mkdir -p Deployment/Kubernetes/images
sudo microk8s kubectl delete deployment,pods,services --all -n madworld
sudo microk8s kubectl delete deployment,pods,services --all -n default

build_and_load_image "MadWorld.Backend.API" "api"
build_and_load_image "MadWorld.Backend.Identity" "identity"
build_and_load_image "MadWorld.Frontend.Admin" "admin"
build_and_load_image "MadWorld.Frontend.UI" "ui"
build_and_load_image "MadWorld.ShipSimulator.API" "shipsimulatorbackend"
build_and_load_image "MadWorld.ShipSimulator.UI" "shipsimulatorfrontend"

sudo docker image prune -f

sudo microk8s kubectl apply -f Deployments/Kubernetes/Environment/Config.yaml
Expand Down

0 comments on commit 69f9852

Please sign in to comment.