Skip to content
Snippets Groups Projects
Commit 43feccad authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Merge branch '6-6-pre' of gitlab.com:gitlab-org/omnibus-gitlab into 6-6-pre

parents 25d3f635 4a49b564
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -3,6 +3,17 @@
This project creates full-stack platform-specific packages for
GitLab!
 
## Installation
### Ubuntu
```
sudo apt-get install openssh-server
sudo apt-get install postfix # sendmail or exim is also OK
sudo dpkg -i gitlab-x.y.z.deb # this is the .deb you downloaded
sudo gitlab-ctl reconfigure
```
## How to manage an Omnibus-installed GitLab
 
### Administrative commands
Loading
Loading
@@ -40,11 +51,13 @@ Omnibus-gitlab uses four different directories.
- `/var/log/gitlab` contains all log data generated by components of
omnibus-gitlab.
 
## Preparing a build environment on Ubuntu 12.04
## Preparing a build environment
 
To create builds you will need a build user (`ubuntu:ubuntu` in our example).
To create builds you will need a build user (`omnibus-build:omnibus-build` in our example).
Preparing the build machine requires sudo access.
 
### Ubuntu 12.04
```shell
# Install dependencies
sudo apt-get install ruby1.9.1 ruby1.9.1-dev git build-essential
Loading
Loading
@@ -52,11 +65,11 @@ sudo gem install --no-ri --no-rdoc bundler
 
# Create build directories for use by the build user
sudo mkdir -p /opt/gitlab /var/cache/omnibus
# We assume the build user and group is 'ubuntu'
sudo chown ubuntu:ubuntu /opt/gitlab /var/cache/omnibus
# We assume the build user and group is 'omnibus-build'
sudo chown omnibus-build:omnibus-build /opt/gitlab /var/cache/omnibus
```
 
Then, as the build user:
Then, as the build user (omnibus-build):
 
```shell
# Clone the omnibus repo
Loading
Loading
@@ -65,6 +78,43 @@ git clone https://gitlab.com/gitlab-org/omnibus-gitlab.git
# Install gem dependencies for omnibus-ruby
cd omnibus-gitlab
bundle install --path .bundle --binstubs
# Do a build (and take a break from the computer)
bin/omnibus build project gitlab
```
### Centos 6.5
```shell
sudo yum groupinstall 'Development Tools'
# Install RedHat Software Collections to get Ruby 1.9.3
sudo yum install centos-release-SCL
sudo yum install ruby193 ruby193-ruby-devel
# Create build directories for use by the build user
sudo mkdir -p /opt/gitlab /var/cache/omnibus
# We assume the build user and group is 'omnibus-build'
sudo chown omnibus-build:omnibus-build /opt/gitlab /var/cache/omnibus
```
As the build user (omnibus-build):
```shell
# Enable Ruby 1.9.3 from Software Collections
echo 'exec scl enable ruby193 bash' >> .bash_profile
# Start a new login shell so we do not have to log out and in
# this one time
bash --login
# Clone the omnibus repo
git clone https://gitlab.com/gitlab-org/omnibus-gitlab.git
# Install gem dependencies for omnibus-ruby
cd omnibus-gitlab
bundle install --path .bundle --binstubs
# Do a build (and take a break from the computer)
bin/omnibus build project gitlab
```
 
## Usage
Loading
Loading
Loading
Loading
@@ -30,6 +30,12 @@ dependency "postgresql"
 
source :git => "https://gitlab.com/gitlab-org/gitlab-ce.git"
 
env = {
"LDFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include",
"CFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include",
"LD_RUN_PATH" => "#{install_dir}/embedded/lib",
}
build do
# GitLab assumes it can extract the Git revision of the currently version
# from the Git repo the code lives in at boot. Because of our rsync later on,
Loading
Loading
@@ -38,7 +44,7 @@ build do
# build.
command "sed -i \"s/.*REVISION.*/REVISION = '$(git log --pretty=format:'%h' -n 1)'/\" config/initializers/2_app.rb"
 
bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem"
bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem", :env => env
 
# In order to precompile the assets, we need to get to a state where rake can
# load the Rails environment.
Loading
Loading
Loading
Loading
@@ -25,17 +25,16 @@ dependency "rsync"
source :git => "https://gitlab.com/gitlab-org/gitlab-shell.git"
 
build do
command "mkdir -p #{install_dir}/embedded/service/gitlab-shell"
command "#{install_dir}/embedded/bin/rsync -a --delete --exclude=.git/*** --exclude=.gitignore ./ #{install_dir}/embedded/service/gitlab-shell/"
block do
env_shebang = "#!/usr/bin/env ruby"
`grep -r -l '^#{env_shebang}' #{project_dir}`.split("\n").each do |ruby_script|
script = File.read(ruby_script)
next if script.start_with?("#!#{install_dir}") # Shebang looks good, skip this script
erb :dest => ruby_script,
erb :dest => ruby_script.sub(project_dir, "#{install_dir}/embedded/service/gitlab-shell"),
:source => "ruby_script_wrapper.erb",
:mode => 0755,
:vars => {:script => script, :install_dir => install_dir}
end
end
command "mkdir -p #{install_dir}/embedded/service/gitlab-shell"
command "#{install_dir}/embedded/bin/rsync -a --delete --exclude=.git/*** --exclude=.gitignore ./ #{install_dir}/embedded/service/gitlab-shell/"
end
Loading
Loading
@@ -38,6 +38,12 @@ directory ssh_dir do
recursive true
end
 
# If SELinux is enabled, make sure that OpenSSH thinks the .ssh directory of the
# git_user is valid.
execute "chcon -t ssh_home_t #{ssh_dir}" do
only_if "id -Z"
end
directory log_directory do
owner git_user
recursive true
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment