Installation instructions
Takobasu setup
-
Omnibus-heptapod is cloned in
/root/omnibus-heptapod
. It contains adocker-compose.yml
file inheptapod_docker.
directory. In order to update the docker image and the heptapod instance, launch these commands:
docker-compose build --no-cache # Might takes some time as it clone gitlab-hg
docker-compose up -d
If you pull, there is a secret changeset with SMTP credentials that will stay as a separate head. Don't forget to rebase it!
-
Traefik-takobasu contains the configuration for Traefik, the reverse proxy on takobasu, you should not need to touch it. If needed, it's cloned in
/root/traefik
. To update it/relaunch it, do:
docker-compose restart
Logs
Logs are directly accessible online at this address: https://heptapod.octobus.net/admin/logs.
Access directories
Git and Mercurial repositories are mounted in /data/gitlab/data/git-data/repositories
as root.
Manually push a Mercurial repo to its git counterpart
First enter into the Docker container:
docker exec -ti heptapoddocker_heptapod_1 bash
Go where the repositories are in the container:
cd /var/opt/gitlab/git-data/repositories
Choose the repositories you are interested into:
cd Octobus/traefik-config.hg/
Show the hgrc config:
$ cat .hg/hgrc
%include /var/opt/gitlab/git-data/repositories/global_hgrc
[heptapod]
mirror-path = git+ssh://git@localhost:Octobus/traefik-config.git
And manually launch the txnclose
transaction as the git user (su -s "/bin/bash" git
for changing to git):
$ hg push -f git+ssh://git@localhost:Octobus/traefik-config.git
pushing to git+ssh://git@localhost:Octobus/traefik-config.git
searching for changes
adding objects
abort: git remote error: refs/heads/branch/default failed to update
If it fails like above, go to the git repository:
cd .hg/git
And manually push the branches that failed to update:
$ /opt/gitlab/embedded/bin/git push git@localhost:Octobus/traefik-config.git branch/default
Counting objects: 5, done.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 16.16 KiB | 16.16 MiB/s, done.
Total 5 (delta 0), reused 0 (delta 0)
remote: GitLab: You are not allowed to push code to protected branches on this project.
To localhost:Octobus/traefik-config.git
! [remote rejected] branch/default -> branch/default (pre-receive hook declined)
error: failed to push some refs to 'git@localhost:Octobus/traefik-config.git'
In this case, the root user is likely unable to write on the repository. Add Administrator as master so it can create new branch and try again.
Upgrade notes
If you installed a version before march 11th, we updated the way hgrc are handled, please upgrade your docker container this way:
cd /path/to/omnibus-heptapod/heptapod_docker/
hg pull
hg up heptapod
docker-compose build --no-cache
docker-compose up -d --force-recreate
Once the container have finished starting (you can check the update process with docker logs -f heptapoddocker_heptapod_1
), connect to the docker container and run the migration script:
docker exec -ti heptapoddocker_heptapod_1 bash
cd /opt/gitlab/embedded/service/gitlab-rails
python rewrite_hgrc_upgrade.py /var/opt/gitlab/git-data/repositories/
The script will show you each file that has been rewritten. The rewritten ones should look like this:
%include /var/opt/gitlab/git-data/repositories/global_hgrc
[heptapod]
mirror-path = git+ssh://git@localhost:Octobus/traefik-config.git