Sample Application With Deployment is a test service tha returns information about user's birthday (how many days left to the next birthday).
This application has designed deployment and architecture which you can find here.
To run application you will need:
This repository does not include terraform deployment of atlas mongodb and AWS secret. I've created it beforehand.
In next steps I would create terraform scripts for atlas mongodb and aws secret, then catch outputs in Makefile and pass them to helm.
What is more, I was thinking about automating the whole stuff using Github Actions.
The build is generated by make commands using makefile.
You can build project with:
make build
Examine go code using commands:
make fmt
make vet
Run local mongodb container and execute tests (unit and integration) with:
make mongo-docker-run
make test
Create and push docker container:
make docker-build
make docker-push
To clean project from binaries and test files you can run:
make clean
You can deploy simple-application from your local environment using following commands.
For linting and building helm charts you can use:
make helm-build
This command copies helm charts and overwrites ${img} parameter, which is defined in Makefile.
To deploy service to your local environment you can use (no need to run helm-build
command before):
make helm-deploy
To delete helm deployment:
make helm-delete
I quite enjoyed this task :)
~Magda