Getting Started

Before You Begin

Each code block includes a copy button.

The content displayed in the documentation is intended to help you understand what is being created or configured. The copy button copies a platform-specific command that performs the complete operation automatically.

  • 16 GB RAM
  • Recent multi-core CPU

Pre-requisites

Linux (Ubuntu/Debian)

Linux (Ubuntu / Debian)
sudo apt update
sudo apt install -y docker.io docker-compose-plugin
docker --version

Mac

  • We support the current macOS release
  • Apple Silicon Mac recommended
  • Docker Compose is included with Docker Desktop

Windows

  • Windows 11 Pro, Enterprise, or Education (Home also works with WSL2, but Pro is smoother for virtualization tooling)
  • Virtualization enabled in BIOS (Intel VT-x or AMD-V)
  • Install WSL2
Windows (Powershell)
wsl --install -d Ubuntu

Deploy your first project locally in under 5 minutes

After completing the onboarding process, a test project named GitLab Cortex Demo will be automatically created.

What You’ll Deploy

The GitLab Cortex Demo project is a self-contained distributed system designed to showcase how Cortex models, generates, and deploys complete development environments.

In less than 5 minutes, you’ll deploy a fully functional platform including:

  • GitLab for source code management
  • PostgreSQL as the application database
  • OpenLDAP for identity management
  • pgAdmin for database administration
  • phpLDAPadmin for LDAP administration
  • Reverse proxying and TLS termination
  • Production-aligned networking and service discovery with Traefik

Why This Project Exists

This project demonstrates how Cortex can:

  • Model an entire distributed system from a single source of truth
  • Generate deployment artifacts automatically
  • Standardize development environments across teams
  • Reduce configuration drift between development and production
  • Enable developers to run complex systems locally

Important

This environment is intended for demonstration, testing, and evaluation purposes only.

It is not production-ready and should not be deployed as-is. Security, scalability, monitoring, backup, and operational requirements have been intentionally simplified to keep the setup easy to understand and deploy.

Let's get started

Please select the GitLab Cortex Demo project and generate the artifact Docker Compose Files.

Unzip the archive, open a terminal and navigate to the unzipped folder.

Create shared docker networks

MacOS / Linux (Ubuntu/Debian)
docker network create gateway-net
docker network create backend-net
Windows Powershell
docker network create gateway-net
docker network create backend-net

Generate a root certificate (skip if you already have one)

MacOS / Linux (Ubuntu/Debian)
chmod +x generate-root-ca.bash
./generate-root-ca.bash cortexRootCertificate
Windows Powershell
bash ./generate-root-ca.bash cortexRootCertificate

If you want your browser and tools (curl, Chrome, etc.) to trust the TLS certificates generated for the platform, you should install the generated root certificate into your system trust store.

Mac OS
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain cortexRootCertificate.crt
Linux (Ubuntu/Debian)
sudo cp cortexRootCertificate.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
Windows PowerShell
Import-Certificate -FilePath cortexRootCertificate.crt -CertStoreLocation Cert:\LocalMachine\Root
Get-ChildItem Cert:\LocalMachine\Root

Generate TLS certificates

We'll now generate the application certificates using the provided root certificate.

MacOS / Linux (Ubuntu/Debian)
chmod +x make-certs-development.bash
./make-certs-development.bash ./cortexRootCertificate.crt ./cortexRootCertificate.key
Windows Powershell
bash ./make-certs-development.bash ./cortexRootCertificate.crt ./cortexRootCertificate.key

We are using here the cortexRootCertificate.* files generated in the previous step. You may replace these files with your own root certificate if you want the generated TLS certificates to be trusted by your internal PKI.

Configure OpenLDAP users

The OpenLDAP container automatically imports LDIF files located in the ldap-custom directory during initialization.

Create a directory named ldap-custom and add a file named 50-users.ldif containing the following user definition.

You may add additional LDAP users by extending this file.

MacOS / Linux (Ubuntu/Debian)
dn: uid=gitlabuser,dc=example,dc=org
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
cn: Gitlab User
sn: User
uid: gitlabuser
mail: gitlabuser@example.org
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/gitlabuser
loginShell: /bin/bash
userPassword: password123
Windows PowerShell
dn: uid=gitlabuser,dc=example,dc=org
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
cn: Gitlab User
sn: User
uid: gitlabuser
mail: gitlabuser@example.org
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/gitlabuser
loginShell: /bin/bash
userPassword: password123

Start the project

The ROOT_CA_FILE argument allows the Chromium container to trust the root certificate used to generate the TLS certificates.

MacOS / Linux (Ubuntu/Debian)
ROOT_CA_FILE=cortexRootCertificate.crt docker compose -f docker-compose-development.yaml -f docker-compose-common.yml up -d --build
Windows Powershell
$env:ROOT_CA_FILE="cortexRootCertificate.crt"; docker compose -f docker-compose-development.yaml -f docker-compose-common.yml up -d --build

Connect to GitLab

You can connect to GitLab using the embedded Chromium service: http://localhost:5800 and navigate to:

You can connect with the user: gitlabuser@example.org | password123

If you want to connect from your web browser, you'll have to install the root certificate on your local TrustStore and declare the hosts in /etc/hosts

MacOS / Linux (Ubuntu/Debian)
127.0.0.1       gitlab.dev.cortexdemo.com
127.0.0.1       phpldapadmin.dev.cortexdemo.com
127.0.0.1       pgadmin.dev.cortexdemo.com
Windows PowerShell
127.0.0.1       gitlab.dev.cortexdemo.com
127.0.0.1       phpldapadmin.dev.cortexdemo.com
127.0.0.1       pgadmin.dev.cortexdemo.com

Stop the project

MacOS / Linux (Ubuntu/Debian) / Windows Powershell
docker compose -f docker-compose-development.yaml -f docker-compose-common.yml down