New services projects can be created using the tool copier and a copier template.
Install copier, following the instructions: https://copier.readthedocs.io/en/stable/#installation (requires Python 3.8+)
Once installed, it can be used in the following way:
Clone the template:
git clone git@github.com:IMGARENA/streams-service-generator.git
cd where you want to create the service
copier copy streams-service-generator .
[NOTE] streams-service-generator refers to the relative folder where the template was checked out from github.
Before generating the project,copier will ask for a few parameters, proposing a default if possible.
Parameter | Description | Notes |
---|---|---|
project_name |
The name of the service properly written. |
The name of the service, ie. DGE Sherlock |
project_slug |
The name of the project without spaces, or underscores. This is what is used naming the project in all files. |
Will be derived from the project_name, ie. dge-sherlock |
project_description |
A text describing the project. |
Will go in documents where a full description is needed, ie. Orchestrator for managing AWS Elemental Streaming Pipelines |
base_package |
The base package where the service will be. |
com.imgarena is the default |
package_dirs |
To create the directory structure. |
com/imgarena is the default; derived from base_package. |
root_package |
The root package for this service. |
Default is last word of project_name, ie. sherlock. |
server_port |
HTTP port for the service |
Should be an integer value. |
management_server_port |
The management HTTP port where the liveness and readiness probes will listen. |
Default is inferred from server_port +1 |
Since our services are going to evolve and include more features and/or changes, anybody can modify this template and update it for the latest service.