diff --git a/doc/build_gdk_in_a_box.md b/doc/build_gdk_in_a_box.md index 984f154972ed039e05a73f471211e521e85a5cfe..5f61cdfcb377aacb3153052eac8b707aae28b440 100644 --- a/doc/build_gdk_in_a_box.md +++ b/doc/build_gdk_in_a_box.md @@ -71,6 +71,7 @@ Upload the zipped `gdk.vbox` and `gdk.vdi` files to Google Drive. 1. Login with SSH to `debian@gdk.local`. You do not need a password to log in. 1. Install GDK using the one-line installation method: ```curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/install" | bash```. + 1. When prompted, configure GDK to use the GitLab community fork, and telemetry with anonymous user: `gdk-in-a-box`. 1. Load asdf into your shell: ```source "/home/debian/.asdf/asdf.sh"```. 1. Enable Vite: diff --git a/doc/gdk_in_a_box.md b/doc/gdk_in_a_box.md index 7cb6495129c5c54d3ea4a6876415bb73c69da2ff..38b6cd968fe97cf3edb5e1968e4d4393a17d5de2 100644 --- a/doc/gdk_in_a_box.md +++ b/doc/gdk_in_a_box.md @@ -5,7 +5,7 @@ to instantly start developing. ## Run on macOS -1. Download and [install UTM](https://docs.getutm.app/installation/macos/). +1. Download and [install UTM](https://mac.getutm.app/). 1. Download and unzip [GDK-in-a-box](https://go.gitlab.com/cCHpCP). 1. Double-click `gdk.utm`. 1. Follow the [standard setup steps](#standard-setup). @@ -30,6 +30,7 @@ NOTE: The docs detail [how to checkout branches from different remotes](https://gitlab.com/gitlab-community/meta#checkout-a-branch-from-a-different-remote), but as a last resort you may reconfigure your remote to the canonical project. +1. In a local terminal, import the SSH key by running: `curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/gdk-in-a-box/setup-ssh-key" | bash`. 1. Start the VM (minimise the console because you won't need it). 1. Connect VSCode to the VM: - Select **Remote-SSH: Connect to host** from the command palette @@ -43,6 +44,27 @@ NOTE: 1. Open GitLab in your browser: [http://gdk.local:3000](http://gdk.local:3000). 1. Login to GitLab with `root/5iveL!fe`. +## Update + +You can update GDK-in-a-box at any time. +While connected via Remote-SSH: + +- In VSCode, select **Terminal > New terminal**. +- Run: `gdk update`. + +## Troubleshoot + +If you have any issues, the simplest and fastest solution is to: + +- Delete the virtual machine. +- Download the latest build. +- Follow the [standard setup instructions](#standard-setup). + +NOTE: + +Your GitLab instance will be restored to defaults. +Be sure to commit and push all changes beforehand, or they will be lost. + ## Building GDK-in-a-box This isn't neccessary to use GDK-in-box. diff --git a/support/gdk-in-a-box/setup-ssh-key b/support/gdk-in-a-box/setup-ssh-key index 36654d2df0bd3d91765451a138c49a13c0735338..2b24ed5aacc3674632d5fd603c1e4dd6cf9d14a5 100644 --- a/support/gdk-in-a-box/setup-ssh-key +++ b/support/gdk-in-a-box/setup-ssh-key @@ -1,5 +1,15 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [ -f ~/.ssh/gdk.local_rsa ]; then + echo "SSH key previously imported." + exit 0 +fi + curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/main/support/gdk-in-a-box/gdk.local_rsa" -o ~/.ssh/gdk.local_rsa chmod 600 ~/.ssh/gdk.local_rsa echo >> ~/.ssh/config echo "Host gdk.local" >> ~/.ssh/config -echo "IdentityFile ~/.ssh/gdk.local_rsa" >> ~/.ssh/config \ No newline at end of file +echo "IdentityFile ~/.ssh/gdk.local_rsa" >> ~/.ssh/config +echo "SSH key imported."