Gitlab

https://github.com/gitlabhq/gitlabhq/blob/stable/doc/installation.md

/usr/share/gitolite/conf/example.gitolite.rc

## in progress below ##

  1. add host to gitlab group, build host, puppet (installs packages)
  2. setup mysql
    1. start mysql and run the secure installation:
      # su - root
      # service mysql start
      # mysql_secure_installation
    2. create the mysql user:
      grant all privileges on gitlabhq_production.* to 'gitlabdb'@'localhost' identified by 'password' with grant option;
    3. create the backup user:
      grant RELOAD, SELECT, SUPER, REPLICATION CLIENT on *.* to 'mysqlbackup'@'localhost' identified by 'password';
    4. put the mysqlbackup password into the $backupdir/buser file
  3. must add git user to /etc/security/access.conf +:git:ALL
  4. add to /etc/ssh_config: EnableSSHKeysign yes
  5. setup gitolite:
    1. create the gitlab ssh key: <code>sudo -H -u gitlab ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa</code> - in puppet now
    2. setup the git user:
      #not needed on centos: sudo -u git sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" > /home/git/.profile'
      #not needed on centos: sudo -u git -i -H gl-system-install
      # in puppet: sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
      # in puppet: sudo chmod 777 /home/git/gitlab.pub
      sed -i 's/0077/0007/g' /usr/share/gitolite/conf/example.gitolite.rc
      sudo -u git sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" >> /home/git/.profile'
      sudo -u git -H sh -c "gl-setup -q /home/git/gitlab.pub"
  6. need to fix gitolite install:
    cd /home/git
    #sudo -u git -H mkdir bin
    #sudo -u git sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" >> /home/git/.profile'
    #sudo -u git sh -c 'gitolite/install -ln /home/git/bin'
    
    sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
    sudo chmod 0444 /home/git/gitlab.pub
    
    sudo -u git -H sh -c "PATH=/home/git/bin:$PATH; gitolite setup -pk /home/git/gitlab.pub"
    1. test gitolite:
      sudo -u gitlab -H git clone git@localhost:gitolite-admin.git /tmp/gitolite-admin
    2. start redis

gitlab

  1. clone gitlab source:
    cd /home/gitlab
    sudo -H -u gitlab git clone git://github.com/gitlabhq/gitlabhq.git gitlab
  2. rerun puppet to install gitlab config files
  3. install glibc-devel.x86_64
  4. install local gitlab gems:
    cd /home/gitlab/gitlab
    sudo -u gitlab -H bundle install --without development test sqlite postgres --deployment
  5. create the database:
     sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production
  6. setup hooks:
    sudo cp ./lib/hooks/post-receive /home/git/.gitolite/hooks/common/post-receive
    sudo chown git:git /home/git/.gitolite/hooks/common/post-receive
  7. fix hooks:
    mkdir -p /home/git/share/gitolite/hooks/common
    ln -s /usr/share/gitolite/hooks/common/post-receive.mirrorpush /home/git/share/gitolite/hooks/common/post-receive
  8. check the status:
     sudo -u gitlab bundle exec rake gitlab:app:status RAILS_ENV=production
  9. make sure gitlab starts:
    sudo -u gitlab bundle exec rails s -e production
  10. ?enable the auto-merge feature:
    cd /home/gitlab/gitlab
    sudo -u gitlab -H bundle exec rake gitlab:app:enable_automerge RAILS_ENV=production
  11. start apache
  12. start resque

login………admin@local.host password……5iveL!fe

new password: ccitr0cks

should probably install to /var/lib/gitlab, /var/lib/git

look at example.gitolite.rc for some config options:

$GL_LOGT=“$GL_ADMINDIR/logs/gitolite-%y-%m.log”;

Local Customizations

  1. disable email notifications:
    1. /home/gitlab/gitlab/app/views/layouts/profile.html.haml
    2. /home/gitlab/gitlab/app/views/profile/show.html.haml
  2. disable email notifications:
    1. /home/gitlab/gitlab/app/mailers/notify.rb
playground/gitlab.txt · Last modified: 2012/11/19 15:20 by john
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki