2016-12-23 05:08:09 -05:00
|
|
|
# Auto deploy
|
2016-12-21 10:21:55 -05:00
|
|
|
|
2017-01-30 23:38:54 -05:00
|
|
|
> [Introduced][mr-8135] in GitLab 8.15. Currently requires a [Public project][project-settings].
|
2016-12-21 10:21:55 -05:00
|
|
|
|
2016-12-23 05:08:09 -05:00
|
|
|
Auto deploy is an easy way to configure GitLab CI for the deployment of your
|
2016-12-21 10:21:55 -05:00
|
|
|
application. GitLab Community maintains a list of `.gitlab-ci.yml`
|
|
|
|
templates for various infrastructure providers and deployment scripts
|
|
|
|
powering them. These scripts are responsible for packaging your application,
|
|
|
|
setting up the infrastructure and spinning up necessary services (for
|
|
|
|
example a database).
|
|
|
|
|
|
|
|
You can use [project services][project-services] to store credentials to
|
|
|
|
your infrastructure provider and they will be available during the
|
|
|
|
deployment.
|
|
|
|
|
|
|
|
## Supported templates
|
|
|
|
|
2016-12-23 05:08:09 -05:00
|
|
|
The list of supported auto deploy templates is available [here][auto-deploy-templates].
|
2016-12-21 10:21:55 -05:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
1. Enable a deployment [project service][project-services] to store your
|
2016-12-21 18:23:26 -05:00
|
|
|
credentials. For example, if you want to deploy to OpenShift you have to
|
|
|
|
enable [Kubernetes service][kubernetes-service].
|
|
|
|
1. Configure GitLab Runner to use Docker or Kubernetes executor with
|
|
|
|
[privileged mode enabled][docker-in-docker].
|
2016-12-23 05:08:09 -05:00
|
|
|
1. Navigate to the "Project" tab and click "Set up auto deploy" button.
|
|
|
|
![Auto deploy button](img/auto_deploy_button.png)
|
2016-12-21 10:21:55 -05:00
|
|
|
1. Select a template.
|
2016-12-23 05:08:09 -05:00
|
|
|
![Dropdown with auto deploy templates](img/auto_deploy_dropdown.png)
|
2016-12-21 10:21:55 -05:00
|
|
|
1. Commit your changes and create a merge request.
|
|
|
|
1. Test your deployment configuration using a [Review App][review-app] that was
|
|
|
|
created automatically for you.
|
|
|
|
|
|
|
|
[mr-8135]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8135
|
2017-01-30 23:41:43 -05:00
|
|
|
[project-settings]: https://docs.gitlab.com/ce/public_access/public_access.html
|
2017-02-03 13:41:35 -05:00
|
|
|
[project-services]: ../../user/project/integrations/project_services.md
|
2016-12-23 05:08:09 -05:00
|
|
|
[auto-deploy-templates]: https://gitlab.com/gitlab-org/gitlab-ci-yml/tree/master/autodeploy
|
2017-02-03 13:41:35 -05:00
|
|
|
[kubernetes-service]: ../../user/project/integrations/kubernetes.md
|
2016-12-21 10:21:55 -05:00
|
|
|
[docker-in-docker]: ../docker/using_docker_build.md#use-docker-in-docker-executor
|
|
|
|
[review-app]: ../review_apps/index.md
|