diff --git a/z2/prepare-app.sh b/z2/prepare-app.sh index 92c2617..b1613b9 100644 --- a/z2/prepare-app.sh +++ b/z2/prepare-app.sh @@ -1,8 +1,8 @@ #!/bin/bash -echo "Building Docker image for backend..." +echo "Building Docker image for backend" docker build -t battleship-backend ./backend -echo "Building Docker image for frontend..." +echo "Building Docker image for frontend" docker build -t battleship-frontend ./frontend echo "Docker images built." diff --git a/z2/remove-app.sh b/z2/remove-app.sh index 26739de..b70cd0c 100644 --- a/z2/remove-app.sh +++ b/z2/remove-app.sh @@ -1,14 +1,14 @@ #!/bin/bash -echo "Deleting Services for MySQL, backend, and frontend..." +echo "Deleting Services for MySQL, backend, and frontend" kubectl delete -f service.yaml -n battleship-app -echo "Deleting StatefulSet for MySQL..." +echo "Deleting StatefulSet for MySQL" kubectl delete -f statefulset.yaml -n battleship-app -echo "Deleting Deployments for backend and frontend..." +echo "Deleting Deployments for backend and frontend" kubectl delete -f deployment.yaml -n battleship-app -echo "Deleting namespace battleship-app (and all objects within it)..." +echo "Deleting namespace battleship-app" kubectl delete -f namespace.yaml echo "Application completely removed from Kubernetes." diff --git a/z2/start-app.sh b/z2/start-app.sh index c57fd99..4ad1945 100644 --- a/z2/start-app.sh +++ b/z2/start-app.sh @@ -1,14 +1,14 @@ #!/bin/bash -echo "Creating namespace battleship-app..." +echo "Creating namespace battleship-app" kubectl apply -f namespace.yaml -echo "Creating Deployment for backend and frontend..." +echo "Creating Deployment for backend and frontend" kubectl apply -f deployment.yaml -n battleship-app -echo "Creating StatefulSet for MySQL..." +echo "Creating StatefulSet for MySQL" kubectl apply -f statefulset.yaml -n battleship-app -echo "Creating Service for MySQL, backend, and frontend..." +echo "Creating Service for MySQL, backend, and frontend" kubectl apply -f service.yaml -n battleship-app echo "Application deployed in Kubernetes." diff --git a/z2/stop-app.sh b/z2/stop-app.sh index 7d4d729..6794648 100644 --- a/z2/stop-app.sh +++ b/z2/stop-app.sh @@ -1,13 +1,13 @@ #!/bin/bash -echo "Stopping the application by scaling down to 0 replicas..." +echo "Stopping the application by scaling down to 0 replicas" -echo "Scaling down the Deployment for backend to 0..." +echo "Scaling down the Deployment for backend to 0" kubectl scale deployment battleship-backend -n battleship-app --replicas=0 -echo "Scaling down the Deployment for frontend to 0..." +echo "Scaling down the Deployment for frontend to 0" kubectl scale deployment battleship-frontend -n battleship-app --replicas=0 -echo "Scaling down the StatefulSet for MySQL to 0..." +echo "Scaling down the StatefulSet for MySQL to 0" kubectl scale statefulset battleship-mysql -n battleship-app --replicas=0 -echo "Application stopped, data (e.g., database) is preserved." +echo "Application stopped, data is preserved."