Improve project creation with programmable project templates
Release notes
Problem to solve
As a Platform Engineer, I want a project bootstrapping method that sets up a new, production-ready, immediately deployable microservice project with all the bells-and-whistles required in my company, so the developers I serve can focus on the business logic.
As a Software Engineer, I want a project creation wizard with a few inputs that results in a new, production-ready, immediately deployable microservice project with all the bells-and-whistles required in my company, so I don't have to learn how to write or edit GitLab pipelines or any other infrastructure and security concepts my company follows, but I can focus on writing the business logic.
The code templates functionality of Backstage provides a great example why our project templates are very much not enough. This functionality is summarized from the platform engineers, adoption point of view in this video: https://youtu.be/TZ6-SpoFVeY?t=474
Current solutions:
- Use Backstage
- Use a project management project as described in idea 3 below without any support for such a concept from GitLab.
Proposal
Use pipelines to run automation that results in a fully configure project. In both cases, the project creation consists of the following steps:
- pick a template
- provide the required and optional inputs
- hit submit / run the automation
- redirect to the newly configured project
Idea 1 - Terraform:
Terraform is a platform independent API layer. It has provides for GitLab, AWS, GCP, Datadog, likely every service that our users interact with. A Terraform project has well-defined input variables that can be the basis for a generated setup UI for step (2).
GitLab already has great support for Terraform:
- in pipelines
- as a Terraform module registry
- (in MRs - not applicable here)
The current project templates are "static". They are simply cloned as a new project. With this idea, the project template repo would include a Terraform project following some conventions defined by GitLab and GitLab could provide an example .gitlab-ci.yml
that runs the Terraform project. Users would own their project 100%, GitLab provides the framework to generate the UI, the conventions and the example CI file.
Some of our customers wrote their own GUI to run Terraform workloads for project creation.
The GitLab Sandbox cloud (related docs) provides a minimal implementation how this could work.
Idea 2 - Custom pipelines
This is a generalization of "Idea 1" that does not restrict us to Terraform. We would need to create conventions how to generate a UI, but uses would not be restricted to Terraform.
Note: As we target platform engineers. Using Terraform is likely not a restriction.
Idea 3 - "Project management project"
We know about several customers who have a "seed" project and all their groups and projects are managed through code. Today, instead of using the GUI to start a new project, the requestor opens an MR against the seed project that describes all the inputs needed to create a new project. The seed project has the automation in GitLab pipelines to create the new GitLab project and all the other related details following the inputs.
Some companies even restrict their users from creating projects directly through the UI to avoid non-compliant projects.
As the projects are defined through code, compliance is guaranteed, at the same time GitLab does not provide any UI for these projects.
An MVC in this direction could be a documented, example setup that shows this approach with the roles people receive in the groups and projects and how these roles are managed together with projects and groups through automation.
Intended users
- Delaney (Development Team Lead) - benefits from it through usage
- Sasha (Software Developer) - benefits from it through usage
- Priyanka (Platform Engineer) - benefits from it through writing the templates
Feature Usage Metrics
- Number of projects created with programmable templates
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.