GithubHelp home page GithubHelp logo

gitlabhq-debian's Introduction

gitlab-debian

todo

Database setup: https://github.com/gitlabhq/gitlabhq/blob/stable/doc/install/databases.md;

todo

App initialization: rake gitlab:app:setup RAILS_ENV=production;

todo

logrotate.d config files

Provides a debian binary package for gitlab & gitolite.

Once you build this package, there is no need for *-dev packages. In other words, the package will compile nothing in production. I consider this a big win over the official installing script.

This package is pretty much self-contained. Disregarding the database dependency, it only requires ruby1.9.1.

The postinst script is able to configure everything, using debconf. So it should be a fairly straightforward process.

After installing and configuring the package, provided you got dependencies right [namely the database and redis], you can use gitlabhq itself to validate the deployment: :

$ cd /var/www/gitlabhq
$ /usr/libexec/gitlabhq/sudo-env rake gitlab:check

Installing

# todo: need to provide a source repo for this to work
$ apt-get install gitlabhq-gitolite gitolite
$ dpkg-reconfigure gitlabhq

$ cd /var/www/gitlabhq

# initialize the application
$ /usr/libexec/gitlabhq/sudo-env rake gitlab:app:setup

# verify everything is Ok
$ /usr/libexec/gitlabhq/sudo-env rake gitlab:check

# yay!
$ /etc/init.d/gitlabhq start

Layout

Users

gitlab

gitlab

gitolite

git

Home Directories

gitlab

/var/lib/gitlabhq

gitolite

/var/lib/gitlabhq-gitolite

Applications

rails

/var/www/gitlabhq

logs

/var/log/gitlabhq, /var/log/gitlabhq-gitolite

gitolite repos

/var/lib/gitlabhq-gitolite/repositories

Binaries

gems

/var/www/gitlabhq/vendor/bin

scripts

/usr/libexec/gitlabhq, /usr/libexec/gitlabhq-gitolite

Configuring

The package makes heavy use of debconf in order to make it easier to install. Based on the answers you provide, the configuration scripts will be changed. Notice you are still allowed to edit files manually, just keep in mind that it may overwrite things you have done.

The following files are automatically managed:

  • /var/www/gitlabhq/config/gitlab.yml
  • /var/www/gitlabhq/config/database.yml
  • /var/lib/gitlabhq/.gitconfig

The changes you make using dpkg-reconfigure are applied automatically.

You may also do this without the interactive interface: :

# retrieve all config options
$ debconf-get-selections | grep gitlabhq >gitlabhq.config

# edit as much as you like
$ emacs gitlabhq.config

# apply changes
$ debconf-set-selections -c gitlabhq.config && \
    debconf-set-selections gitlabhq.config

N.B.: Only use this command to seed debconf values for packages that will be or are installed [man debconf-set-selections].

Gotchas

The package bundles everything, including bundler. For this reason, you have to change some environment variables, most notably GEM_HOME. There is a script that does just this, and you are advisable to use it to invoke any command that depend on bundler or the gems managed by it:

  • /usr/libexec/gitlabhq/env
  • /usr/libexec/gitlabhq/sudo-env # alias for: sudo -u gitlab -H /usr/.../gitlabhq/env

To use it, simply prefix the command you want with that script, as follows: :

$ cd /var/www/gitlabhq

# the following are all the same
$ /usr/libexec/gitlabhq/sudo-env rake gitlab:env:info
$ /usr/libexec/gitlabhq/sudo-env bundle exec rake gitlab:env:info
$ /usr/libexec/gitlabhq/sudo-env bundle exec rake gitlab:env:info RAILS_ENV=production

# to access rails console
$ /usr/libexec/gitlabhq/sudo-env rails console

# notably, mind these:
$ /usr/libexec/gitlabhq/sudo-env python2
$ /usr/libexec/gitlabhq/sudo-env ruby
$ /usr/libexec/gitlabhq/sudo-env gem

Building

It takes only three steps:

1. Clone: :

$ git clone git://github.com/dgvncsz0f/gitlabhq-debian.git
$ cd gitlabhq-debian

2. Source: :

$ git submodule init
$ git submodule update

3. Build: :

$ dpkg-buildpackage # -uc -us

Now you should have available the following packages:

  • gitlab
  • gitlabh-gitolite

gitlabhq-debian's People

Contributors

dgvncsz0f avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.