summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axilleas@axilleas.me>2017-08-30 09:53:11 +0200
committerAchilleas Pipinellis <axilleas@axilleas.me>2017-09-06 16:21:45 +0200
commit77b63a2f55304975423583c69e5b8e9a2f2590e3 (patch)
tree41be1c9dcec258e8ae8cbacfcb52ee6bf73eb252
parent812a4cf34a7e8398d56c9f5e0c48ca02bea537c4 (diff)
downloadgitlab-ce-docs/autodeploy-refactor.tar.gz
Remove confusing Nginx example from Autodeploy docsdocs/autodeploy-refactor
-rw-r--r--doc/ci/autodeploy/index.md77
-rw-r--r--doc/ci/autodeploy/quick_start_guide.md19
2 files changed, 17 insertions, 79 deletions
diff --git a/doc/ci/autodeploy/index.md b/doc/ci/autodeploy/index.md
index 5c9e11373a2..a128cf69c20 100644
--- a/doc/ci/autodeploy/index.md
+++ b/doc/ci/autodeploy/index.md
@@ -1,4 +1,4 @@
-# Auto deploy
+# Auto Deploy
>**Notes:**
- [Introduced][mr-8135] in GitLab 8.15.
@@ -20,8 +20,8 @@ example a database).
The Autodeploy templates are based on the [kubernetes-deploy][kube-deploy]
project which is used to simplify the deployment process to Kubernetes by
-providing intelligent `build`, `deploy` and `destroy` commands which you can
-use in your `.gitlab-ci.yml` as-is. It uses [Herokuish](https://github.com/gliderlabs/herokuish),
+providing intelligent `build`, `deploy`, and `destroy` commands which you can
+use in your `.gitlab-ci.yml` as is. It uses [Herokuish](https://github.com/gliderlabs/herokuish),
which uses [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks)
to do some of the work, plus some of GitLab's own tools to package it all up. For
your convenience, a [Docker image][kube-image] is also provided.
@@ -61,77 +61,6 @@ To configure Autodeploy, you will need to:
1. Test your deployment configuration using a [Review App][review-app] that was
created automatically for you.
-## Using the Kubernetes deploy example project with Nginx
-
-A simple example would be the deployment of Nginx on Kubernetes.
-Consider a `nginx-deployment.yaml` file in your project with contents:
-
-```yaml
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- name: __CI_ENVIRONMENT_SLUG__
- labels:
- app: __CI_ENVIRONMENT_SLUG__
- track: stable
-spec:
- replicas: 3
- template:
- metadata:
- labels:
- app: __CI_ENVIRONMENT_SLUG__
- track: stable
- spec:
- containers:
- - name: nginx
- image: nginx:1.7.9
- ports:
- - containerPort: 80
-```
-
-The important part is where we set up `app: __CI_ENVIRONMENT_SLUG__`. As you'll
-see later this is replaced by the
-[`CI_ENVIRONMENT_SLUG` env variable](../variables/README.md#predefined-variables-environment-variables).
-
-The `.gitlab-ci.yml` would be:
-
-```yaml
-image: registry.gitlab.com/gitlab-examples/kubernetes-deploy
-
-stages:
- - deploy
-
-kubernetes deploy:
- stage: deploy
- environment:
- name: production
- script:
- - echo "$KUBE_CA_PEM" > kube_ca.pem
- - cat kube_ca.pem
- - kubectl config set-cluster default-cluster --server=$KUBE_URL --certificate-authority="$(pwd)/kube_ca.pem"
- - kubectl config set-credentials default-admin --token=$KUBE_TOKEN
- - kubectl config set-context default-system --cluster=default-cluster --user=default-admin --namespace $KUBE_NAMESPACE
- - kubectl config use-context default-system
-
- - sed -i "s/__CI_ENVIRONMENT_SLUG__/$CI_ENVIRONMENT_SLUG/" nginx-deployment.yaml
- - cat nginx-deployment.yaml
- - kubectl cluster-info
- - kubectl get deployments -l app=$CI_ENVIRONMENT_SLUG
- - kubectl create -f nginx-deployment.yaml || kubectl replace -f nginx-deployment.yaml
-```
-
-Notice that we use a couple of Kubernetes environment variables to configure
-the Kubernetes cluster. These are exposed from the
-[Kubernetes service](../../user/project/integrations/kubernetes.md#deployment-variables).
-The most important one is the `$KUBE_NAMESPACE` which should be unique for
-every project.
-
-Next, we replace `__CI_ENVIRONMENT_SLUG__` with the content of the
-`CI_ENVIRONMENT_SLUG` variable, so that the `app` label has the correct value.
-
-Finally, the Nginx pod is created from the definition of the
-`nginx-deployment.yaml` file.
-
## Private project support
> Experimental support [introduced][mr-2] in GitLab 9.1.
diff --git a/doc/ci/autodeploy/quick_start_guide.md b/doc/ci/autodeploy/quick_start_guide.md
index 0f7c255147d..f76c2a2cf31 100644
--- a/doc/ci/autodeploy/quick_start_guide.md
+++ b/doc/ci/autodeploy/quick_start_guide.md
@@ -1,4 +1,4 @@
-# Auto deploy: quick start guide
+# Auto Deploy: quick start guide
This is a step-by-step guide to deploying a project hosted on GitLab.com to Google Cloud, using Auto Deploy.
@@ -43,7 +43,7 @@ You need to copy-paste the ca.crt and token into your project on GitLab.com in t
For API URL, you should use the `Endpoint` IP from your cluster page on Google Cloud Platform.
-## Expose application to the world
+## Expose the application to the internet
In order to be able to visit your application, you need to install an NGINX ingress controller and point your domain name to its external IP address.
@@ -67,7 +67,7 @@ Find out the external IP address of the `ruby-app-nginx-ingress-controller` by r
kubectl get svc ruby-app-nginx-ingress-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
```
-Use this IP address to configure your DNS. This part heavily depends on your preferences and domain provider. But in case you are not sure, just create an A record with a wildcard host like `*.<your-domain>`.
+Use this IP address to configure your DNS. This part heavily depends on your preferences and domain provider. But in case you are not sure, just create an A record with a wildcard host like `*.<your-domain>` pointing to the external IP address you found above.
Use `nslookup minimal-ruby-app-staging.<yourdomain>` to confirm that domain is assigned to the cluster IP.
@@ -77,10 +77,19 @@ Visit the home page of your GitLab.com project and press "Set up Auto Deploy" bu
![auto deploy button](img/auto_deploy_btn.png)
-You will be redirected to the New file page where you can apply one of the Auto Deploy templates. Select "Kubernetes" to apply the template, then in the file, replace "domain.example.com" with your domain name and any other adjustments you feel comfortable with.
+You will be redirected to the "New file" page where you can apply one of the Auto Deploy templates. Select "Kubernetes" to apply the template, then in the file, replace `domain.example.com` with your domain name and make any other adjustments you need.
![auto deploy template](img/auto_deploy_dropdown.png)
-Change the target branch to `master`, and submit your changes. This should create a new pipeline with several jobs. If you made only the domain name change, the pipeline will have 3 jobs: `build`, `staging` and `production`. The `build` job will create a docker image with your new change and push it to the GitLab Container Registry. The `staging` job will deploy this image on your cluster. Once the deploy job succeeds you should be able to see your application by visiting the Kubernetes dashboard. Select the namespace of your project, which will look like `ruby-autodeploy-23`, but with a unique ID for your project, and your app will be listed as “staging” under the Deployment tab.
+Change the target branch to `master`, and submit your changes. This should create
+a new pipeline with several jobs. If you made only the domain name change, the
+pipeline will have three jobs: `build`, `staging`, and `production`.
+
+The `build` job will create a Docker image with your new change and push it to
+the GitLab Container Registry. The `staging` job will deploy this image on your
+cluster. Once the deploy job succeeds you should be able to see your application by
+visiting the Kubernetes dashboard. Select the namespace of your project, which
+will look like `ruby-autodeploy-23`, but with a unique ID for your project, and
+your app will be listed as "staging" under the "Deployment" tab.
Once its ready - just visit http://minimal-ruby-app-staging.yourdomain.com to see “Hello, world!”