Skip to content

Instantly share code, notes, and snippets.

@prasadtalasila
Last active May 16, 2017 06:50
Show Gist options
  • Save prasadtalasila/e83d19fa7696ab19ba6ae326874253b0 to your computer and use it in GitHub Desktop.
Save prasadtalasila/e83d19fa7696ab19ba6ae326874253b0 to your computer and use it in GitHub Desktop.
gitlab installation
1) gitlab installation
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-gitlab-on-ubuntu-16-04
generate SSL certs for gitlab and configure gitlab for https
self-signed certificates are a problem for runners; to overcome this problem, follow the instructions on
http://moonlightbox.logdown.com/posts/2016/09/12/gitlab-ci-runner-register-x509-error
a) specify common name default for SSL certs (instruction different from above URL)
$vi /etc/ssl/openssl.cnf
[ v3_ca ]
subjectAltName=IP:<ip_in_dotted_decimal>
b) create new SSL certs
cd /etc/gitlab/ssl
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/gitlab/ssl/192.168.1.1.key -out /etc/gitlab/ssl/192.168.1.1.crt
openssl dhparam -out /etc/gitlab/ssl/dhparam.pem 2048
c) setup https for gitlab
https://docs.gitlab.com/omnibus/settings/nginx.html#enable-https
gitlab-ctl reconfigure
gitlab-ctl restart
c) copy cert to gitlab-runner as well
mkdir -p /etc/gitlab-runner/certs
cp /etc/gitlab/ssl/<ip>.crt /etc/gitlab-runner/certs/
d) register a runner (do this step after installing runners in step-3)
gitlab-ci-multi-runner register
2) for public websites, generate trusted certificate from Lets Encrypt
https://www.digitalocean.com/community/tutorials/how-to-secure-gitlab-with-let-s-encrypt-on-ubuntu-16-04
3) install gitlab ci-runners
https://docs.gitlab.com/runner/install/linux-repository.html
(for installing a runner)
4) sample gitlab project with CI setup
https://about.gitlab.com/2016/03/01/gitlab-runner-with-docker/
https://gitlab.univ-nantes.fr/help/ci/environments.md
https://docs.gitlab.com/ce/ci/quick_start/README.html
I tried the gitlab-runner for shell and docker executors. Both of them seem working fine. We can use shell executor as an option to execute vagrant-based pipelines as well.
TODO:
-----
1) try virtualbox-based executors. They are also useful.
2) place a cache in the server and cache artifacts aggressively. Don't pull anything from internet unless you absolutely have to.
3) setup the integration of all projects on gitlab and reduce the build time to less than a minute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment