{"id":16779772,"url":"https://github.com/petermosmans/gitlab-demolab","last_synced_at":"2025-04-10T20:52:49.378Z","repository":{"id":75895116,"uuid":"458136155","full_name":"PeterMosmans/gitlab-demolab","owner":"PeterMosmans","description":"Quickly get a GitLab network up and running. The network consists of a GitLab server, docker-in-docker compatible GitLab runners, and SonarQube","archived":false,"fork":false,"pushed_at":"2025-01-10T17:02:32.000Z","size":145,"stargazers_count":8,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T18:21:36.039Z","etag":null,"topics":["dependency-track","devops","devsecops","devsecops-pipeline","gitlab","gitlab-runners","juice-shop","sonarqube"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PeterMosmans.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-11T10:13:07.000Z","updated_at":"2025-02-01T18:58:43.000Z","dependencies_parsed_at":"2023-05-15T10:31:07.890Z","dependency_job_id":"fe7cf215-0d07-4eb5-827a-3dced62cd0d1","html_url":"https://github.com/PeterMosmans/gitlab-demolab","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterMosmans%2Fgitlab-demolab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterMosmans%2Fgitlab-demolab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterMosmans%2Fgitlab-demolab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterMosmans%2Fgitlab-demolab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeterMosmans","download_url":"https://codeload.github.com/PeterMosmans/gitlab-demolab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248297011,"owners_count":21080309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependency-track","devops","devsecops","devsecops-pipeline","gitlab","gitlab-runners","juice-shop","sonarqube"],"created_at":"2024-10-13T07:32:14.165Z","updated_at":"2025-04-10T20:52:49.349Z","avatar_url":"https://github.com/PeterMosmans.png","language":"Shell","readme":"# GitLab Demolab\n\nThis repository contains all files to automatically configure and set up a local\ndemo environment, consisting of a CI/CD GitLab Community Edition server and\nmultiple (Docker-in-Docker) GitLab runners. Optionally, SonarQube Community\nEdition and Dependency-Track can be configured and set up as well.\n\n## Prerequisites\n\nHave `curl`, `docker`, and `docker-compose` installed.\n\n## Usage\n\n```console\n./installer.sh\n```\n\nThis will fire up an instance of GitLab and two GitLab runners, capable of\nperforming Docker-in-Docker commands.\n\nAll variables are stored in an `.env` file: The `.env` file itself not supplied\nin this repository, but an example is. If you don't create an `.env` file before\nusing the installer, it will automatically copy and use the `env-example` file\nfor you.\n\nThen, you\\'ll need to register the (group of) runners with a valid runner token,\nwhich needs to be created manually: In GitLab, go to the Admin Area / Dashboard,\nclick on Instant Runners, and click on New instance runner\n(`/admin/runners/new`). Select \\\"Run untagged jobs\\\" and click on Create runner.\nThis will generate a new runner token. Copy the token.\n\nLastly, execute the `register-runners.sh` script with that token as parameter.\nThis script will register all runners that are up and running.\n\n## Starting and configuring SonarQube\n\n```console\n./installer.sh sonarqube\n```\n\n## Starting and configuring Dependency-Track\n\n```console\n./installer.sh dependency-track\n```\n\n## Stopping / pausing the demolab\n\n```console\n./installer.sh stop\n```\n\n## Removing the demolab\n\n```console\ndocker-compose down\n```\n\nBy default all data, configuration and logs will be stored in persistent Docker\nvolumes. They will remain, even if you stop or remove the Docker containers. To\nclean everything up, remove the containers including named volumes.\n\n```console\ndocker-compose down --remove-orphans --volumes\n```\n\nPlease note that this is a lab setup - and not meant to be used in production in\nany way. All services only bind / listen to `127.0.0.1` by default (this can be\nchanged in the file `docker-compose`.\n\nFurthermore all runners share one named Docker volume as cache under\n`/srv/cache`. This named volume will be initialized by default, and has lax\npermissions (to ensure all tools can work with it).\n\n## Juice Shop demonstration scripts\n\nFurthermore, the repository contains a number of pipeline example scripts, to\nhelp you add several automated security testing tools to a GitLab pipeline. The\npipeline definition files can be found in the folder [juice-shop](juice-shop/):\n\n- [Basic build pipeline](juice-shop/build-pipeline/)\n- [Detecting secrets in a code base with detect-secrets](juice-shop/detect-secrets/)\n- [Dockerfile linting with Hadolint](juice-shop/hadolint/)\n- [SAST with Njsscan](juice-shop/njsscan/)\n- [SAST with SonarQube](juice-shop/sonarqube/)\n- [Software composition analysis with Dependency-Check](juice-shop/dependency-check/)\n- [Component analysis with Dependency-Track](juice-shop/dependency-track/)\n- [Container vulnerability scanning with Trivy](juice-shop/trivy/)\n- [DAST with ZAP](juice-shop/zap/)\n- [DAST with Nikto](juice-shop/nikto/)\n- [Full automated security testing](juice-shop/full-testing/)\n\n## Variables\n\nThe `DEMO_NAME` allows you to run multiple instances of this demo on the same\nmachine, as it will generate its own \\\"Docker namespace\\\".\n\n`DIND_VERSION` defines the Docker-in-Docker image tag being used.\n\n`DTRACK_API_PORT` defines the port number of the Dependency-Track API interface.\n\n`DTRACK_API_VERSION` defines the Dependency-Track API image tag.\n\n`DTRACK_FRONTEND_PORT` defines the port number on which the web interface of\nDependency-Track will be accessible.\n\n`DTRACK_FRONTEND_VERSION` defines the Dependency-Track frontend image tag.\n\n`GITLAB_HOSTNAME` defines the hostname that will be used to access GitLab.\nPlease note that this name needs to be resolved, see the remarks at the bottom\nof this page.\n\n`GITLAB_PASSWORD` defines the initial password for user `root`.\n\n`GITLAB_PORT` defines the port number on which the web interface of GitLab will\nbe accessible.\n\n`GITLAB_SSH` defines the SSH port number for GitLab.\n\n`GITLAB_VERSION` defines the GitLab image tag being used. Please note that the\nrunners always use the latest version.\n\n`SONARQUBE_HOSTNAME` defines the hostname that will be used to access SonarQube.\nPlease note that this name needs to be resolved, see the remarks at the bottom\nof this page.\n\n`SONARQUBE_PASSWORD` defines the initial password for user `admin`.\n\n`SONARQUBE_PLUGINS` defines a space-delimited list of SonarQube plugins that\nwill be installed at first startup.\n\n`SONARQUBE_PORT` defines the port number on which the web interface of SonarQube\nwill be accessible.\n\n`SONARQUBE_VERSION` allows you to specify which SonarQube image you would like\nto use.\n\n**Important!**\n\nThe GITLAB_PASSWORD needs to be complex, otherwise installation will fail, see\n\u003chttps://about.gitlab.com/handbook/security/password-standard.html\u003e.\n\nIf you want to access the web interfaces using \\\"pretty host names\\\" that are\ndefined using `GITLAB_HOSTNAME` and `SONARQUBE_HOSTNAME` (instead of\n`localhost`), then make sure that they can be resolved by your browser. This can\nbe done for instance by adding them to your local `hosts` file.\n\n# Copyright / License\n\nGreat that you're using this code, hopefully you find it useful! All that I'm\nasking is that you properly attribute the author (Peter Mosmans), and respect\nthe [GPLv3 license](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetermosmans%2Fgitlab-demolab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetermosmans%2Fgitlab-demolab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetermosmans%2Fgitlab-demolab/lists"}