For individual developers, deploying the local environment using Hosting
means reinstalling all environments every time the computer is replaced, which, although time-consuming, is the most common approach.
For small teams, quickly deploying all service environments on a new server is a hassle. If the requirements are complex, it becomes even more challenging, such as:
- Some settings in official images do not match personal usage.
- The Go environment needs a matching framework environment, while the PHP environment needs to quickly install and enable different extensions.
- To save costs, it is necessary to implement development, testing, and production environments on a single server.
- To save costs, it is necessary to install both Redis 5.0 and Redis 6.0 on one server for two different products to use.
When facing these issues, it's natural to think of using docker-compose to solve them. Although this is the right direction, only through practical experience can one realize that it's not as perfect as imagined.
In the beginning, the code may be written very well, but as requirements change and various strange things happen, under time pressure, one may have to resort to some hacky ways to solve problems, leading to increasingly messy and even incomprehensible code.
So, if you adopt the traditional way of writing your own docker-compose.yml
file, you may encounter similar problems, such as:
- Port numbers are getting messy, leading to more conflicts.
- Adding various environment variables to control images.
- Adding many shell scripts to handle image initialization, environment processing, etc.
- Adding a lot of custom image logic, possibly directly written in the
docker-compose.yml
file or shell script, resulting in a mix of official and custom images.
In the end, the docker-compose.yml
file becomes messy, long, and difficult to maintain, making it challenging to quickly meet requirements and solve problems.
If the access is slow, you can view the Gitee Mirror Repository.
Sparrow is a containerized orchestration tool based on Docker for one-click starting of multiple service environments. It has many powerful features, including but not limited to:
- Images Remote Hosting: Service images are uploaded to the repository with one click, for unified remote hosting.
- Configurable management: All configurations such as image versions, service ports, extension plugins are configurable.
- Multi-service support: Supports the simultaneous access of dozens or even more services.
- One-click service management: One command can quickly start, stop, and manage all services.
- Namespace mechanism: Supports the startup of multiple containers with different identities through the namespace mechanism, achieving service multi-version and environment isolation.
- Ready-to-use Services: MySQL, Prometheus, Kafka, Elasticsearch, and dozens of other services are ready to use out of the box, and can quickly integrate new services.
- Comprehensive toolchain: Provides new service creation, service (image) updates, service (container and image) cleanup, image uploading, uniform allocation of port numbers, quick entry into containers, and command prompts.
- Container hook callbacks: Each container provides hook callbacks such as
before_start/after_start/before_stop/after_stop
, common scenarios include automatically creating some databases after Mysql starts.
- Standardized environment management: Regardless of how many different types of service environments there are, they are all managed in a standardized way, organized and orderly.
- Efficient service management: Both in terms of usage and developing new features, the powerful and complete toolchain can help you efficiently manage services.
- Multiple versions of the same service: Supports multiple versions of a service, such as simultaneously starting Redis 4.0, 5.0, and 6.0 versions on one machine.
- Service environment isolation: Supports starting multiple different isolated environments on one server, such as simultaneously building dev, test, beta environments on one machine.