summaryrefslogtreecommitdiff
path: root/doc/topics
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 18:09:07 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 18:09:07 +0000
commit6b8d671de726534a03c18e025a586e1bc9c04a4f (patch)
treef6a9168160b0d435641a1767b2e68487ec75ae46 /doc/topics
parent163a7046ac76eb4109184e82ce0af911633e6626 (diff)
downloadgitlab-ce-6b8d671de726534a03c18e025a586e1bc9c04a4f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/topics')
-rw-r--r--doc/topics/autodevops/index.md14
-rw-r--r--doc/topics/web_application_firewall/quick_start_guide.md60
2 files changed, 37 insertions, 37 deletions
diff --git a/doc/topics/autodevops/index.md b/doc/topics/autodevops/index.md
index dcd822705f9..aa210f3550f 100644
--- a/doc/topics/autodevops/index.md
+++ b/doc/topics/autodevops/index.md
@@ -918,12 +918,12 @@ instead of the default `ruby:latest`:
1. Set `AUTO_DEVOPS_BUILD_IMAGE_EXTRA_ARGS` to `--build-arg=RUBY_VERSION=alpine`.
1. Add the following to a custom `Dockerfile`:
- ```docker
- ARG RUBY_VERSION=latest
- FROM ruby:$RUBY_VERSION
+ ```dockerfile
+ ARG RUBY_VERSION=latest
+ FROM ruby:$RUBY_VERSION
- # ... put your stuff here
- ```
+ # ... put your stuff here
+ ```
NOTE: **Note:**
Passing in complex values (newlines and spaces, for example) will likely
@@ -955,14 +955,14 @@ In projects:
1. Activate the experimental `Dockerfile` syntax by adding the following
to the top of the file:
- ```docker
+ ```dockerfile
# syntax = docker/dockerfile:experimental
```
1. To make secrets available in any `RUN $COMMAND` in the `Dockerfile`, mount
the secret file and source it prior to running `$COMMAND`:
- ```docker
+ ```dockerfile
RUN --mount=type=secret,id=auto-devops-build-secrets . /run/secrets/auto-devops-build-secrets && $COMMAND
```
diff --git a/doc/topics/web_application_firewall/quick_start_guide.md b/doc/topics/web_application_firewall/quick_start_guide.md
index e3cf0bcd498..96c2da4e963 100644
--- a/doc/topics/web_application_firewall/quick_start_guide.md
+++ b/doc/topics/web_application_firewall/quick_start_guide.md
@@ -80,11 +80,11 @@ under which this application will be deployed.
![Google auth](../autodevops/img/guide_google_auth_v12_3.png)
1. The last step is to provide the cluster details.
- 1. Give it a name, leave the environment scope as is, and choose the GCP project under which the cluster
- will be created (per the instructions to [configure your Google account](#configuring-your-google-account), a project should have already been created for you).
- 1. Choose the [region/zone](https://cloud.google.com/compute/docs/regions-zones/) under which the cluster will be created.
- 1. Enter the number of nodes you want it to have.
- 1. Choose the [machine type](https://cloud.google.com/compute/docs/machine-types).
+ 1. Give it a name, leave the environment scope as is, and choose the GCP project under which the cluster
+ will be created (per the instructions to [configure your Google account](#configuring-your-google-account), a project should have already been created for you).
+ 1. Choose the [region/zone](https://cloud.google.com/compute/docs/regions-zones/) under which the cluster will be created.
+ 1. Enter the number of nodes you want it to have.
+ 1. Choose the [machine type](https://cloud.google.com/compute/docs/machine-types).
![GitLab GKE cluster details](../autodevops/img/guide_gitlab_gke_details_v12_3.png)
@@ -180,40 +180,40 @@ your cluster either using [Cloud Shell](https://cloud.google.com/shell/) or the
1. After connecting to your cluster, check if the Ingress-NGINX controller is running and ModSecurity is enabled.
- This is done by running the following commands:
+ This is done by running the following commands:
- ```bash
- $ kubectl get pods -n gitlab-managed-apps | grep 'ingress-controller'
- ingress-nginx-ingress-controller-55f9cf6584-dxljn 2/2 Running
+ ```shell
+ $ kubectl get pods -n gitlab-managed-apps | grep 'ingress-controller'
+ ingress-nginx-ingress-controller-55f9cf6584-dxljn 2/2 Running
- $ kubectl -n gitlab-managed-apps exec -it $(kubectl get pods -n gitlab-managed-apps | grep 'ingress-controller' | awk '{print $1}') -- cat /etc/nginx/nginx.conf | grep 'modsecurity on;'
- modsecurity on;
- ```
+ $ kubectl -n gitlab-managed-apps exec -it $(kubectl get pods -n gitlab-managed-apps | grep 'ingress-controller' | awk '{print $1}') -- cat /etc/nginx/nginx.conf | grep 'modsecurity on;'
+ modsecurity on;
+ ```
1. Verify the Rails application has been installed properly.
- ```bash
- $ kubectl get ns
- auto-devv-2-16730183-production Active
+ ```shell
+ $ kubectl get ns
+ auto-devv-2-16730183-production Active
- $ kubectl get pods -n auto-devv-2-16730183-production
- NAME READY STATUS RESTARTS
- production-5778cfcfcd-nqjcm 1/1 Running 0
- production-postgres-6449f8cc98-r7xgg 1/1 Running 0
- ```
+ $ kubectl get pods -n auto-devv-2-16730183-production
+ NAME READY STATUS RESTARTS
+ production-5778cfcfcd-nqjcm 1/1 Running 0
+ production-postgres-6449f8cc98-r7xgg 1/1 Running 0
+ ```
1. To make sure the Rails application is responding, send a request to it by running:
- ```bash
- $ kubectl get ing -n auto-devv-2-16730183-production
- NAME HOSTS PORTS
- production-auto-deploy fjdiaz-auto-devv-2.34.68.60.207.nip.io,le-16730183.34.68.60.207.nip.io 80, 443
+ ```shell
+ $ kubectl get ing -n auto-devv-2-16730183-production
+ NAME HOSTS PORTS
+ production-auto-deploy fjdiaz-auto-devv-2.34.68.60.207.nip.io,le-16730183.34.68.60.207.nip.io 80, 443
- $ curl --location --insecure fjdiaz-auto-devv-2.34.68.60.207.nip.io | grep 'Rails!' --after 2 --before 2
- <body>
- <p>You're on Rails!</p>
- </body>
- ```
+ $ curl --location --insecure fjdiaz-auto-devv-2.34.68.60.207.nip.io | grep 'Rails!' --after 2 --before 2
+ <body>
+ <p>You're on Rails!</p>
+ </body>
+ ```
Now that we have confirmed our system is properly setup, we can go ahead and test
the WAF with OWASP CRS!
@@ -223,7 +223,7 @@ the WAF with OWASP CRS!
Now let's send a potentially malicious request, as if we were a scanner,
checking for vulnerabilities within our application and examine the modsecurity logs:
-```bash
+```shell
$ curl --location --insecure fjdiaz-auto-devv-2.34.68.60.207.nip.io --header "User-Agent: absinthe" | grep 'Rails!' --after 2 --before 2
<body>
<p>You're on Rails!</p>