### Start and Manage Cell Instances Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/cells.md Commands to install, start, and manage all configured Cell instances. `gdk cells up` installs and bootstraps new instances, while `gdk cells start` starts all running instances. ```shell gdk cells up ``` ```shell gdk cells start ``` -------------------------------- ### Install and start Colima for Docker Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/runner.md These commands install Docker and Colima, then start the Colima process. Colima is used as a Docker runtime on macOS. ```shell brew install docker colima colima start ``` -------------------------------- ### One-line GDK Installation Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Installs GDK and starts it in a single step using a curl script. Ensure prerequisites are installed first. ```shell curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/install" | bash ``` -------------------------------- ### Setup Geo Secondary Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/geo/advanced_installation.md After starting the secondary GDK instance, run `make geo-secondary-setup` to complete the Geo secondary site configuration. ```shell make geo-secondary-setup ``` -------------------------------- ### Start and Enable Gentoo Services Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Starts PostgreSQL and Redis services and configures them to start automatically on boot. ```shell sudo /etc/init.d/postgresql-15 start sudo /etc/init.d/redis start # And maybe you want to start them automatically on boot: sudo rc-update add postgresql-15 default sudo rc-update add redis default ``` -------------------------------- ### Install Git and Make Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/remote_workstation.md Install the `git` and `make` packages on your remote machine, which are required for GDK installation. ```shell sudo apt install git make ``` -------------------------------- ### Start Primary and Secondary Geo Instances Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/geo/advanced_installation.md Start the primary GDK instance and then start the secondary GDK instance, specifying PostgreSQL for the secondary to ensure it uses its own database instance. ```shell # Run this on your primary instance folder: (../gdk) gdk start # Run this on your secondary instance folder: (../gdk-geo) gdk start postgresql postgresql-geo ``` -------------------------------- ### One-line GDK Installation Source: https://context7.com/gitlab-org/gitlab-development-kit/llms.txt Installs GDK, dependencies, GitLab, and starts services in a single step. Requires git and make. macOS also requires Homebrew. ```shell # Prerequisites: git and make must be installed. # macOS: Homebrew is also required. curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/install" | bash # → prompts for directory name (default: gdk) # → clones GDK, bootstraps, installs GitLab, starts services # → GitLab available at http://localhost:3000 (root / 5iveL!fe) ``` -------------------------------- ### Install GitLab using GDK with Specific Branch Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Install GitLab using GDK and check out a specific GitLab branch from the start, avoiding the need to run `gdk switch` later. ```shell gdk install gitlab_branch= ``` -------------------------------- ### Enable and start Siphon in GDK Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/siphon.md Enable Siphon using the GDK configuration and then start the Siphon services. ```shell gdk config set siphon.enabled true gdk reconfigure gdk start ``` -------------------------------- ### Start Specific GDK Services Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/gdk_commands.md Starts only the specified services. Multiple service names can be provided as arguments. Example starts PostgreSQL and Redis. ```shell gdk start postgresql redis ``` -------------------------------- ### Install GDK Prerequisites on Arch/Manjaro Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Installs Git and make on Arch or Manjaro Linux. Also installs `minio` from the AUR. ```shell sudo pacman -Syu git make yay -S minio # or use your preferred AUR helper (paru, aura, etc...) ``` -------------------------------- ### Install GitLab Geo with GDK Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/geo.md Run this script to install two GDK instances and configure Geo. It clones the GDK, installs software, runs gdk install and start, adds the license, and configures the secondary site. ```shell curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/geo-install" | bash ``` -------------------------------- ### Install Go via Homebrew Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/gitlab_observability_backend.md Install Go using Homebrew as a workaround for macOS code signing issues. ```shell brew install go ``` -------------------------------- ### Install MinIO Binary Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Download and install the MinIO object storage server binary to the system's executable path. Ensure it has execute permissions. ```shell sudo curl "https://dl.min.io/server/minio/release/linux-amd64/minio" --output /usr/local/bin/minio sudo chmod +x /usr/local/bin/minio ``` -------------------------------- ### Start GDK Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/gdk_commands.md Starts the GDK with all default enabled services. Access GitLab at http://localhost:3000. Initial startup may take several minutes. ```shell gdk start ``` -------------------------------- ### gdk.yml Configuration Example Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/runner.md An example of the gdk.yml file showing the runner configuration, including enabled status, executor, token, and extra hosts. ```yaml --- hostname: gdk.test listen_address: 172.16.123.1 runner: enabled: true install_mode: docker executor: docker token: extra_hosts: ["gdk.test:172.16.123.1"] ``` -------------------------------- ### Start Elasticsearch Service Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/elasticsearch.md Use this command to start the Elasticsearch service within your GDK environment. Ensure Elasticsearch is installed and configured. ```shell gdk start elasticsearch ``` -------------------------------- ### Install OpenSUSE Dependencies Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Installs required packages for OpenSUSE Tumbleweed, including development libraries, databases, caching, and build tools. Manually install Go and configure Node.js permissions. ```shell sudo zypper dup # now reboot with "sudo init 6" if zypper reports: # There are running programs which still use files and libraries deleted or updated by recent upgrades. sudo zypper install libxslt-devel postgresql postgresql-devel redis libicu-devel git git-lfs ed cmake \ rpm-build gcc-c++ krb5-devel postgresql-server postgresql-contrib \ libxml2-devel libxml2-devel-32bit findutils-locate GraphicsMagick \ exiftool rsync sqlite3-devel postgresql-server-devel \ libgpg-error-devel libqgpgme-devel yarn curl wget sudo curl "https://dl.min.io/server/minio/release/linux-amd64/minio" --output /usr/local/bin/minio sudo chmod +x /usr/local/bin/minio ``` ```shell curl -O "https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz" sudo tar xpzf go1.14.4.linux-amd64.tar.gz -C /usr/local ``` ```shell mkdir -p ~/mynode/bin ~/mynode/lib npm config set prefix ~/mynode ``` ```shell wget http://smarden.org/runit/runit-2.2.0.tar.gz tar xzf runit-2.2.0.tar.gz cd admin/runit-2.2.0 sed -i -E 's/ -static$//g' src/Makefile ./package/compile ./package/check sudo ./package/install ``` ```shell curl -sSL -o setup_rvm.sh "https://get.rvm.io" chmod a+rx setup_rvm.sh ./setup_rvm.sh source /home/ansible/.rvm/scripts/rvm rvm install 2.7.5 ``` ```shell # to find binaries installed by yarn command export PATH="$HOME/.yarn/bin:$PATH" # to find sshd and redis-server in default path export PATH="$PATH:/usr/sbin" # to find go export PATH="$HOME/go/bin:/usr/local/go/bin:$PATH" # local node packages export PATH="$HOME/mynode/bin:$PATH" # GDK is confused with OSTYPE=linux (suse default) export OSTYPE=linux-gnu ``` ```shell source ~/.bashrc ``` ```shell ruby --version ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux] ``` ```shell bundle config build.gpgme --use-system-libraries ``` -------------------------------- ### Start Multiple Minikube Instances Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/prometheus/_index.md Use the `--profile` flag to start and manage multiple minikube instances simultaneously for different development environments. ```shell minikube start --vm-driver hyperkit --disk-size=20g --profile ce-instance minikube start --vm-driver hyperkit --disk-size=20g --profile ee-instance ``` -------------------------------- ### Install Node.js with nvm Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Install a specific version of Node.js using nvm. Ensure nvm is installed and configured for your shell. ```shell nvm install 18.16.0 ``` -------------------------------- ### Start OpenBao Server in GDK Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/openbao.md Start the OpenBao server process within the GDK environment. ```shell gdk start openbao ``` -------------------------------- ### Install Dependencies with Homebrew Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Install required packages using Homebrew's bundle and individual install commands. This command should be run from the GDK checkout directory. ```shell brew bundle brew install go postgresql@12 minio/stable/minio rbenv redis yarn ``` -------------------------------- ### Example .gitlab-ci.yml for Agentk Deployment Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/kubernetes_agent.md An example `.gitlab-ci.yml` demonstrating how to configure a deployment job to interact with agentk. It uses a kubectl image and sets the cluster certificate authority. ```yaml deploy: image: name: bitnami/kubectl:latest entrypoint: [''] script: - kubectl config get-contexts - kubectl config use-context path/to/project:agentk-name - kubectl config set clusters.gitlab.certificate-authority $CA_CRT - kubectl get pods --namespace gitlab-agent ``` -------------------------------- ### Start Kibana Service Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/elasticsearch.md Start Kibana as a background service using Homebrew. Alternatively, run it in the foreground. ```shell # As a background service brew services start elastic/tap/kibana-full # Or in foreground /opt/homebrew/opt/kibana-full/bin/kibana ``` -------------------------------- ### Start Secondary GDK Databases Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/postgresql.md Start the PostgreSQL and Geo tracking databases on the secondary GDK after reinitializing the Geo tracking database. ```shell gdk start postgresql postgresql-geo ``` -------------------------------- ### Start Minikube with Insecure Registry Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md Alternative method to start Minikube with an insecure registry configuration, simplifying the process for AutoDevOps pipelines. ```shell minikube start --insecure-registry="gdk.test:5100" ``` -------------------------------- ### Install PostgreSQL with Mise Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/postgresql.md Install required PostgreSQL versions defined in the GDK `.tool-versions` file using the `mise` version manager. ```shell mise install ``` -------------------------------- ### Example Flux CD Bootstrap Command Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/flux.md An example of the Flux CD bootstrap command using specific values for URL, private key file, and path. ```shell flux bootstrap git --url=ssh://git@gdk.test:2222/gitlab-org/flux-config.git \ --branch=main \ --private-key-file=/Users/username/.ssh/gdk \ --path=clusters/test-cluster ``` -------------------------------- ### Install GDK with GitLab Repository Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/remote_workstation.md Install the GitLab Development Kit using the Ruby gem and then configure it to use a specific GitLab repository. ```shell gem install gitlab-development-kit ``` ```shell gdk install gitlab_repo=git@gitlab.com:gitlab-org/gitlab.git ``` -------------------------------- ### Install FreeBSD Dependencies Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Installs necessary packages for GDK on FreeBSD using pkg. ```shell sudo pkg install postgresql10-server postgresql10-contrib \ redis go node icu krb5 gmake re2 GraphicsMagick p5-Image-ExifTool git-lfs minio sqlite3 ``` -------------------------------- ### Start minikube on macOS Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/prometheus/_index.md Start a minikube cluster using the hyperkit driver, specifying disk size and Kubernetes version. Ensure network filters are configured if necessary. ```shell minikube start --vm-driver hyperkit --disk-size=20g --kubernetes-version=v1.15.4 ``` -------------------------------- ### Install kubectl component Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/kubernetes/_index.md Install the kubectl command-line tool as a component of the Google Cloud SDK. This allows you to interact with your Kubernetes clusters. ```shell gcloud components install kubectl ``` -------------------------------- ### Install GitLab Development Kit Gem Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Install the gitlab-development-kit gem to manage GDK functionalities. ```shell gem install gitlab-development-kit ``` -------------------------------- ### Install GDK Prerequisites on Ubuntu/Debian Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Installs Git and make on Ubuntu or Debian systems. Updates package lists and adds a PPA for the latest Git version. ```shell sudo apt update sudo apt install software-properties-common sudo add-apt-repository ppa:git-core/ppa sudo apt install git make ``` -------------------------------- ### GitLab Runner Configuration File Example Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/runner.md An example of the complete gitlab-runner-config.toml file after applying GDK configurations, including Docker executor settings. ```toml concurrent = 1 check_interval = 0 [session_server] session_timeout = 1800 [[runners]] name = "example description" url = "http://gdk.test:3000/" id = 1 token = "" token_obtained_at = 2022-09-22T07:34:57Z token_expires_at = 0001-01-01T00:00:00Z executor = "docker" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] [runners.docker] tls_verify = false image = "ruby:2.7" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false volumes = ["/cache"] extra_hosts = ["gdk.test:172.16.123.1"] shm_size = 0 ``` -------------------------------- ### Two-step GDK Installation Source: https://context7.com/gitlab-org/gitlab-development-kit/llms.txt Clones the GDK repository and bootstraps dependencies using `mise`, then installs GitLab. Supports SSH remotes and specific branches. ```shell # 1. Clone and bootstrap dependencies git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git gdk cd gdk mise trust make bootstrap # installs Ruby, Go, Node.js, PostgreSQL, Redis … via mise # 2. Install GitLab (HTTPS clone, no GitLab.com account required) gdk install # Install with SSH remote (requires GitLab.com SSH key) gdk install gitlab_repo=git@gitlab.com:gitlab-org/gitlab.git # Install a specific branch from the start (avoids running gdk switch later) gdk install gitlab_branch=my-feature-branch # Blobless clone for faster download / less disk usage gdk install blobless_clone=true ``` -------------------------------- ### Start Kerberos KDC Container Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/kerberos.md Build and start a Docker container with a Kerberos KDC for the GDK.TEST realm. ```shell docker-compose up ``` -------------------------------- ### Install Core Development Packages Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/remote_workstation.md Install essential packages for development on Ubuntu/Debian systems, including git, make, yarn, PostgreSQL, and Go. ```shell sudo apt install git make yarnpkg ``` ```shell sudo ln -s /usr/bin/yarnpkg /usr/bin/yarn ``` ```shell sudo apt install postgresql postgresql-contrib ``` ```shell sudo apt install golang ``` -------------------------------- ### Install Ruby Dependencies Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Install all required Ruby dependencies for the GitLab Development Kit using Bundler. ```shell bundle install ``` -------------------------------- ### Container Registry Log Output Example Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md Example log output from the container registry, showing the 'version' field indicating a development build is active. ```plaintext 2024-09-26_21:36:36.51052 registry : {"go_version":"go1.22.0","instance_id":"2b3c8aba-4214-4f97-988b-21b6043e08be","level":"info","msg":"listening on [::]:5100","time":"2024-09-26T15:36:36.510-06:00","version":"registry-dev"} ``` -------------------------------- ### GDK Start Output for KAS URL Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/kubernetes_agent.md This output shows the available URLs after running `gdk start`, including the GitLab instance and the KAS endpoint. ```plaintext => GitLab available at http://127.0.0.1:3000. => GitLab Relay (KAS) available at grpc://127.0.0.1:8150. ``` -------------------------------- ### Start minikube on Linux Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/prometheus/_index.md Start a minikube cluster using the kvm2 driver, specifying disk size and Kubernetes version. Additional packages and services may be required on Linux. ```shell minikube start --vm-driver kvm2 --disk-size=20g --kubernetes-version=v1.15.4 ``` -------------------------------- ### Set up loop device and filesystem Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/simulate_storage.md Make the disk image available as a block device using `losetup`, then create a filesystem on it. ```shell sudo losetup -f disk.img sudo mkfs.ext4 /dev/loop0 ``` -------------------------------- ### Run Hello-World Image via Dependency Proxy (Linux) Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/dependency_proxy.md Pull and run the 'hello-world' image through the dependency proxy on Linux. Ensure you are logged in first. ```shell sudo docker run localhost:3000/gitlab-org/dependency_proxy/containers/hello-world:latest ``` -------------------------------- ### Install GitLab using GDK (SSH) Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Install GitLab using GDK with SSH, recommended for users with write access to the GitLab.org group. ```shell gdk install gitlab_repo=git@gitlab.com:gitlab-org/gitlab.git ``` -------------------------------- ### Install Watch Command on macOS Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/kubernetes/useful_commands.md Installs the 'watch' utility on macOS using Homebrew, which is needed for continuously monitoring logs. ```shell brew install watch ``` -------------------------------- ### Install Packages on Arch Linux Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Installs packages listed in 'packages_arch.txt' using pacman. Ensure 'packages_arch.txt' is correctly formatted and contains only package names. ```shell sudo pacman -S $(sed -e 's/#.*//' packages_arch.txt) ``` -------------------------------- ### Start GDK Services Source: https://context7.com/gitlab-org/gitlab-development-kit/llms.txt Starts all enabled GDK services or a specified subset. Options include waiting for GitLab to be ready, opening the browser, and suppressing output. ```shell # Start all enabled services gdk start # Start only specific services gdk start postgresql redis # Start and wait until GitLab is fully booted gdk start --show-progress # Start and automatically open the browser when ready gdk start --open-when-ready # Suppress all output gdk start --quiet ``` -------------------------------- ### Install runit-systemd with yay on Arch Linux Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Installs the 'runit-systemd' package using the 'yay' AUR helper. This is an alternative to systemd for managing services. ```shell yay -S runit-systemd ``` -------------------------------- ### Start Rails Console Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/rails_console.md Navigate to the GitLab directory within your GDK and execute this command to start the Rails console. Type 'quit' to exit. ```shell cd /gitlab bundle exec rails console ``` -------------------------------- ### GDK Configuration Reference Example Source: https://context7.com/gitlab-org/gitlab-development-kit/llms.txt This `gdk.yml` example demonstrates common settings for GDK, including port configuration, AI services, object storage, Vite/webpack usage, Puma workers, Geo enablement, environment variables, and lifecycle hooks. ```yaml # gdk.yml — example combining common settings # Change the port GDK listens on (useful for running two GDKs in parallel) port: 3001 port_offset: 1000 # shifts ALL ports by 1000 # Listen address listen_address: 127.0.0.1 # Enable AI services (GitLab AI Gateway + Duo Workflow) ai_services: enabled: true # Object storage via MinIO object_store: enabled: true # Use Vite instead of webpack for frontend assets vite: enabled: true port: 3038 webpack: enabled: false # Run Puma in single mode (saves ~200 MB RAM) gitlab: rails: puma: workers: 0 cache_classes: false # set true to disable Rails class reloading # Enable GitLab Geo geo: enabled: true # Global environment variables (applied to all services) env: RAILS_ENV: development MY_CUSTOM_VAR: "value" # Lifecycle hooks gdk: debug: false use_precompiled_ruby: true start_hooks: before: [] after: [] stop_hooks: before: [] after: [] update_hooks: before: - support/exec-cd gitlab bin/spring stop || true after: [] protected_config_files: - 'gitaly/*.toml' shell_completion: true # Redis backend (redis or valkey) redis: backend: redis # ClickHouse (analytics) clickhouse: enabled: true tcp_port: 9001 http_port: 8123 # Webpack memory-saving options webpack: enabled: true port: 3808 static: false # true = compile once at startup, no watcher vendor_dll: false # true = move vendor deps to a pre-built DLL incremental: true incremental_ttl: 30 # days before page bundles are evicted sourcemaps: true live_reload: true ``` -------------------------------- ### Install runit-systemd with pikaur on Arch Linux Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Installs the 'runit-systemd' package using the 'pikaur' AUR helper. This is an alternative to systemd for managing services. ```shell pikaur -S runit-systemd ``` -------------------------------- ### Install and Update Dependencies Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/gitlab_version.md After switching to a new GitLab version, run these commands to install or update project dependencies. This ensures compatibility with the selected version. ```shell bundle install yarn install ``` -------------------------------- ### Start Hugo Development Server Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc-site/README.md Starts the Hugo development server for live previewing documentation changes. The server defaults to port 1313. ```bash hugo server -D ``` -------------------------------- ### Start GDK and Test IP Connectivity Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/local_network.md Start the GDK server and check the output to confirm your IP address and port are displayed, indicating successful IP address connectivity. ```shell # Should print your IP address and port when server starts gdk start ``` -------------------------------- ### Install Void Linux Dependencies Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Installs essential packages for Void Linux, including Ruby, Go, PostgreSQL, Redis, and build utilities. This command ensures all necessary components are present for GDK setup. ```shell sudo xbps-install -Su sudo xbps-install ruby ruby-devel minio icu icu-libs icu-devel \ go redis yarn GraphicsMagick sqlite sqlite-devel pkg-config \ postgresql13 postgresql13-client postgresql13-contrib postgresql-libs postgresql-libs-devel \ meson ninja ``` -------------------------------- ### Install GitLab using GDK (HTTPS) Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Install GitLab using GDK with HTTPS, suitable for users without write access to the GitLab.org group. ```shell gdk install ``` -------------------------------- ### Example Cell Services Status Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/cells.md Output indicating the status of various services for a Cell instance after starting. ```shell ok: run: /path/to/gdk/gitlab-cells/cell-2/services/postgresql: (pid 16197) 1s, normally down ok: run: /path/to/gdk/gitlab-cells/cell-2/services/redis: (pid 16213) 0s, normally down ok: run: /path/to/gdk/gitlab-cells/cell-2/services/praefect: (pid 16234) 1s, normally down ok: run: /path/to/gdk/gitlab-cells/cell-2/services/praefect-gitaly-0: (pid 16235) 1s, normally down ok: run: /path/to/gdk/gitlab-cells/cell-2/services/gitlab-http-router: (pid 16243) 0s, normally down ok: run: /path/to/gdk/gitlab-cells/cell-2/services/gitlab-workhorse: (pid 16244) 0s, normally down ok: run: /path/to/gdk/gitlab-cells/cell-2/services/rails-background-jobs: (pid 16245) 0s, normally down ok: run: /path/to/gdk/gitlab-cells/cell-2/services/rails-web: (pid 16247) 0s, normally down ok: run: /path/to/gdk/gitlab-cells/cell-2/services/sshd: (pid 16246) 0s, normally down ok: run: /path/to/gdk/gitlab-cells/cell-2/services/vite: (pid 16248) 0s, normally down => GitLab available at http://127.0.0.1:12001. => - Ruby: ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [arm64-darwin23]. => - Node.js: v20.12.2. => The HTTP Router is available at http://127.0.0.1:12001. ``` -------------------------------- ### Initialize Google Cloud SDK Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/kubernetes/_index.md Run the gcloud init command to set up your default zone and project, and log in with your Google account. This step is crucial for configuring the SDK. ```shell gcloud init ``` -------------------------------- ### Run GDK Doctor Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Use `gdk doctor` to detect installation problems and get possible solutions. ```shell gdk doctor ``` -------------------------------- ### Run LDAP Daemon Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/ldap.md Starts the LDAP daemon (slapd) and keeps it attached to the current terminal. Use this after manual setup or configuration changes. ```shell ./run-slapd # stays attached in the current terminal ``` -------------------------------- ### Run Hello-World Image via Dependency Proxy (macOS/Other) Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/dependency_proxy.md Pull and run the 'hello-world' image through the dependency proxy. This verifies the Docker daemon configuration for insecure registries. ```shell sudo docker run 0.0.0.0:3000/gitlab-org/dependency_proxy/containers/hello-world:latest ``` -------------------------------- ### Ruby Build Error with Disabled SIP Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/ruby.md Example of a build failure when installing the `rbs-2.7.0` gem on macOS with System Integrity Protection (SIP) disabled. ```plaintext .... rbs 2.7.0 Building native extensions. This could take a while... /private/var/folders/rd/h6s2crs17xv0btgdvxc020sr0000gr/T/ruby-build.20230823184744.71172.TjwoSj/ruby-3.1.4/lib/rubygems/ext/builder.rb:95:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError) ``` -------------------------------- ### Start GOB Manually After Rebuild Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/gitlab_observability_backend.md Manually start the gitlab-observability-backend service after rebuilding to confirm it starts correctly. ```shell ./all-in-one ``` -------------------------------- ### Install Acceptable Node.js Version with NVM Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/node_js.md If your Node.js version is incompatible, use this command to install a suitable version. Replace `` with the desired Node.js version. ```shell nvm install ``` -------------------------------- ### Install Ruby with rbenv Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Install a specific version of Ruby using rbenv. Ensure rbenv is installed and configured for your shell. ```shell rbenv install 2.7.5 ``` -------------------------------- ### Install Gentoo Linux Dependencies Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Installs essential packages for GDK on Gentoo Linux using emerge. Ensure you read the emerge output for PostgreSQL configuration. ```shell sudo emerge --noreplace app-admin/sudo app-arch/unzip app-crypt/gnupg app-crypt/mit-krb5 dev-build/meson dev-build/ninja dev-db/postgresql dev-db/redis dev-db/sqlite dev-lang/go dev-libs/icu dev-libs/libpcre2 dev-libs/libyaml dev-libs/openssl dev-python/docutils dev-util/cmake dev-util/pkgconf dev-util/yamllint dev-vcs/git dev-vcs/git-lfs media-gfx/graphicsmagick media-libs/exiftool net-libs/nodejs net-misc/curl net-misc/wget sys-apps/ed sys-apps/net-tools sys-apps/which sys-apps/yarn sys-apps/util-linux sys-libs/readline sys-libs/zlib sys-process/psmisc sys-process/runit virtual/openssh ``` ```shell sudo emerge --config dev-db/postgresql:15 ``` -------------------------------- ### Install and Configure NFS Server on Ubuntu/Debian Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/nfs.md Installs the NFS kernel server, creates necessary directories, sets ownership, and configures exports for NFS. Restarts services to apply changes. ```shell sudo apt-get install -y nfs-kernel-server # All our NFS exports (data on the 'server') is under /exports/gitlab-data sudo mkdir -p /exports/gitlab-data/{repositories,gitlab-satellites,.ssh} # We assume your developer user is git:git sudo chown git:git /exports/gitlab-data/{repositories,gitlab-satellites,.ssh} sudo mkdir /etc/exports.d echo '/exports/gitlab-data 127.0.0.1(rw,sync,no_subtree_check)' | sudo tee /etc/exports.d/gitlab-data.exports sudo service portmap restart sudo service nfs-kernel-server restart sudo exportfs -v 127.0.0.1:/exports/gitlab-data # should show /exports/gitlab-data ``` -------------------------------- ### Install Gems with Custom Bundle Path Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/ruby.md Avoid permission problems during `bundle install` on system-wide Ruby installations by specifying a custom `BUNDLE_PATH`. This directs gem installations to a local directory, bypassing system write restrictions. ```shell make BUNDLE_PATH=$(pwd)/vendor/bundle ``` -------------------------------- ### Create dummy interface on Linux Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/local_network.md Set up a dummy network interface on Linux with a private IP address for GDK. This requires root privileges. ```shell sudo ip link add dummy0 type dummy sudo ip address add 172.16.123.1 dev dummy0 sudo ip link set dummy0 up ``` -------------------------------- ### Install GDK gem and reshim mise Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/mise.md If the 'gdk' command is still missing after installing Ruby versions, install the GDK gem and then run 'mise reshim'. ```shell gem install gitlab-development-kit mise reshim ``` -------------------------------- ### Initialize New PostgreSQL Data Folder Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/postgresql.md Initialize a new data folder for a newly installed PostgreSQL version by running the `make` command. ```shell make postgresql/data ``` -------------------------------- ### Run Super Simple Proxy for GoProxy Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/package.md Use this command to run the Super Simple Proxy, which is necessary for GoProxy to work with GDK. Ensure you replace the paths with your actual certificate and key file locations. ```shell go run . -netrc -secure gdk.test:443 -key /path/to/gdk.test-key.pem -cert /path/to/gdk.test.pem -insecure gdk.test:80 -forward gdk.test,gdk.test:3443 ``` -------------------------------- ### Run AI Gateway Setup Task Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/ai/gitlab_ai_gateway.md Execute the `setup_ai_development` Rake task from your GDK root directory to set up the AI development environment. This task orchestrates the setup of AI services, Duo projects, and runners. ```shell gdk rake setup_ai_development ``` -------------------------------- ### Install Gitaly Ruby Dependencies Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/_index.md When encountering issues with Praefect, such as 'primary is not healthy', ensure Gitaly Ruby dependencies are installed by running `bundle install` in the `gitaly/ruby` directory. ```shell cd gitaly/ruby bundle install ``` -------------------------------- ### Install Rosetta on M1/M2 Macs Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/apple_mx_machines.md Run this command to install Rosetta, which allows execution of x86_64 binaries on arm64 systems. Be aware that all x86_64 binaries will run silently after installation. ```shell softwareupdate --install-rosetta ``` -------------------------------- ### Start go-camo Asset Proxy Server Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/asset_proxy.md Run the go-camo executable with specific flags for key, content types, and headers. Ensure you are in the correct directory after building. ```shell cd build/bin ./go-camo -k "somekey" --allow-content-video -H "Content-Security-Policy: media-src 'self'" ``` -------------------------------- ### Install Lefthook Managed Git Hooks Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/lefthook.md After installing the Lefthook gem, run this command to install the Git hooks managed by Lefthook. This ensures your Git workflow integrates with Lefthook. ```shell bundle exec lefthook install ``` -------------------------------- ### Configure Multiple GDK Instances with Port Offsets Source: https://context7.com/gitlab-org/gitlab-development-kit/llms.txt Sets up a second GDK instance to run on ports offset by 1000 from the default. Verifies claimed ports and starts the instance. ```shell # GDK instance #1 — default ports (3000, 3808, …) # GDK instance #2 — offset all ports by 1000 cd gdk2 gdk config set port_offset 1000 gdk rake claimed_ports # verify: GDK now runs on 4000, webpack on 4808, … gdk reconfigure gdk start ``` -------------------------------- ### Install Thrift with C++ Flags Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/ruby.md Work around issues with the Thrift gem installation on macOS by setting the `-fdeclspec` flag. This is useful when the default installation fails due to compiler or linker errors. ```shell gem install thrift -v 0.16.0 -- --with-cppflags='-fdeclspec' ``` -------------------------------- ### Add kubectl to PATH Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/prometheus/_index.md Make the downloaded kubectl binary executable and move it to a directory in your system's PATH. ```shell chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin/ ``` -------------------------------- ### Install mkcert and Generate Certificate Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/nginx.md Installs `mkcert` and its dependency `nss` on macOS, then installs `mkcert`'s root CA. This tool is used to generate self-signed certificates that are trusted by the browser and OS. ```shell brew install mkcert nss mkcert -install ``` -------------------------------- ### Install GitLab for Secondary Geo Site Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/geo/advanced_installation.md Install GitLab for the secondary Geo site, optionally using the `gitlab_repo` parameter to point to the primary GDK's GitLab repository for faster installation. ```shell gdk install gitlab_repo=../gdk/gitlab ``` -------------------------------- ### Compile and Install runit on Linux Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Downloads, compiles, and prepares the runit package for installation. It involves modifying Makefiles and running compilation scripts. Ensure the 'command/' directory is added to your PATH. ```shell wget http://smarden.org/runit/runit-2.2.0.tar.gz ``` ```shell tar xzf runit-2.2.0.tar.gz ``` ```shell cd admin/runit-2.2.0 ``` ```shell sed -i -E 's/ -static$//g' src/Makefile ``` ```shell sed -i -E 's/-O2 -Wall/-O2 -Wall -std=gnu89/g' src/conf-cc ``` ```shell ./package/compile ``` ```shell ./package/check ``` -------------------------------- ### Configure dummy interface persistence on Ubuntu Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/local_network.md Use `nmcli` to add a dummy interface with a specified IP address, making it persistent across reboots on Ubuntu systems. ```shell sudo nmcli connection add type dummy ifname dummy0 ip4 172.16.123.1 ``` -------------------------------- ### Manually Start Background Jobs Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/_index.md Confirm that `rails-background-jobs` can be started manually by running this command. ```shell RAILS_ENV=development ./bin/background_jobs start_foreground ``` -------------------------------- ### Troubleshooting MinIO Startup Errors Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/object_storage.md If MinIO fails to start, check the logs for 'Incorrect Usage: flag provided but not defined: -compat'. This indicates an old MinIO version is in use. Upgrading MinIO to the latest version typically resolves this issue. ```plaintext Incorrect Usage: flag provided but not defined: -compat ``` -------------------------------- ### Install Thrift with LLVM 14 Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/ruby.md Resolve Thrift installation problems on macOS by upgrading to a newer version of Xcode or manually installing and configuring LLVM 14. This ensures compatibility with newer compiler requirements. ```shell brew install llvm@14 echo 'export PATH="/usr/local/opt/llvm@14/bin:$PATH"' >> ~/.zshrc gem install thrift -v 0.16.0 ``` -------------------------------- ### Configure Basic NGINX in gdk.yml Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/nginx.md Enables NGINX and sets the hostname in the `gdk.yml` configuration file for basic GDK setup. ```yaml --- hostname: gdk.test nginx: enabled: true http: enabled: true ``` -------------------------------- ### Manually Start GOB Service Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/gitlab_observability_backend.md Manually start the gitlab-observability-backend service to troubleshoot startup issues. ```shell cd gitlab/gitlab-observability-backend/go/cmd/all-in-one ./all-in-one ``` -------------------------------- ### Add minikube to PATH Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/prometheus/_index.md Make the downloaded minikube binary executable and move it to a directory in your system's PATH. ```shell chmod +x ./minikube sudo mv ./minikube /usr/local/bin/ ``` -------------------------------- ### Build and tag a Docker image Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md Build a Docker image and tag it with your local registry's address. ```shell docker build -t gdk.test:5100/custom-docker-image . ``` -------------------------------- ### Install mkcert CA on Linux Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/nginx.md Installs `mkcert`'s root CA certificate into the system's trust store on Linux distributions, preserving the user's HOME environment variable to ensure correct installation path. ```shell sudo --preserve-env=HOME mkcert -install ``` -------------------------------- ### Install GDK Prerequisites on macOS Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Installs the Command Line Tools package for Git on macOS if you have upgraded the OS. ```shell xcode-select --install ``` -------------------------------- ### Resolve Bundler LoadError Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/ruby.md Update the bundler using `gem install bundler` to resolve `LoadError` when running `bundle install`. ```shell /Users//.asdf/installs/ruby/3.1.4/bin/bundle:25:in `load': cannot load such file -- /Users//.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/bundler-2.4.20/exe/bundle (LoadError) from /Users//.asdf/installs/ruby/3.1.4/bin/bundle:25:in `
' ``` ```shell gem install bundler ``` -------------------------------- ### Install PostgreSQL 12 with Homebrew Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/postgresql.md Install a specific version of PostgreSQL (e.g., version 12) using Homebrew on macOS. ```shell brew install postgresql@12 ``` -------------------------------- ### Install Kibana with Homebrew Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/elasticsearch.md Install the Kibana full package using Homebrew. This provides the Dev Tools interface for Elasticsearch. ```shell brew tap elastic/tap brew install elastic/tap/kibana-full ``` -------------------------------- ### Install GDK Dependencies with mise Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/_index.md Installs all GDK dependencies using `mise` after cloning the repository and configuring `mise` trust. ```shell make bootstrap ``` -------------------------------- ### Install Yarn Globally Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Install Yarn, a JavaScript package manager, globally using npm. This is required for managing Node.js dependencies. ```shell npm install --global yarn ``` -------------------------------- ### Install Dependencies on Fedora Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Installs essential development packages, including PostgreSQL, Redis, development libraries, and build tools, on Fedora systems. Also downloads and makes the 'minio' executable available system-wide. ```shell sudo dnf install postgresql postgresql-libs redis libicu-devel \ git git-lfs ed make cmake rpm-build gcc-c++ krb5-devel go postgresql-server \ postgresql-contrib postgresql-devel GraphicsMagick sqlite-devel \ perl-Digest-SHA perl-Image-ExifTool rsync libyaml-devel ``` ```shell sudo curl "https://dl.min.io/server/minio/release/linux-amd64/minio" --output /usr/local/bin/minio ``` ```shell sudo chmod +x /usr/local/bin/minio ``` -------------------------------- ### Automated GitLab Geo Installation Source: https://context7.com/gitlab-org/gitlab-development-kit/llms.txt Installs a primary and secondary GitLab Geo pair. Requires setting a GITLAB_ACTIVATION_CODE environment variable. ```shell # Automated Geo installation (2 GDKs in gdk/ and gdk2/) export GITLAB_ACTIVATION_CODE=your_activation_code curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/geo-install" | bash ``` ```shell # Custom directory names curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/geo-install" | \ bash -s primary-gdk secondary-gdk ``` -------------------------------- ### Example .gitlab-ci.yml for Testing Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/runner.md A basic .gitlab-ci.yml file to test if your newly configured runner is working correctly by running a simple build job. ```yaml build-job: # This job runs in the build stage, which runs first. stage: build script: - echo "Compiling the code..." - echo "Compile complete." ``` -------------------------------- ### Prepare Secondary PostgreSQL for Replication Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/geo/advanced_installation.md Prepare the secondary GDK's PostgreSQL database for replication by stopping the server, removing the existing data directory, creating a symbolic link to the primary's data directory, and initializing the secondary database with replication. ```shell # terminal window 2: cd gdk-geo gdk stop postgresql rm -r postgresql/data # From the gdk-geo folder: ln -s ../gdk/postgresql postgresql-primary # terminal window 2: make postgresql-geo-replication-secondary ``` -------------------------------- ### Install Dependencies on CentOS Source: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/advanced.md Installs essential development packages, including PostgreSQL, Redis, development libraries, and build tools, on CentOS 8.2. It also installs EPEL repository, downloads and makes the 'minio' executable available, and sets up a specific Ruby version using RVM. ```shell sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm ``` ```shell sudo dnf install postgresql-server postgresql-devel libicu-devel git git-lfs cmake \ gcc-c++ go redis ed fontconfig freetype libfreetype.so.6 libfontconfig.so.1 \ libstdc++.so.6 npm GraphicsMagick perl-Image-ExifTool \ rsync sqlite-devel make ``` ```shell sudo curl "https://dl.min.io/server/minio/release/linux-amd64/minio" --output /usr/local/bin/minio ``` ```shell sudo chmod +x /usr/local/bin/minio ``` ```shell # This example uses Ruby 2.7.5. Substitute with the current version if different. ``` ```shell sudo rvm install 2.7.5 ``` ```shell sudo rvm use 2.7.5 ``` ```shell #Ensure your user is in rvm group ``` ```shell sudo usermod -a -G rvm ``` ```shell #add iptables exceptions, or sudo service stop iptables ```