Commit 5756f6c6 authored by Addshore's avatar Addshore 🏄
Browse files

Update CI docs

parent 48026008
...@@ -24,8 +24,8 @@ Make a VM, such as `gitlab-runner-addshore-1001.integration.eqiad1.wikimedia.clo ...@@ -24,8 +24,8 @@ Make a VM, such as `gitlab-runner-addshore-1001.integration.eqiad1.wikimedia.clo
### Install docker ### Install docker
```sh ```sh
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update sudo apt-get update
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get install \ sudo apt-get install \
apt-transport-https \ apt-transport-https \
ca-certificates \ ca-certificates \
...@@ -56,9 +56,9 @@ sudo gitlab-runner register -n \ ...@@ -56,9 +56,9 @@ sudo gitlab-runner register -n \
--url https://gitlab.wikimedia.org/ \ --url https://gitlab.wikimedia.org/ \
--registration-token XXXreleng-mwcli-tokenXXX \ --registration-token XXXreleng-mwcli-tokenXXX \
--executor docker \ --executor docker \
--limit 6 \ --limit 5 \
--name "gitlab-runner-addshore-1001-docker-0012" \ --name "gitlab-runner-addshore-1004-docker-01" \
--docker-image "docker:19.03.12" \ --docker-image "docker:19.03.15" \
--docker-privileged \ --docker-privileged \
--docker-volumes "/certs/client" --docker-volumes "/certs/client"
``` ```
...@@ -70,7 +70,7 @@ sudo gitlab-runner register -n \ ...@@ -70,7 +70,7 @@ sudo gitlab-runner register -n \
Allow 6 jobs at once globally on this runner and restart gitlab runner Allow 6 jobs at once globally on this runner and restart gitlab runner
```sh ```sh
sudo sed -i 's/^concurrent =.*/concurrent = 6/' "/etc/gitlab-runner/config.toml" sudo sed -i 's/^concurrent =.*/concurrent = 5/' "/etc/gitlab-runner/config.toml"
sudo systemctl restart gitlab-runner sudo systemctl restart gitlab-runner
``` ```
...@@ -93,7 +93,7 @@ Get the IP address: ...@@ -93,7 +93,7 @@ Get the IP address:
hostname --ip-address hostname --ip-address
``` ```
Add the mirror: Add the mirror (You might need to do this as root, not sudo...):
```sh ```sh
sudo echo '{"registry-mirrors": ["http://<CUSTOM IP>"]}' > /etc/docker/daemon.json sudo echo '{"registry-mirrors": ["http://<CUSTOM IP>"]}' > /etc/docker/daemon.json
...@@ -103,7 +103,7 @@ sudo service docker restart ...@@ -103,7 +103,7 @@ sudo service docker restart
Check with: Check with:
```sh ```sh
docker system info sudo docker system info
``` ```
Also add the mirror for dind in `/etc/gitlab-runner/config.toml` to each runner it is needed for Also add the mirror for dind in `/etc/gitlab-runner/config.toml` to each runner it is needed for
...@@ -111,7 +111,7 @@ https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#enable-registry-mir ...@@ -111,7 +111,7 @@ https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#enable-registry-mir
```sh ```sh
[[runners.docker.services]] [[runners.docker.services]]
name = "docker:19.03.12-dind" name = "docker:19.03.15-dind"
command = ["--registry-mirror", "https://<CUSTOM IP>"] command = ["--registry-mirror", "https://<CUSTOM IP>"]
``` ```
......
...@@ -8,15 +8,15 @@ trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG ...@@ -8,15 +8,15 @@ trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
# echo an error message before exiting # echo an error message before exiting
trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT
# Setup the default hosts in hosts file
./bin/mw docker hosts add
# Run this integration test using a non standard port # Run this integration test using a non standard port
./bin/mw docker env set PORT 9191 ./bin/mw docker env set PORT 9191
# And already fill in the location of mediawiki # And already fill in the location of mediawiki
./bin/mw docker env set MEDIAWIKI_VOLUMES_CODE $(pwd)/mediawiki ./bin/mw docker env set MEDIAWIKI_VOLUMES_CODE $(pwd)/mediawiki
# So we should get no prompts, even though we don't pass --no-interaction # So we should get no prompts, even though we don't pass --no-interaction
# Setup the default hosts in hosts file
./bin/mw docker hosts add
# Create # Create
./bin/mw docker mediawiki create ./bin/mw docker mediawiki create
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment