Loading README.md +49 −5 Original line number Diff line number Diff line Loading @@ -8,12 +8,11 @@ $ docker-compose up -d Now you have my own server configuration ## TODO ### New ideas - [X] traefik - [X] gitlab - [ ] CI/CD worker(s) - [X] CI/CD worker(s) - [X] nextcloud - [X] nginx - [X] weechat Loading Loading @@ -62,8 +61,8 @@ Now you have my own server configuration ### Configuration files - [ ] have default configuration files - [X] traefik - [ ] gitlab - [ ] gitlab runner - [X] gitlab - [X] gitlab runner - [ ] transmission - [ ] pastebin - [ ] nextcloud Loading Loading @@ -106,4 +105,49 @@ docker-compose scale nginx=2 | [X] | ${SITE2} | 80, 443 (redirect 80 to 443) | ### Gitlab runner #### Get the Registration Token Find your runner registration token ($REGISTRATION_TOKEN) at `http://GITLAB_HOST/$PROJECT_GROUP/$PROJECT_NAME/settings/ci_cd`. There is **two** way to register the runner: ##### Register via config file Register the Registration Token to have a Runner Token ```bash curl -X POST 'http://gitlab.${SITE}/api/v4/runners' --form 'token=$REGISTRATION_TOKEN' --form 'description=The Best Runner' ``` ###### Change runner configuration Now change the token in the [configuration file](https://github.com/tomMoulard/make-my-server/blob/master/gitlab/runner/config.toml). ```toml [[runners]] token = "XXXXXXXXXXXXXXXXXXXX" ``` and run the runner ```bash docker-compose up -d runner ``` ##### Register via CLI Steps: - up the runner `docker-compose up -d runner` - register the runner ```bash docker-compose exec runner gitlab-runner register \ --non-interactive \ --executor "docker" \ --docker-image alpine:latest \ --url "http://gitlab/" \ --registration-token "$REGISTRATION_TOKEN" \ --description "The Best Runner" \ --tag-list "docker,aws" \ --run-untagged="true" \ --locked="false" \ --access-level="not_protected" ``` # Authors Main author: - [Tom](tom.moulard.org) Gitlab helper: - [michel_k](mailto:thomas.michelot@epita.fr) No newline at end of file docker-compose.yml +0 −3 Original line number Diff line number Diff line Loading @@ -96,9 +96,6 @@ services: - gitlab labels: - 'traefik.enable=false' environment: - 'GITLAB_URL=https://gitlab.${SITE}/' - 'GITLAB_TOKEN=_p9fW2gr4GiqAP6zrsaT' nginx: image: nginx:stable-alpine Loading gitlab/runner/config.toml +23 −8 Original line number Diff line number Diff line concurrent = 10 check_interval = 1 log_level = "info" log_format = "json" log_level = "warning" [session_server] session_timeout = 1800 [[runners]] token = "" name = "The Best Runner" url = "http://gitlab/" name = "runner #1" limit = 0 executor = "docker" environment = ["ENV=value", "LC_ALL=en_US.UTF-8"] [runners.custom_build_dir] [runners.docker] tls_verify = false image = "ubuntu:19.04" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false volumes = ["/cache"] shm_size = 0 [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.custom] run_exec = "" Loading
README.md +49 −5 Original line number Diff line number Diff line Loading @@ -8,12 +8,11 @@ $ docker-compose up -d Now you have my own server configuration ## TODO ### New ideas - [X] traefik - [X] gitlab - [ ] CI/CD worker(s) - [X] CI/CD worker(s) - [X] nextcloud - [X] nginx - [X] weechat Loading Loading @@ -62,8 +61,8 @@ Now you have my own server configuration ### Configuration files - [ ] have default configuration files - [X] traefik - [ ] gitlab - [ ] gitlab runner - [X] gitlab - [X] gitlab runner - [ ] transmission - [ ] pastebin - [ ] nextcloud Loading Loading @@ -106,4 +105,49 @@ docker-compose scale nginx=2 | [X] | ${SITE2} | 80, 443 (redirect 80 to 443) | ### Gitlab runner #### Get the Registration Token Find your runner registration token ($REGISTRATION_TOKEN) at `http://GITLAB_HOST/$PROJECT_GROUP/$PROJECT_NAME/settings/ci_cd`. There is **two** way to register the runner: ##### Register via config file Register the Registration Token to have a Runner Token ```bash curl -X POST 'http://gitlab.${SITE}/api/v4/runners' --form 'token=$REGISTRATION_TOKEN' --form 'description=The Best Runner' ``` ###### Change runner configuration Now change the token in the [configuration file](https://github.com/tomMoulard/make-my-server/blob/master/gitlab/runner/config.toml). ```toml [[runners]] token = "XXXXXXXXXXXXXXXXXXXX" ``` and run the runner ```bash docker-compose up -d runner ``` ##### Register via CLI Steps: - up the runner `docker-compose up -d runner` - register the runner ```bash docker-compose exec runner gitlab-runner register \ --non-interactive \ --executor "docker" \ --docker-image alpine:latest \ --url "http://gitlab/" \ --registration-token "$REGISTRATION_TOKEN" \ --description "The Best Runner" \ --tag-list "docker,aws" \ --run-untagged="true" \ --locked="false" \ --access-level="not_protected" ``` # Authors Main author: - [Tom](tom.moulard.org) Gitlab helper: - [michel_k](mailto:thomas.michelot@epita.fr) No newline at end of file
docker-compose.yml +0 −3 Original line number Diff line number Diff line Loading @@ -96,9 +96,6 @@ services: - gitlab labels: - 'traefik.enable=false' environment: - 'GITLAB_URL=https://gitlab.${SITE}/' - 'GITLAB_TOKEN=_p9fW2gr4GiqAP6zrsaT' nginx: image: nginx:stable-alpine Loading
gitlab/runner/config.toml +23 −8 Original line number Diff line number Diff line concurrent = 10 check_interval = 1 log_level = "info" log_format = "json" log_level = "warning" [session_server] session_timeout = 1800 [[runners]] token = "" name = "The Best Runner" url = "http://gitlab/" name = "runner #1" limit = 0 executor = "docker" environment = ["ENV=value", "LC_ALL=en_US.UTF-8"] [runners.custom_build_dir] [runners.docker] tls_verify = false image = "ubuntu:19.04" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false volumes = ["/cache"] shm_size = 0 [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.custom] run_exec = ""