Skip to content

Latest commit

 

History

History
220 lines (141 loc) · 6.62 KB

index.md

File metadata and controls

220 lines (141 loc) · 6.62 KB

Install and configure GDK

GitLab Development Kit (GDK) provides a local environment for developing GitLab and related projects.

Install prerequisites

Installation requires Git and make are installed.

macOS

git and make are installed by default.

Ubuntu/Debian

  1. Update the list of available packages:

    sudo apt update
  2. Add an apt repository for the latest version of Git.

    • For Ubuntu, install add-apt-repository and add a PPA repository:

      sudo apt install software-properties-common
      sudo add-apt-repository ppa:git-core/ppa
    • For Debian, add a backport repository for your Debian version.

  3. Install Git and Make:

    sudo apt install git make

Arch and Manjaro Linux

Update the list of available packages and install Git and Make:

sudo pacman -Syu git make

Other

Install using your system's package manager.

One-line installation

The one-line installation:

  • Clones the GDK project into a new gitlab-development-kit directory in the current working directory.
  • Installs asdf and necessary asdf plugins.
  • Runs gdk install.
  • Runs gdk start.
  1. Follow dependency installation instructions.

  2. Install GDK:

    curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/install" | bash

Simple Installation

After prerequisites are installed, you can install GDK dependencies and GDK itself.

Install dependencies

Before installing GDK, your local environment must have third-party software installed and configured. These can be installed and managed automatically using asdf or manually.

If you've previously managed your own dependencies, you can migrate to asdf to allow GDK to manage dependencies for you.

Automatically using asdf

Installing and managing dependencies automatically lets GDK manage dependencies for you using asdf:

  1. Clone the gitlab-development-kit repository into your preferred location, if you haven't previously:

    git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git
  2. Change into the GDK project directory:

    cd gitlab-development-kit
  3. Install all dependencies using asdf:

    make bootstrap
  4. If migrating from other version managers like RVM or rbenv, you can set legacy_version_file in .asdfrc to load the Ruby version from a different config file like .ruby-version.

Manually

Use your operating system's package manager to install and managed dependencies. Advanced instructions are available to help. These include instructions for macOS, Ubuntu, and Debian (and other Linux distributions), FreeBSD, and Windows 10. You should regularly update these. Generally, the latest versions of these dependencies work fine. Install, configure, and update all of these dependencies as a non-root user. If you don't know what a root user is, you very likely run everything as a non-root user already.

After installing GDK dependencies:

  1. Install the gitlab-development-kit gem:

    gem install gitlab-development-kit
  2. Clone the gitlab-development-kit repository into your preferred location:

    git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git

    The default directory created is gitlab-development-kit. This can be customized by appending a different directory name to the git clone command.

  3. Change into the GDK project directory:

    cd gitlab-development-kit
  4. Install all the Ruby dependencies:

    bundle install

Install GDK

Install GDK by cloning and configuring GitLab and other projects using gdk install. Use one of the following methods:

  • For those who have write access to the GitLab.org group, we recommend installing using SSH:

    gdk install [email protected]:gitlab-org/gitlab.git
  • Otherwise, install using HTTPs:

    gdk install

Use gdk install shallow_clone=true for a faster clone that consumes less disk-space. The clone process uses git clone --depth=1.

Install GDK using GitLab FOSS project

If you want to run GitLab FOSS, install GDK using the GitLab FOSS project.

Install GDK using your own GitLab fork

If you want to run GitLab from your own fork, install GDK using your own GitLab fork.

Set up gdk.test hostname

We recommend setting up gdk.test as a local hostname. For more information, see Local network binding.

Resolve installation errors

During the gdk install process, you may encounter some dependency-related errors. If these errors occur:

Use GitLab Enterprise features

Instructions to generate a developer license can be found in the onboarding documentation.

For information about adding your license to GitLab, see Activate GitLab EE with a license

Post-installation

After successful installation, see:

After installation, learn how to use GDK to enable other features.

Update GDK

For information about updating GDK, see Update GDK.

Create new GDK

After you have set up GDK initially, you can create new fresh installations. You might do this if you have problems with existing installation that are complicated to fix. You can get up and running quickly again by:

  1. In the parent folder for GDK, run git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git.
  2. In the new directory, run gdk install.