Deploying software is still hard, even with containers, schedulers and amazing built-in CI. You have to learn about different types of templates and how to configure them. We have all the moving parts to make this much easier in GitLab, we just have to put them together in the right way.
How this feature will work from the user's perspective
- Press the 'Auto deploy' on the project homepage, this shows a dropdown that lists different programming languages / frameworks. In this iteration 'Ruby on Rails' will be the only available one
- See a merge request with templates for a Rails app, that after a while has a link to a review app
How this works in GitLab
- If project is configured for Kubernetes (detected via service or variable (
- It shows a dropdown 'Auto deploy' on the project homepage with Ruby as one of the options
- If that dropdown is selected it generates a branch called auto-deploy
- And creates a commit called 'Add auto deploy templates' that adds/overwrites a Dockerfile, GitLab CI file (with review app), and a Kubernetes chart files. All these files are in the templates under the name Ruby or Ruby on Rails.
- It creates a merge request for this branch and redirects the user to the merge request page.
- If the files are already there you still show the same button and it will overwrite them in the MR
Things that are not part of the first iteration:
https://gitlab.com/gitlab-org/gitlab-ce/issues/25252 Auto detection of the type of app if it detects a Gemfile that contains
- Support for other types of applications (Node, Python, Java, PHP, Go, etc.)
- Support for other providers (Docker, Mesosphere, Terraform, Elastic Beanstalk, etc.)
- Simplify the interface (also take into account existing 'Set up CI', hard to discover Dockerfile template, and arbitrary files )
- If no application is detected still show the Autodeploy button and allow the user to select the type of application
- Do this automatically if the user pushes the autodeploy branch
- Automatically generate k8s config based on a docker compose file
There isn't enough space in the project page for the new button, so my suggestion would be to move the Download source code, New… and Notification settings buttons below the project title and center the project information where the Set up autodeploy dropdown will be.