Upgrade
The upgrade procedure is the same whether you are running GitKraken Self-Hosted on CentOS, Ubuntu, or RHEL7.
If you are upgrading to version 3.4.0, please jump to the instructions at the bottom of this page.
Upgrade Enterprise Server
-
Go to the folder where the previous installation of GitKraken Self-Hosted resides (the folder that contains the docker-compose.yml).
-
Take down the current instance of GitKraken Self-Hosted:
sudo docker-compose down
-
Back up the docker-compose.yml file.
-
Extract GitKrakenEnterpriseServer.zip in the folder you installed GitKraken Self-Hosted. This should overwrite your current docker-compose.yml file.
-
Make sure to address any configuration differences between the new docker-compose.yml and the old docker-compose.yml. This includes:
- Any public facing port changes.
- Location of volumes on the host computer.
-
Any environment variable changes.
-
For setups that do not utilize docker-compose, make note of the image names and tags, and ensure that your swarm manager addresses those changes (an example would be Nomad setups).
-
Load the images into Docker:
sudo sh loadImages.sh
- In the same folder containing the docker-compose.yml file, run the following command:
sudo docker-compose up
- Note: If upgrading in CentOS or RHEL7, you may need to specify the full path to the docker-compose installation. The following commands should allow you to run the docker-compose command successfully:
sudo systemctl start docker.service
sudo /usr/local/bin/docker-compose up
Upgrade Enterprise Clients
-
Open your docker-compose.yml file where you installed GitKraken Self-Hosted.
-
Locate the
gk-enterprise-controller
service. Under volumes, there should be a volume:
-./gk-data/release:/controller/release # The volume where GitKraken Self-Hosted clients go.
-
We can divide this line into 2 distinct parts by separating at the ":". The first half in our example is ./gk-data/release and the second half is /enterprise/release. The first half represents where the clients are located on your host machine, and it may be different than this example.
-
Navigate to the folder where the clients are stored. Extract release.zip and overwrite all data in that folder at the top level.
-
When you have completed extracting the zip, in our example, our release folder will have the following shape:
./gk-data/
└── release/
├── linux/
├── darwin/
├── win32/
└── win64/
- Users of GitKraken Self-Hosted should now start receiving the latest client.
Update License
If you need to update your GitKraken Self-Hosted license, you will first need to copy the license.dat file over to your GitKraken Self-Hosted server. Then, select the new license by going to the License tab on your Enterprise site. From here you can browse to the new license file:
Reset the Super User Password
Follow these steps to reset the Super User password.
Shutdown GitKraken Self-Hosted by running:
sudo docker-compose down
Set the gk-services
environment variable SUPER_USER_RESET
to 1 in the docker-compose.yml
file.
environment:
SUPER_USER_RESET: 1
Restart GitKraken Self-Hosted by running:
sudo docker-compose up
On the account site, visit /reset/super-user
and provide the new password.
After resetting the super user, verify that you can login as the super user.
Once login is verified, you need to restart without the reset flag. Shutdown GitKraken Self-Hosted by running:
sudo docker-compose down
Delete the SUPER_USER_RESET
environment variable from gk-services
in the docker-compose.yml
.
Restart GitKraken Self-Hosted by running:
sudo docker-compose up
Upgrade to v3.4.0
Migration Checklist
-
Go into GitKraken Self-Hosted admin page, navigate to the Server Config tab, and write down the listed URL.
-
If you have deployed your own Mongo database and are not using the provided mongo container, you will need to provide GitKraken Self-Hosted an additional database. We suggest naming this database license or gk-license . It is ok for this database to exist on your existing mongo servers that are hosting the current GitKraken Self-Hosted database. This database is in addition to the database that GitKraken Self-Hosted currently consumes.
-
Keep your old
docker-compose.yml
handy, it will be used for reference.
First Steps
-
Go to the folder where the previous installation of GitKraken Self-Hosted resides (the folder that contains the
docker-compose.yml
). -
Take down the current instance of GitKraken Self-Hosted.
sudo docker-compose down
-
Back up the
docker-compose.yml
file. -
Extract
GitKrakenEnterpriseServer.zip
in the folder you installed GitKraken Self-Hosted. This should overwrite your currentdocker-compose.yml
file.
Important Changes to docker-compose.yml
We have changed our image/container structure. The mapping from pre-3.4.0 to 3.4.0 is 1 to 1:
-
gk-enterprise
becomesgk-enterprise-controller
-
gk-api
becomesgk-services
Migrating gk-enterprise
to gk-enterprise-controller
Assuming the gk-enterprise
service looks like this in the pre-3.4.0 docker-compose.yml
:
gk-enterprise:
image: docker.axosoft.com/gk-enterprise:release volumes:
- ./gk-data/release:/enterprise/release
- gk-config-data:/enterprise/config ports:
- "3000:3000"
links:
- gk-api
depends_on:
- gk-api
environment:
- GITKRAKEN_API_URL=http://gk-api:3100
Then gk-enterprise-controller
service should look like this in the 3.4.0 docker-compose.yml
:
gk-enterprise-controller:
image: gk-enterprise-controller:dev restart: always
ports:
- "3000:3000"
volumes:
- ./gk-data/release:/controller/release
depends_on:
- gk-mongo
environment:
GITKRAKEN_ENTERPRISE_URL: http://localhost:3000 GITKRAKEN_KAFKA_URL: gk-zookeeper:2181
Volume Changes
Old docker-compose.yml (gk-enterprise ) |
New docker-compose.yml (gk-enterprise-controller ) |
---|---|
./gk-data/release:/enterprise/release |
./gk-data/release:/controller/release |
gk-config-data |
unused in 3.4.0 |
Take note that we've changed the container-side (right of :
) location of the release volume. Your installation may have a different host-side (left of :
) location than ./gk-data/release
than our example, but make sure that the container-side now points to /controller/release
. Also keep in mind that gk-config-data
is no longer used in
gk-enterprise-controller
, but is still used by gk-services
, so make sure it stays in the volume list at the end of the docker-compose.yml
file.
Environment Changes
Take note of the environment section in gk-enterprise-controller
. We have changed environment variables.
-
We no longer use
GITKRAKEN_API_URL
ingk-enterprise-controller
. -
Please update the
GITKRAKEN_ENTERPRISE_URL
to be the url that you retrieved from the admin site in the Migration Checklist -
We have added
GITKRAKEN_KAFKA_URL
. The default setting should be correct. Please see documentation indocker-compose.yml
for further details.
Migrating gk-api
to gk-services
Assuming the gk-api
services looks like this in the pre-3.4.0 docker-compose.yml
:
gk-api:
image: docker.axosoft.com/gk-api:release-enterprise
volumes:
- gk-config-data:/api/lib/config
links:
- gk-mongo
depends_on:
- gk-mongo
environment:
- GITKRAKEN_MONGO_URL=mongodb://gk-mongo:27017/api
Then gk-services
service should look like this in the 3.4.0 docker-compose.yml
:
gk-services:
image: gk-services:dev restart: always
volumes:
- gk-config-data:/gk-services/services/gk-api/config
ports:
- "3100"
- "3111"
depends_on:
- gk-mongo
- gk-zookeeper
environment:
GITKRAKEN_ENTERPRISE_URL: http://localhost:3000
GITKRAKEN_ENTERPRISE_INTERNAL_URL: http://gk-enterprise-controller:3000
GITKRAKEN_KAFKA_URL: gk-zookeeper:2181
GITKRAKEN_MONGO_URL: mongodb://gk-mongo:27017/api
GITKRAKEN_MONGO_LICENSE_URL: mongodb://gk-mongo:27017/license
Volume Changes
Old docker-compose.yml (gk-api ) |
New docker-compose.yml (gk-services ) |
---|---|
gk-config-data:/api/lib/config |
gk-config-data:/gk-services/services/gk-api/config |
Take note that we've changed the container-side (right of :
) location of the config volume. Make sure that the container- side now points to /gk-services/services/gk-api/config
.
Take note of the environment section, as well. We have kept the GITKRAKEN_MONGO_URL
environment variable, but we have added 3 new environment variables.
-
Please update the
GITKRAKEN_ENTERPRISE_URL
to be the url that you retrieved from the admin site in the Migration Checklist -
For most cases the
GITKRAKEN_ENTERPRISE_INTERNAL_URL
should be left alone. See thedocker-compose.yml
provided by 3.4.0 for more information about this variable. -
GITKRAKEN_MONGO_LICENSE_URL
should remain as it is defined unless a standalone mongo server has been configured. If a standalone mongo server has been configured, the value should be set to the connection string to the new database on that server that was discussed above in the Migration Checklist -
We have added
GITKRAKEN_KAFKA_URL
. The default setting should be correct. Please see documentation indocker-compose.yml
for further details.
Stand up GitKraken Self-Hosted v3.4.0
- LoadtheimagesintoDocker:
sudo sh loadImages.sh
- In the same folder containing the
docker-compose.yml
file, run the following command:
sudo docker-compose up
Migrating to a Super User
- Login as the current owner to create the new super user.
GitKraken Self-Hosted has added a new super user to manage the license. This super user replaces the original owner as the new owner of the license. When the original owner first logs into the new GitKraken Self-Hosted Account Site, they will be prompted to create a super user password. The owner will be downgraded to an admin as to retain some administrative capabilities over the license.
Before a super user is created, the config cannot be updated by anyone, including the owner. It is important that the owner log into the account site as soon as possible to facilitate the creation of the super user. To login as the super user, simply visit the login page and click the link to "Login as Super User".
The super user does not consume a license, cannot log into the GitKraken client, and cannot be changed or viewed from the account site user management page.
If you forget the super user password, you can restart GitKraken Self-Hosted with a special flag SUPER_USER_RESET
. To find out more about resetting the super user, see the SETUP_README.md
.