Step 1 is to create a new GitHub aggregate repository, into which we’ll add our service.
ProTip: An aggregate is simply a logical grouping of services that, together, provide some business function via a defined api. i.e. An aggregate is a level of abstraction above a single microservice. This is also known as a Bounded Context in DDD nomenclature.
Rather than manually creating a new repository and performing all the lengthy project setup, we can use the aggregate-template repository. This will create a new repository with all the plumbing and boilerplate code in place.
Creating a new repository from the template
- Click Use this template to create a new repository, and fill in the details:
- When GitHub creates the new repo, a boostrap workflow will run to customise the new repository. Wait for this workflow to complete in the Actions tab:
- Clone the new repository locally.
Finish the initialisation of the repository by running the
clean_up.shscript from the root of the repository.
The clean-up script will finish off the customisation of the new repository, removing now redundant workflows, scripts and code.
- Commit the changes back to the GitHub
git add -A git commit -m "clean_up script" git push
The repository is now ready for services to be added, which will be covered in the next step.
More information about the features and structure of the repository can be found in the aggregate template documentation.