This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computing:gitlab-ce [2018/08/07 18:00] – oemb1905 | computing:gitlab-ce [2024/02/17 19:52] (current) – oemb1905 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
------------------------------------------- | ------------------------------------------- | ||
* **gitlab-ce** | * **gitlab-ce** | ||
* **Jonathan Haack** | * **Jonathan Haack** | ||
* **Haack' | * **Haack' | ||
- | * **netcmnd@jonathanhaack.com** | + | * **webmaster@haacksnetworking.org** |
------------------------------------------- | ------------------------------------------- | ||
Line 20: | Line 19: | ||
* Letsencrypt, | * Letsencrypt, | ||
- | If you are missing some of these pre-requisites, | + | If you are missing some of these pre-requisites, |
+ | |||
+ | The first thing you need to do is download and run the script that gitlab provides. | ||
+ | |||
+ | cd /tmp | ||
+ | curl -LO https:// | ||
+ | sudo bash / | ||
+ | |||
+ | Now that that is done, let's begin by installing Gitlab Community Edition and editing the Ruby configuration file to work with the LAMP stack: | ||
sudo apt install gitlab-ce | sudo apt install gitlab-ce | ||
Line 27: | Line 34: | ||
In this file, you need to edit 6 lines. | In this file, you need to edit 6 lines. | ||
- | external_url 'http://codetalkers.services' | + | external_url 'https://example.com |
- | + | ||
- | //Before I discuss the other configuration options, let me point out that I have to keep this as http and not https, letting my apache vhost redirect to https instead of building it into the gitlab server configuration, | + | |
- | | + | |
gitlab_workhorse[' | gitlab_workhorse[' | ||
gitlab_workhorse[' | gitlab_workhorse[' | ||
Line 40: | Line 44: | ||
Optionally, if you want your ssh on an alternate port, then configure one more option in the gitlab.rb file. Of course, you will also need to adjust your sshd_config and you firewall (if applicable) to permit traffic on this port. | Optionally, if you want your ssh on an alternate port, then configure one more option in the gitlab.rb file. Of course, you will also need to adjust your sshd_config and you firewall (if applicable) to permit traffic on this port. | ||
- | gitlab_rails[' | + | gitlab_rails[' |
- | Ok, now that the configuration file is set up, let's make sure that your Apache Web Server has appropriate configuration files. | + | Ok, now that the configuration file is set up, let's make sure that your Apache Web Server has appropriate configuration files. |
- | + | | |
- | | + | [[https://repo.haacksnetworking.org/haacknet/haackingclub/-/tree/main/configs/ |
- | * [[https://jonathanhaack.com/stuff/https.conf|https.conf]] | + | |
- | These both work in production, so feel free to use and share. I will post these to the recipes page if they begin to differ enough that I need to do so. For now, I will keep them here only. Make sure that you enabled the appropriate mods that allow a proxy webserver, gitlab-ce, to run on the localhost on port 8181, but to be accessible externally using the domain above. Apache needs certain modules - that permit the proxy functionality mentioned above - to be enabled | + | These both work in production, so feel free to use and share. |
- | sudo a2enmod | + | sudo a2enmod |
sudo a2enmod proxy | sudo a2enmod proxy | ||
sudo a2enmod rewrite | sudo a2enmod rewrite | ||
Line 62: | Line 65: | ||
sudo systemctl restart gitlab-runsvdir.service | sudo systemctl restart gitlab-runsvdir.service | ||
| | ||
- | Personally, | + | I do not use the default Let's Encrypt tool in '' |
+ | ------------------------------------------- | ||
+ | |||
+ | Need to migrate your gitlab-ce instance to a new host? First, prepare the backups and configs on the old host and copy those the new host. | ||
+ | |||
+ | sudo gitlab-ctl stop unicorn | ||
+ | sudo gitlab-ctl stop sidekiq | ||
+ | sudo gitlab-rake gitlab: | ||
+ | mkdir gitlab-old-host | ||
+ | sudo cp / | ||
+ | sudo cp / | ||
+ | sudo cp -R / | ||
+ | sudo cp / | ||
+ | scp -r ~/ | ||
+ | | ||
+ | Now that you have copied those configs and files over the new host, it is time to restore the new host with those backups. | ||
+ | |||
+ | sudo cp gitlab-old-host/ | ||
+ | sudo cp -r gitlab-old-host/ | ||
+ | sudo gitlab-ctl reconfigure | ||
+ | sudo gitlab-ctl stop unicorn | ||
+ | sudo gitlab-ctl stop sidekiq | ||
+ | sudo cp gitlab-old/ | ||
+ | sudo chown git:git / | ||
+ | sudo gitlab-rake gitlab: | ||
+ | sudo gitlab-ctl start | ||
+ | sudo gitlab-rake gitlab: | ||
+ | | ||
+ | Navigate to your web browser, and all should be restored. | ||
- | --- //[[netcmnd@jonathanhaack.com|oemb1905]] | + | --- //[[webmaster@haacksnetworking.org|oemb1905]] |