Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
computing:gitlab-ce [2022/07/31 17:26] – oemb1905 | computing:gitlab-ce [2024/02/17 19:51] – oemb1905 |
---|
* **Jonathan Haack** | * **Jonathan Haack** |
* **Haack's Networking** | * **Haack's Networking** |
* **netcmnd@jonathanhaack.com** | * **webmaster@haacksnetworking.org** |
| |
------------------------------------------- | ------------------------------------------- |
* Letsencrypt, using certbot, is established and working | * Letsencrypt, using certbot, is established and working |
| |
If you are missing some of these pre-requisites, please visit the [[https://wiki.haacksnetworking.com/doku.php?id=computing:apachesurvival|Apache Survival]] tutorial I created which covers these topics. | If you are missing some of these pre-requisites, please visit the [[computing:apachesurvival]] tutorial I created which covers these topics. |
| |
The first thing you need to do is download and run the script that gitlab provides. This script will allow you to access the repositories and download gitlab-ce. | The first thing you need to do is download and run the script that gitlab provides. This script will allow you to access the repositories and download gitlab-ce. |
Ok, now that the configuration file is set up, let's make sure that your Apache Web Server has appropriate configuration files. There is a [[https://gitlab.com/gitlab-org/gitlab-recipes|Gitlab Recipes]] repository dedicated to getting Gitlab-CE up on non-nginx web servers. Always check the git repo above for the latest recipes, the ones I am using are currently here (2020): | Ok, now that the configuration file is set up, let's make sure that your Apache Web Server has appropriate configuration files. There is a [[https://gitlab.com/gitlab-org/gitlab-recipes|Gitlab Recipes]] repository dedicated to getting Gitlab-CE up on non-nginx web servers. Always check the git repo above for the latest recipes, the ones I am using are currently here (2020): |
| |
[[https://repo.haacksnetworking.com/oemb1905/haackingclub/blob/master/apache/virtualhosts/repo.haacksnetworking.com-ssl.conf|https.conf]] | * [[https://repo.haacksnetworking.org/haacknet/haackingclub/-/tree/main/configs/webservers/apache?ref_type=heads|Reverse Proxy Virtual Host Configs for Apache2]] |
[[https://repo.haacksnetworking.com/oemb1905/haackingclub/blob/master/apache/virtualhosts/repo.haacksnetworking.com.conf|http.conf]] | |
| |
These both work in production, so feel free to use and share. Make sure you have appropriate apache mods enabled: | These both work in production, so feel free to use and share. Make sure you have appropriate apache mods enabled: |
sudo gitlab-rake gitlab:backup:create | sudo gitlab-rake gitlab:backup:create |
mkdir gitlab-old-host | mkdir gitlab-old-host |
sudo cp /etc/gitlab/gitlab.rb ~/gitlab-old | sudo cp /etc/gitlab/gitlab.rb /root/gitlab-old-host/ |
sudo cp /etc/gitlab/gitlab-secrets.json ~/gitlab-old | sudo cp /etc/gitlab/gitlab-secrets.json /root/gitlab-old-host/ |
sudo cp -R /etc/gitlab/trusted-certs/ ~/gitlab-old | sudo cp -R /etc/gitlab/trusted-certs/ /root/gitlab-old-host/ |
sudo cp /var/opt/gitlab/backups/XXXXXXXXXX_gitlab_backup.tar ~/gitlab-old | sudo cp /var/opt/gitlab/backups/XXXXXXXXXX_gitlab_backup.tar /root/gitlab-old-host/ |
scp -r ~/gitlab-old-host user@10.xx.xx.x: | scp -r ~/gitlab-old-host user@10.xx.xx.x: |
| |
Now that you have copied those configs and files over the new host, it is time to restore the new host with those backups. Warning: I am assuming you already followed the above initial setup steps on the new host that are detailed above, and have left that instance vanilla. Once that new install is running and accessible and vanilla (no changes), do the following. | Now that you have copied those configs and files over the new host, it is time to restore the new host with those backups. Warning: I am assuming you already followed the above initial setup steps on the new host that are detailed above, and have left that instance vanilla. Once that new install is running and accessible and vanilla (no changes), do the following. |
| |
sudo cp gitlab-old-host/gitlab* /etc/gitLab/ | sudo cp gitlab-old-host/gitlab-old.rb /etc/gitlab/gitlab.rb |
sudo cp -r gitlab-old-host/trusted-certs /etc/gitlab/trusted-certs | sudo cp -r gitlab-old-host/trusted-certs /etc/gitlab/trusted-certs |
sudo gitlab-ctl reconfigure | sudo gitlab-ctl reconfigure |
Navigate to your web browser, and all should be restored. ;) | Navigate to your web browser, and all should be restored. ;) |
| |
--- //[[jonathan@haacksnetworking.org|oemb1905]] 2022/07/31 11:26// | --- //[[webmaster@haacksnetworking.org|oemb1905]] 2024/02/17 19:48// |