** tl; dr: ** Prepare an environment to develop GitLab main body (Web UI, API) in macOS environment.
Every year, a setup article for the development environment of the integrated DevOps platform GitLab is created, but I will describe it assuming that it will be the latest version that can be viewed on Qiita in Japanese.
macOS: Assumed 10.13, 10.14, 10.15. The 10.15 person may be Zsh. MacBook Pro (Retina or later) is preferred, but it seems to work on MacBook / MacBook Air. I confirmed it with MacBook Pro (Retina, 13-inch, Mid 2014) i5 2 core 8GB memory, 128GB SSD (free space 20GB).
Assuming GitLab community members (that is, everyone).
GitLab Hackathon 3Q 2020 to be held at 2020-09-02 / 2020-09-03 in Japanese https://gitlab-jp.connpass.com/event/187652/ https://gitlab-jp.connpass.com /event/187244/ https://gitlab-jp.connpass.com/event/187246/ I presided over, and ~~ almost ~~ all the participants were addicted to it, so Last day Day 2 Write in a hurry in time for (: //gitlab-jp.connpass.com/event/187246/).
It seems that the people of Inc. got paid a few weeks ago and corrected it, but I write it because it is too bad (it has been somewhat terrible in the past, but with more momentum).
There is no funding for this article. Correction requests are welcome. This article is not provided or financially supported by GitLab B.V., GitLab Inc. and one or more their affiliates.
This article is not an advertisement for GitLab Hackathon 3Q '2020 in Japanese.
Please secure at least 15GB of free space on the SSD. Most people (peek if they have the same installed in the past) will consume about 10GB.
As far as the past participants are concerned, there are many people who have included it, so I would like to omit it, but if there are people who have not included it, it is written at https://brew.sh/index_ja, so please read it.
Do the following to include the dependent packages: I remember that few people were addicted to the GitLab Hackathon Japan local event hosted by GitLab Tokyo in the past.
brew install asdf git git-lfs libiconv pkg-config cmake openssl coreutils re2 graphicsmagick gpg icu4c exiftool sqlite
brew link pkg-config
brew pin libffi icu4c readline re2
if [ ${ZSH_VERSION} ]; then shell_file="${HOME}/.zshrc"; else shell_file="${HOME}/.bash_profile"; fi
echo 'export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ${shell_file}
source ${shell_file}
brew cask install google-chrome chromedriver
macOS 10.15 and Zsh
After doing the following, restart the terminal.
echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.zshrc
macOS 10.14 or Bash
After doing the following, restart the terminal.
echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.bash_profile
echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.bash_profile
We use a package management tool called asdf.
Enable Ruby with asdf with the following command.
asdf plugin add ruby
Install the required Ruby 2.6.6 with the following command. It takes a lot of time because it is compiled from the source code.
asdf install ruby 2.6.6
Use the following command to make Ruby 2.6.6 installed with asdf available in any directory.
asdf global ruby 2.6.6
Install Gem with the following command.
gem install -N gitlab-development-kit
Do not use sudo
.
Create a working directory with the following command.
gdk init
Change to the GDK working directory with the following command.
cd gitlab-development
Make Node.js available from asdf with the following 2 commands.
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
bash -c '${ASDF_DATA_DIR:=$HOME/.asdf}/plugins/nodejs/bin/import-release-team-keyring'
Get the other dependent libraries with the following command.
make bootstrap
Use the following command to set the build of PostgreSQL Gem.
bundle config build.pg --with-opt-dir="${HOME}/.asdf/installs/postgres/11.8"
Download the source code of multiple repositories with the following command.
gdk install shallow_clone=true
Start GitLab with the following command. The first time
gdk start
Type http: // localhost: 3000
in your browser's address bar or open it with the following command: A 502 error will be displayed until the first display, and it will take about 5 minutes for the normal page to be displayed. While you wait, take a look at the bonus section below.
open http://localhost:3000/
If this is displayed, it's OK.
Since all work is done on the command line, this is one screenshot, but if this screen is displayed, you can develop it.
While logged in to GitLab.com, go to https://gitlab.com/gitlab-org/gitlab and press the Fork button to clone to your area. Then replace [YOUR-NAMESPACE]
with your GitLab account name and run the following command:
git remote set-url [email protected]:[YOUR-NAMESPACE]/gitlab.git
support/set-gitlab-upstream
--October 2018 https://qiita.com/jb-vasseur/items/9f7691c39a0d8baa335a --December 2017 https://qiita.com/ogomr/items/cc404bf9373408663b11 --June 2015 https://qiita.com/hiroponz/items/b36bb521551f94eb4fc1
Source
--https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/a7529002150a413781cf7e05393678545d813456/doc/prepare.md (Latest here -development-kit /-/ blob / master / doc / prepare.md)) --https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/a7529002150a413781cf7e05393678545d813456/doc/index.md (Latest here -development-kit /-/ blob / master / doc / index.md))
Recommended Posts