-
Upgraded GitLab (on RHEL 7) from v11.1.4 to v13.8.0
-
Refer upgrade paths at https://docs.gitlab.com/ee/update/
11.1.4 --> 11.11.8 --> 12.0.12 --> 12.1.17 --> 12.10.14 --> 13.0.14 --> 13.8.0 -
Install gitlab-ce repos
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash -
For each upgrade path
| # Get OVS version | |
| root#> ovs-vsctl -V | |
| ovs-vsctl (Open vSwitch) 2.5.10 | |
| Compiled Oct 5 2020 18:07:51 | |
| DB Schema 7.12.1 | |
| # List OVS Bridges | |
| root#> ovs-vsctl list-br | |
| br.dmx | |
| br.microseg |
-
Upload new key - /etc/gitlab/ssl/gitlab.key
-
Upload new cert - /etc/gitlab/ssl/gitlab.crt
-
Update the following section in /etc/gitlab/gitlab.rb
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.crt" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.key" -
Reload config for nginx
sudo gitlab-ctl hup nginx
| # Find Project ID | |
| # To get raw content of file build/setup.py in private project with Project ID 32 | |
| # Generate Personal access token with "read_repository" privilege | |
| curl -LJO --header "PRIVATE-TOKEN: <token_value>" https://git.test.ca/api/v4/projects/32/repository/files/build%2Fsetup.py/raw?ref=master | |
| # If the project is public | |
| curl -LJO https://git.test.ca/api/v4/projects/32/repository/files/build%2Fsetup.py/raw?ref=master |
| # Get VM UUID from PC | |
| curl -k -X "POST" \ | |
| -H "${acceptHeader}" \ | |
| -H "${authHeader}" \ | |
| -H "${contentHeader}" \ | |
| -d '{"kind":"vm","filter":"'"vm_name==$userDataHostname"'"}' "${ntxApiEndpoint}" \ | |
| | jq -r --arg VM $userDataHostname '.entities[] | select (.spec.resources.guest_customization.cloud_init.custom_key_values.hostname==$VM) | .metadata.uuid' | |
| #Example Output: | |
| #--------------- |
-
Register new system on Red Hat Portal
-
Download Identity certificate for new system
-
Extract cert and key into /etc/pki/consumer/cert.pem and /etc/pki/consumer/key.pem and the system should be automatically registered
-
Attach subscriptions usig the Portal or the following:
subscription-manager attach --pool=<pool-id> -
In order to receive repos, you must ensure the following:
sudo subscription-manager config --rhsm.manage_repos=1
| List sAMAccountName for direct reports to a manager in Active Directory | |
| Get-ADUser -Identity <manager> -Properties directreports | select-object -ExpandProperty DirectReports ` | |
| | %{Get-ADUser $_ | Select sAMAccountName} |
Installed from rpm rather than binary due to the following advantages:
-
User gitlab-runner automatically created
-
gitlab-runner automatically installed as a service and enabled
sudo dnf install -y git curl -LJO "https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_amd64.rpm"
sudo rpm -ivh gitlab-runner_amd64.rpm
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
Connect-AzAccount -UseDeviceAuthentication
Set-AzContext -Subscription "7634gvhjhjg76r83432rfefe"
vi AzurePublicLBUpgrade.ps1 # Create script
.\AzurePublicLBUpgrade.ps1 -oldRgName "old-rg" -oldLBName "basic-lb" -newLbName "std-lb"