====== Gitlab ======
https://github.com/gitlabhq/gitlabhq/blob/stable/doc/installation.md
/usr/share/gitolite/conf/example.gitolite.rc
## in progress below ##
- add host to gitlab group, build host, puppet (installs packages)
- setup mysql
- start mysql and run the secure installation: # su - root
# service mysql start
# mysql_secure_installation
- create the mysql user: grant all privileges on gitlabhq_production.* to 'gitlabdb'@'localhost' identified by 'password' with grant option;
- create the backup user: grant RELOAD, SELECT, SUPER, REPLICATION CLIENT on *.* to 'mysqlbackup'@'localhost' identified by 'password';
- put the mysqlbackup password into the $backupdir/buser file
- must add git user to /etc/security/access.conf +:git:ALL
- add to /etc/ssh_config: EnableSSHKeysign yes
- setup gitolite:
- create the gitlab ssh key: sudo -H -u gitlab ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
- in puppet now
- 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"
- 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"
- test gitolite: sudo -u gitlab -H git clone git@localhost:gitolite-admin.git /tmp/gitolite-admin
- start redis
=== gitlab ===
- clone gitlab source: cd /home/gitlab
sudo -H -u gitlab git clone git://github.com/gitlabhq/gitlabhq.git gitlab
- rerun puppet to install gitlab config files
- install glibc-devel.x86_64
- install local gitlab gems: cd /home/gitlab/gitlab
sudo -u gitlab -H bundle install --without development test sqlite postgres --deployment
- create the database: sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production
- 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
- 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
- check the status: sudo -u gitlab bundle exec rake gitlab:app:status RAILS_ENV=production
- make sure gitlab starts: sudo -u gitlab bundle exec rails s -e production
- ?enable the auto-merge feature: cd /home/gitlab/gitlab
sudo -u gitlab -H bundle exec rake gitlab:app:enable_automerge RAILS_ENV=production
- start apache
- 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
- disable email notifications:
- /home/gitlab/gitlab/app/views/layouts/profile.html.haml
- /home/gitlab/gitlab/app/views/profile/show.html.haml
- disable email notifications:
- /home/gitlab/gitlab/app/mailers/notify.rb