In this post, I will show how to set up Snipe-IT, an open-source asset management, to create your self-hosted inventory. And the best part is that you do not have to manage it!
The motivation for this project was to get an inventory up and running in AWS with a focus on minimal maintenance and cost.
Architecture#
Software#
For the setup, I will be installing Snipe-IT with Docker containers.
As Snipe-IT needs a MySQL database, I will use a MySQL container. I did not use the RDS database as it was expensive for my use case.
And to get an automatically signed SSL certificate, I will be using a custom Nginx container. Check it out here.
Finally, to connect and deploy the containers together, I will be using Docker Compose. Check out the complete docker-compose.yml file.
Deployment#
To standardize the deployment, I will be using Terraform, a great tool to manage cloud resources. However, Terraform is not open-source anymore. Check out OpenTofu if you want an open-source fork!
The cloud provider that I will be using will be AWS, as it is the one I know more about. Check out my post!
Regarding the deployment of docker containers and automatic redeployment in case any errors occur, I will use an auto-scaling group. That is because I want to make sure it is always up and running from the latest backup.
Finally, to ensure we don’t lose the data in the MySQL container, I will save the backups in an S3 bucket every night. All resources are managed and created by the Terraform deployment, so there is no need to worry about ;)
Installation#
The installation steps can be found in my repository. Please follow them step by step and adapt them to your needs.
If you have any questions, feel free to open an issue.
Considerations#
- Edit the public key in the terraform deployment. Otherwise, I will be able to access your instance …
- Make sure to change the database passwords so they are strong.
- Treat your
.env
and*.tfvars
files as secrets, they are!
Conclusions#
All in all, I hope this project helps you to set up an inventory faster and more reliably.
PS: Check out the code and make sure to open an issue if you have any suggestions!