This is an old revision of the document!


DevOps with Gitlab, Gitlab-CI, and Dokku

This is merely a collected records of my experience to setup DevOps infrastructure with Gitlab, Gitlab-CI, and Dokku.

Our setup uses virtual environment which is run on Proxmox VE with LXC as OS-level virtualization. The first thing to do is setup the virtual server through web-based management of Proxmox VE. We just need 2 virtual servers, one for Gitlab/Gitlab-CI and one for Dokku. We allocate one CPU and 2048 MB of RAM for each virtual server.

There are steps for doing setup of virtual server and thankfully it is provided as wizard. Our steps are described below.

  1. Login to the web-based management of Proxmox VE.
  2. Select Templates-“ubuntu-14.04_standard*”, and click Download.
  3. Create CT.
  4. Set Hostname and Password.
  5. Use the template image: ubuntu 14.04 standard.
  6. Set disk size from local storage: 8 GB.
  7. Set network configuration, IPv4 Static with netmask /21, and set the gateway.
  8. Set DNS domain
  9. Finish the wizard.

Gitlab

  1. Using Console on web-based management of Proxmox VE, type these commands and follow the needed steps.
    # adduser stwn
    # visudo
  2. Close the Console and use terminal emulator in your computer.
  3. Remote login to the Gitlab server with SSH.
    $ ssh stwn@gitlab-server
  4. Update the packages index.
    $ sudo apt-get update
  5. Install curl and screen.
    $ sudo apt-get install curl screen
  6. Run this command. Adapt the version to the recent version of Gitlab.
    $ curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/trusty/gitlab-ce_8.6.6-ce.0_amd64.deb/download
  7. Install the downloaded Gitlab package.
    $ sudo dpkg -i gitlab-ce_8.6.6-ce.0_amd64.deb
  8. Reconfigure Gitlab for the first time.
    sudo gitlab-ctl reconfigure
  9. Configure Gitlab.
    $ sudo nano /etc/gitlab/gitlab.rb

    Uncomment these lines.

    web_server['external_users'] = []
    web_server['username'] = 'gitlab-www'
    web_server['group'] = 'gitlab-www'
  10. Restart Gitlab.
    $ sudo gitlab-ctl restart

    Use this command to see the log of Gitlab.

    $ sudo gitlab-ctl tail

Gitlab-CI

Dokku

 
doc/devops.1468441146.txt.gz · Last modified: 2016/07/13 20:19 by stwn · [Old revisions]
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki