| name | local-deployment |
| description | skill that dictates the deployment strategy for local development |
When To Use
- When tasked to deploy and test an application locally
- Use this skill AFTER you have written your code and executed your tests successfully
Deployment Strategy
Step 1- Local Execution
- Run the app locally via terminal. If there are multiple services like frontend and backend, launch them both via separate terminals.
- Validate the deployment by following the Deployment Validation instructions
Step 2- Docker Execution
- Build the docker images for each service
- Generate a docker-compose yaml script to spin up all the services together
- Execute docker-compose
- Validate the deployment by following the Deployment Validation instructions
Step 3- Local Kubernetes cluster (using minikube)
- Confirm with the user if they require this deployment
- Push the docker images to docker hub. Confirm the docker hub username with the user
- minikube should pull these docker images, deploy and run 2 pods.
- Validate the deployment by following the Deployment Validation instructions
Step 4
- Generate a docs/local-deployment-guide.md and write all the steps required for user to execute the app through steps 1, 2 and 3
- Include a deployment diagram
- Include steps to validate the app is running and a test request
Deployment Validation
Test that the services have launched successfully, i.e. you are able to ping them, and that the services are able to communicate among each other as expected by the application