Skip to content
Snippets Groups Projects
Commit 295b39b5 authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Release 6.6.

parent da03182e
No related branches found
No related tags found
No related merge requests found
Showing
with 164 additions and 146 deletions
Loading
Loading
@@ -3,7 +3,7 @@ site :opscode
metadata
 
cookbook 'yum', tag: 'v2.4.4'
cookbook 'magic_shell', git: 'git://github.com/customink-webops/magic_shell.git', ref: '447b4b67420d3a7a749d2dd3b13a7f9aceb54c36'
cookbook 'monit', git: 'git://github.com/phlipper/chef-monit.git', tag: '1.4.0'
cookbook 'magic_shell', git: 'https://github.com/customink-webops/magic_shell.git', ref: '447b4b67420d3a7a749d2dd3b13a7f9aceb54c36'
cookbook 'monit', git: 'https://github.com/phlipper/chef-monit.git', tag: '1.4.0'
# Using a fork of the postgresql due to a bug in the original cookbook that prevented non-Debian installations
cookbook 'postgresql', git: 'git://github.com/maxlazio/postgresql.git'
cookbook 'postgresql', git: 'https://github.com/maxlazio/postgresql.git'
# Package
# Packages
if platform_family?("rhel")
packages = %w{
libicu-devel libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel
Loading
Loading
@@ -20,35 +20,83 @@ default['gitlab']['ruby'] = "2.0.0-p353"
default['gitlab']['shell_repository'] = "https://github.com/gitlabhq/gitlab-shell.git"
default['gitlab']['shell_revision'] = "v1.8.0"
 
# GitLab hq
default['gitlab']['repository'] = "https://github.com/gitlabhq/gitlabhq.git"
default['gitlab']['deploy_key'] = "" # Optional. Private key used to connect to private GitLab repository.
# GitLab shell config
# GitLab shell configuration
default['gitlab']['repos_path'] = "/home/git/repositories"
default['gitlab']['shell_path'] = "/home/git/gitlab-shell"
default['gitlab']['redis_path'] = "/usr/local/bin/redis-cli"
default['gitlab']['redis_host'] = "127.0.0.1"
default['gitlab']['redis_port'] = "6379"
default['gitlab']['namespace'] = "resque:gitlab"
default['gitlab']['self_signed_cert'] = false
# GitLab
default['gitlab']['repository'] = "https://github.com/gitlabhq/gitlabhq.git"
default['gitlab']['deploy_key'] = "" # Optional. Private key used to connect to private GitLab repository.
# Setup environments
if node['gitlab']['env'] == "development"
default['gitlab']['environments'] = %w{development test}
default['gitlab']['revision'] = "master"
default['gitlab']['url'] = "http://localhost:3000/"
default['gitlab']['port'] = "3000"
default['gitlab']['ssh_port'] = "2222"
else
default['gitlab']['environments'] = %w{production}
default['gitlab']['revision'] = "6-6-stable" # Must be branch, otherwise GitLab update will run on each chef run
default['gitlab']['url'] = "http://localhost:80/"
default['gitlab']['port'] = "80"
default['gitlab']['ssh_port'] = "22"
end
 
# GitLab hq config
# GitLab configuration
default['gitlab']['git_path'] = "/usr/local/bin/git"
default['gitlab']['host'] = "localhost"
default['gitlab']['email_from'] = "gitlab@localhost"
default['gitlab']['support_email'] = "support@localhost"
 
default['gitlab']['signup_enabled'] = false
default['gitlab']['projects_limit'] = 10
default['gitlab']['oauth_enabled'] = false
default['gitlab']['oauth_block_auto_created_users'] = true
default['gitlab']['oauth_allow_single_sign_on'] = false
default['gitlab']['oauth_providers'] = [] # Example: default['gitlab']['oauth_providers'] = [ { "name": "google_oauth2", "app_id": "YOUR APP ID", "app_secret": "YOUR APP SECRET", "args": "access_type: 'offline', approval_prompt: ''" }, { "name": "twitter", "app_id": "YOUR APP ID", "app_secret": "YOUR APP SECRET" }, { "name":"github", "app_id": "YOUR APP ID", "app_secret": "YOUR APP SECRET" }]
default['gitlab']['extra']['google_analytics_id'] = "" # Example: "AA-1231231-1"
default['gitlab']['extra']['sign_in_text'] = "" # Example: "![Company Logo](http://www.example.com/logo.png)"
default['gitlab']['ldap']['enabled'] = false
default['gitlab']['ldap']['host'] = "_your_ldap_server"
default['gitlab']['ldap']['base'] = "_the_base_where_you_search_for_users"
default['gitlab']['ldap']['port'] = 636
default['gitlab']['ldap']['uid'] = "sAMAccountName"
default['gitlab']['ldap']['method'] = "ssl"
default['gitlab']['ldap']['bind_dn'] = "_the_full_dn_of_the_user_you_will_bind_with"
default['gitlab']['ldap']['password'] = "_the_password_of_the_bind_user"
default['gitlab']['ldap']['allow_username_or_email_login'] = true
default['gitlab']['gravatar'] = true
default['gitlab']['default_projects_features']['issues'] = true
default['gitlab']['default_projects_features']['merge_requests'] = true
default['gitlab']['default_projects_features']['wiki'] = true
default['gitlab']['default_projects_features']['wall'] = false
default['gitlab']['default_projects_features']['snippets'] = false
default['gitlab']['default_projects_features']['visibility_level'] = "private"
# Gems
default['gitlab']['bundle_install'] = "SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment"
 
# Databases
# Assumed defaults
# database: mysql (option: postgresql)
# database: postgresql (option: mysql)
# environment: production (option: development)
default['gitlab']['external_database'] = false
default['gitlab']['database_adapter'] = "mysql"
default['gitlab']['database_adapter'] = "postgresql"
default['gitlab']['database_password'] = "datapass"
default['gitlab']['database_user'] = "git"
default['gitlab']['env'] = "production"
 
# MySQL attributes
default['mysql']['server_host'] = "localhost" # Host of the server that hosts the database.
default['mysql']['client_host'] = "localhost" # Host where user connections are allowed from.
default['mysql']['server_root_username'] = "root"
Loading
Loading
@@ -102,49 +150,15 @@ default['gitlab']['user_uid'] = nil # Use to specify user id.
default['gitlab']['user_gid'] = nil # Use to specify group id.
default['gitlab']['home'] = "/home/git"
 
# GitLab shell
default['gitlab']['shell_path'] = "/home/git/gitlab-shell"
# GitLab hq
default['gitlab']['path'] = "/home/git/gitlab" # Do not change this attribute in production since some code from the GitLab repo such as init.d assume this path.
default['gitlab']['signup_enabled'] = false
default['gitlab']['projects_limit'] = 10
default['gitlab']['oauth_enabled'] = false
default['gitlab']['oauth_block_auto_created_users'] = true
default['gitlab']['oauth_allow_single_sign_on'] = false
default['gitlab']['oauth_providers'] = [] # Example: default['gitlab']['oauth_providers'] = [ { "name": "google_oauth2", "app_id": "YOUR APP ID", "app_secret": "YOUR APP SECRET", "args": "access_type: 'offline', approval_prompt: ''" }, { "name": "twitter", "app_id": "YOUR APP ID", "app_secret": "YOUR APP SECRET" }, { "name":"github", "app_id": "YOUR APP ID", "app_secret": "YOUR APP SECRET" }]
default['gitlab']['extra']['google_analytics_id'] = "" # Example: "AA-1231231-1"
default['gitlab']['extra']['sign_in_text'] = "" # Example: "![Company Logo](http://www.example.com/logo.png)"
# GitLab shell config
default['gitlab']['repos_path'] = "/home/git/repositories"
# GitLab hq config
default['gitlab']['satellites_path'] = "/home/git/gitlab-satellites"
 
# Unicorn specific configuration
default['gitlab']['unicorn_workers_number'] = 2
default['gitlab']['unicorn_timeout'] = 30
 
# Setup environments
if node['gitlab']['env'] == "development"
default['gitlab']['port'] = "3000"
default['gitlab']['url'] = "http://localhost:3000/"
default['gitlab']['revision'] = "master"
default['gitlab']['environments'] = %w{development test}
default['gitlab']['ssh_port'] = "2222"
else
default['gitlab']['environments'] = %w{production}
default['gitlab']['url'] = "http://localhost:80/"
default['gitlab']['revision'] = "6-5-stable" # Must be branch, otherwise GitLab update will run on each chef run
default['gitlab']['port'] = "80"
default['gitlab']['ssh_port'] = "22"
end
# Nginx ssl certificates
default['gitlab']['ssl_certificate_path'] = "/etc/ssl" # Path to .crt file. If it directory doesn't exist it will be created
default['gitlab']['ssl_certificate_key_path'] = "/etc/ssl" # Path to .key file. If directory doesn't exist it will be created
default['gitlab']['ssl_certificate'] = "" # SSL certificate
Loading
Loading
@@ -193,23 +207,3 @@ default['gitlab']['monitrc']['unicorn'] = {
:mem_cycles_number => "25"
}
default['gitlab']['monitrc']['notify_email'] = "monitrc@localhost"
default['gitlab']['ldap']['enabled'] = false
default['gitlab']['ldap']['host'] = "_your_ldap_server"
default['gitlab']['ldap']['base'] = "_the_base_where_you_search_for_users"
default['gitlab']['ldap']['port'] = 636
default['gitlab']['ldap']['uid'] = "sAMAccountName"
default['gitlab']['ldap']['method'] = "ssl"
default['gitlab']['ldap']['bind_dn'] = "_the_full_dn_of_the_user_you_will_bind_with"
default['gitlab']['ldap']['password'] = "_the_password_of_the_bind_user"
default['gitlab']['ldap']['allow_username_or_email_login'] = true
default['gitlab']['gravatar'] = true
default['gitlab']['default_projects_features']['issues'] = true
default['gitlab']['default_projects_features']['merge_requests'] = true
default['gitlab']['default_projects_features']['wiki'] = true
default['gitlab']['default_projects_features']['wall'] = false
default['gitlab']['default_projects_features']['snippets'] = false
default['gitlab']['default_projects_features']['visibility_level'] = "private"
Loading
Loading
@@ -6,7 +6,7 @@ default['gitlab']['git']['url'] = "https://github.com/git/git/archive/v#{node['g
if platform_family?("rhel")
packages = %w{expat-devel gettext-devel libcurl-devel openssl-devel perl-ExtUtils-MakeMaker zlib-devel}
else
packages = %w{unzip build-essential libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev}
packages = %w{unzip build-essential libcurl4-openssl-dev libexpat1-dev gettext libz-dev libssl-dev}
end
 
default['gitlab']['git']['packages'] = packages
Loading
Loading
@@ -2,6 +2,7 @@
 
### Requirements
 
* [Ruby 1.9 or higher](https://www.ruby-lang.org/) and [Rubygems](http://rubygems.org/)
* [VirtualBox](https://www.virtualbox.org)
* [Vagrant 1.3.x](http://vagrantup.com)
* The NFS packages for the synced folder of Vagrant. These are already installed if you are using Mac OSX and not necessary if you are using Windows. On Linux install them by running:
Loading
Loading
@@ -32,6 +33,8 @@ If you are frequently developing GitLab you can consider installing all the deve
 
### Installation
 
We assume you already have a working Ruby and Rubygems installation.
`Vagrantfile` already contains the correct attributes so in order use this cookbook in a development environment following steps are needed:
 
1. Check if you have a gem version of Vagrant installed:
Loading
Loading
Loading
Loading
@@ -24,7 +24,8 @@ cat > /tmp/solo.json << EOF
"gitlab": {
"env": "development",
"database_adapter": "mysql",
"database_password": "a"
"database_password": "a",
"ssh_port": "22"
},
"mysql": {
"server_root_password": "a"
Loading
Loading
Loading
Loading
@@ -13,41 +13,7 @@ Configure your installation parameters by editing the `/tmp/solo.json` file.
Parameters which you will likely want to customize include:
 
```bash
cat > /tmp/solo.json << EOF
{
"gitlab": {
"host": "example.com",
"url": "http://example.com/",
"email_from": "gitlab@example.com",
"support_email": "support@example.com",
"database_adapter": "mysql or postgresql",
"database_password": "database password used by the GitLab application",
"repository": "clone URL for e.g. GitLab Enterprise Edition; omit this line to use Community Edition",
"revision": "branch or tag or SHA1 to install a specific version of GitLab, e.g. 6-4-stable"
},
"postgresql": {
"password": {
"postgres": "psqlpass"
}
},
"mysql": {
"server_root_password": "mysql root password",
"server_repl_password": "mysql replication password; omit this line for a random password",
"server_debian_password": "Debian administration password; omit this line for a random password"
},
"postfix": {
"mail_type": "client",
"myhostname": "mail.example.com",
"mydomain": "example.com",
"myorigin": "mail.example.com",
"smtp_use_tls": "no"
},
"run_list": [
"postfix",
"gitlab::default"
]
}
EOF
curl -o /tmp/solo.json https://gitlab.com/gitlab-org/cookbook-gitlab/raw/master/solo.json.production_example
```
 
You only need to keep parameters which need to differ from their default values.
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ maintainer_email 'marin@gitlab.com'
license 'MIT'
description 'Installs/Configures GitLab'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.6.5'
version '0.6.6'
 
recipe "gitlab::default", "Installation"
 
Loading
Loading
Loading
Loading
@@ -18,7 +18,8 @@ template File.join(gitlab['shell_path'], "config.yml") do
:redis_path => gitlab['redis_path'],
:redis_host => gitlab['redis_host'],
:redis_port => gitlab['redis_port'],
:namespace => gitlab['namespace']
:namespace => gitlab['namespace'],
:self_signed_cert => gitlab['self_signed_cert']
})
end
 
Loading
Loading
{
"gitlab": {
"host": "example.com",
"url": "http://example.com/",
"email_from": "gitlab@example.com",
"support_email": "support@example.com",
"database_adapter": "postgresql",
"database_password": "database password used by the GitLab application",
"repository": "clone URL for e.g. GitLab Enterprise Edition; omit this line to use Community Edition",
"revision": "branch or tag or SHA1 to install a specific version of GitLab, e.g. 6-4-stable"
},
"postgresql": {
"password": {
"postgres": "psqlpass"
}
},
"mysql": {
"server_root_password": "mysql root password",
"server_repl_password": "mysql replication password; omit this line for a random password",
"server_debian_password": "Debian administration password; omit this line for a random password"
},
"postfix": {
"mail_type": "client",
"myhostname": "mail.example.com",
"mydomain": "example.com",
"myorigin": "mail.example.com",
"smtp_use_tls": "no"
},
"run_list": [
"postfix",
"gitlab::default"
]
}
Loading
Loading
@@ -15,7 +15,7 @@ describe "gitlab::clone" do
it "clones the gitlab repository" do
expect(chef_run).to sync_git('/home/git/gitlab').with(
repository: 'https://github.com/gitlabhq/gitlabhq.git',
revision: '6-5-stable',
revision: '6-6-stable',
user: 'git',
group: 'git'
)
Loading
Loading
@@ -51,7 +51,7 @@ describe "gitlab::clone" do
it "clones the gitlab repository" do
expect(chef_run).to sync_git('/home/git/gitlab').with(
repository: 'https://github.com/gitlabhq/gitlabhq.git',
revision: '6-5-stable',
revision: '6-6-stable',
user: 'git',
group: 'git'
)
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ describe "gitlab::default" do
 
describe "under ubuntu" do
["12.04", "10.04"].each do |version|
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "ubuntu", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.converge("gitlab::default")
Loading
Loading
@@ -14,7 +14,7 @@ describe "gitlab::default" do
 
before do
# stubbing commands because real commands are disabled
stub_command("test -f /var/chef/cache/git-1.8.4.1.zip").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.4.1.zip").and_return(true)
stub_command("git --version | grep 1.8.4.1").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
stub_command("/usr/bin/mysql -u root -e 'show databases;'").and_return(true)
Loading
Loading
@@ -27,7 +27,7 @@ describe "gitlab::default" do
end
 
describe "when in development environment" do
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "ubuntu", version: version)
runner.node.set['gitlab']['env'] = "development"
runner.converge("gitlab::default")
Loading
Loading
@@ -43,7 +43,7 @@ describe "gitlab::default" do
 
describe "under centos" do
["5.8", "6.4"].each do |version|
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "centos", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.converge("gitlab::default")
Loading
Loading
@@ -51,7 +51,7 @@ describe "gitlab::default" do
 
before do
# stubbing commands because real commands are disabled
stub_command("test -f /var/chef/cache/git-1.8.4.1.zip").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.4.1.zip").and_return(true)
stub_command("git --version | grep 1.8.4.1").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
stub_command("/usr/bin/mysql -u root -e 'show databases;'").and_return(true)
Loading
Loading
@@ -65,7 +65,7 @@ describe "gitlab::default" do
 
 
describe "when in development environment" do
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "centos", version: version)
runner.node.set['gitlab']['env'] = "development"
runner.converge("gitlab::default")
Loading
Loading
Loading
Loading
@@ -33,7 +33,7 @@ describe "gitlab::gems" do
 
it 'executes bundle without development and test' do
resource = chef_run.find_resource(:execute, 'bundle install')
expect(resource.command).to eq(" PATH=\":/usr/local/bin:$PATH\"\n SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment --without postgres aws development test\n")
expect(resource.command).to eq(" PATH=\":/usr/local/bin:$PATH\"\n SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment --without mysql aws development test\n")
expect(resource.user).to eq("git")
expect(resource.group).to eq("git")
expect(resource.cwd).to eq("/home/git/gitlab")
Loading
Loading
@@ -48,7 +48,7 @@ describe "gitlab::gems" do
 
it 'executes bundle without production' do
resource = chef_run.find_resource(:execute, 'bundle install')
expect(resource.command).to eq(" PATH=\":/usr/local/bin:$PATH\"\n SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment --without postgres aws production\n")
expect(resource.command).to eq(" PATH=\":/usr/local/bin:$PATH\"\n SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment --without mysql aws production\n")
expect(resource.user).to eq("git")
expect(resource.group).to eq("git")
expect(resource.cwd).to eq("/home/git/gitlab")
Loading
Loading
@@ -127,7 +127,7 @@ describe "gitlab::gems" do
 
it 'executes bundle without development and test' do
resource = chef_run.find_resource(:execute, 'bundle install')
expect(resource.command).to eq(" PATH=\"/usr/pgsql-9.3/bin:/usr/local/bin:$PATH\"\n SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment --without postgres aws development test\n")
expect(resource.command).to eq(" PATH=\"/usr/pgsql-9.3/bin:/usr/local/bin:$PATH\"\n SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment --without mysql aws development test\n")
expect(resource.user).to eq("git")
expect(resource.group).to eq("git")
expect(resource.cwd).to eq("/home/git/gitlab")
Loading
Loading
@@ -142,7 +142,7 @@ describe "gitlab::gems" do
 
it 'executes bundle without production' do
resource = chef_run.find_resource(:execute, 'bundle install')
expect(resource.command).to eq(" PATH=\"/usr/pgsql-9.3/bin:/usr/local/bin:$PATH\"\n SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment --without postgres aws production\n")
expect(resource.command).to eq(" PATH=\"/usr/pgsql-9.3/bin:/usr/local/bin:$PATH\"\n SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment --without mysql aws production\n")
expect(resource.user).to eq("git")
expect(resource.group).to eq("git")
expect(resource.cwd).to eq("/home/git/gitlab")
Loading
Loading
Loading
Loading
@@ -6,46 +6,46 @@ describe "gitlab::git" do
 
describe "under ubuntu" do
["12.04", "10.04"].each do |version|
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "ubuntu", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.converge("gitlab::git")
end
 
before do
stub_command("test -f /var/chef/cache/git-1.8.4.1.zip").and_return(false)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.4.1.zip").and_return(false)
stub_command("git --version | grep 1.8.4.1").and_return(false)
end
 
it "installs all git required packages" do
packages = %w{unzip build-essential libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev}
packages = %w{unzip build-essential libcurl4-openssl-dev libexpat1-dev gettext libz-dev libssl-dev}
packages.each do |pkg|
expect(chef_run).to install_package(pkg)
end
end
 
it 'gets the source code for git' do
expect(chef_run).to create_remote_file('/var/chef/cache/git-1.8.4.1.zip').with(mode: 0644, source: "https://github.com/git/git/archive/v1.8.4.1.zip")
expect(chef_run).to create_remote_file("#{Chef::Config['file_cache_path']}/git-1.8.4.1.zip").with(mode: 0644, source: "https://github.com/git/git/archive/v1.8.4.1.zip")
end
 
it 'executes compiling git from source' do
resource = chef_run.find_resource(:execute, 'Extracting and Building Git 1.8.4.1 from Source')
expect(resource.command).to eq(" unzip -q git-1.8.4.1.zip\n cd git-1.8.4.1 && make prefix=/usr/local install\n")
expect(resource.cwd).to eq("/var/chef/cache")
expect(resource.cwd).to eq(Chef::Config['file_cache_path'])
end
end
end
 
describe "under centos" do
["5.8", "6.4"].each do |version|
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "centos", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.converge("gitlab::git")
end
 
before do
stub_command("test -f /var/chef/cache/git-1.8.4.1.zip").and_return(false)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.4.1.zip").and_return(false)
stub_command("git --version | grep 1.8.4.1").and_return(false)
end
 
Loading
Loading
@@ -57,13 +57,13 @@ describe "gitlab::git" do
end
 
it 'gets the source code for git' do
expect(chef_run).to create_remote_file('/var/chef/cache/git-1.8.4.1.zip').with(mode: 0644, source: "https://github.com/git/git/archive/v1.8.4.1.zip")
expect(chef_run).to create_remote_file("#{Chef::Config['file_cache_path']}/git-1.8.4.1.zip").with(mode: 0644, source: "https://github.com/git/git/archive/v1.8.4.1.zip")
end
 
it 'executes compiling git from source' do
resource = chef_run.find_resource(:execute, 'Extracting and Building Git 1.8.4.1 from Source')
expect(resource.command).to eq(" unzip -q git-1.8.4.1.zip\n cd git-1.8.4.1 && make prefix=/usr/local install\n")
expect(resource.cwd).to eq("/var/chef/cache")
expect(resource.cwd).to eq(Chef::Config['file_cache_path'])
end
end
end
Loading
Loading
Loading
Loading
@@ -23,7 +23,8 @@ describe "gitlab::gitlab_shell_install" do
redis_path: "/usr/local/bin/redis-cli",
redis_host: "127.0.0.1",
redis_port: "6379",
namespace: "resque:gitlab"
namespace: "resque:gitlab",
self_signed_cert: false
}
)
end
Loading
Loading
@@ -77,7 +78,8 @@ describe "gitlab::gitlab_shell_install" do
redis_path: "/usr/local/bin/redis-cli",
redis_host: "127.0.0.1",
redis_port: "6379",
namespace: "resque:gitlab"
namespace: "resque:gitlab",
self_signed_cert: false
}
)
end
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ describe "gitlab::packages" do
 
before do
# stubbing git commands because packages recipe requires gitlab::git
stub_command("test -f /var/chef/cache/git-1.8.4.1.zip").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.4.1.zip").and_return(true)
stub_command("git --version | grep 1.8.4.1").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
end
Loading
Loading
@@ -38,7 +38,7 @@ describe "gitlab::packages" do
 
before do
# stubbing git commands because packages recipe requires gitlab::git
stub_command("test -f /var/chef/cache/git-1.8.4.1.zip").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.4.1.zip").and_return(true)
stub_command("git --version | grep 1.8.4.1").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
end
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ describe "gitlab::setup" do
 
describe "under ubuntu" do
["12.04", "10.04"].each do |version|
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "ubuntu", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.node.set['gitlab']['database_adapter'] = "mysql"
Loading
Loading
@@ -19,7 +19,7 @@ describe "gitlab::setup" do
 
before do
# stubbing commands because real commands are disabled
stub_command("test -f /var/chef/cache/git-1.8.4.1.zip").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.4.1.zip").and_return(true)
stub_command("git --version | grep 1.8.4.1").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
stub_command("/usr/bin/mysql -u root -e 'show databases;'").and_return(true)
Loading
Loading
@@ -34,7 +34,7 @@ describe "gitlab::setup" do
end
 
describe "with postgresql database" do
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "ubuntu", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.node.set['gitlab']['database_adapter'] = "postgresql"
Loading
Loading
@@ -52,7 +52,7 @@ describe "gitlab::setup" do
end
 
describe "when in development environment" do
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "ubuntu", version: version)
runner.node.set['gitlab']['env'] = "development"
runner.node.set['gitlab']['database_adapter'] = "mysql"
Loading
Loading
@@ -76,7 +76,7 @@ describe "gitlab::setup" do
 
describe "under centos" do
["5.8", "6.4"].each do |version|
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "centos", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.node.set['gitlab']['database_adapter'] = "mysql"
Loading
Loading
@@ -89,7 +89,7 @@ describe "gitlab::setup" do
 
before do
# stubbing commands because real commands are disabled
stub_command("test -f /var/chef/cache/git-1.8.4.1.zip").and_return(true)
stub_command("test -f #{Chef::Config['file_cache_path']}/git-1.8.4.1.zip").and_return(true)
stub_command("git --version | grep 1.8.4.1").and_return(true)
stub_command("git --version >/dev/null").and_return(true)
stub_command("/usr/bin/mysql -u root -e 'show databases;'").and_return(true)
Loading
Loading
@@ -104,7 +104,7 @@ describe "gitlab::setup" do
end
 
describe "with postgresql database" do
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "centos", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.node.set['gitlab']['database_adapter'] = "postgresql"
Loading
Loading
@@ -122,7 +122,7 @@ describe "gitlab::setup" do
end
 
describe "when in development environment" do
let(:chef_run) do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "centos", version: version)
runner.node.set['gitlab']['env'] = "development"
runner.node.set['gitlab']['database_adapter'] = "mysql"
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ production: &base
 
## GitLab settings
gitlab:
## Web server settings
## Web server settings (note: host is the FQDN, do not include http://)
host: <%= @host %>
port: <%= @port %>
https: <%= @port == "443" ? true : false %>
Loading
Loading
@@ -52,6 +52,7 @@ production: &base
## COLOR = 5
# default_theme: 2 # default: 2
 
## Users management
# default: false - Account passwords are not sent via the email if signup is enabled.
signup_enabled: <%= @signup_enabled %>
Loading
Loading
@@ -194,7 +195,8 @@ production: &base
# Use the default values unless you really know what you are doing
git:
bin_path: <%= node['gitlab']['git_path'] %>
# Max size of a git object (e.g. a commit), in bytes
# The next value is the maximum memory size grit can use
# Given in number of bytes per git object (e.g. a commit)
# This value can be increased if you have very large commits
max_size: 5242880 # 5.megabytes
# Git timeout to read a commit, in seconds
Loading
Loading
Loading
Loading
@@ -9,7 +9,7 @@ http_settings:
# password: somepass
# ca_file: /etc/ssl/cert.pem
# ca_path: /etc/pki/tls/certs
self_signed_cert: false
self_signed_cert: <%= @self_signed_cert %>
 
# Repositories path
# Give the canonicalized absolute pathname,
Loading
Loading
# GITLAB
# Maintainer: @randx
# App Version: 5.0
# CHUNKED TRANSFER
# It is a known issue that Git-over-HTTP requires chunked transfer encoding [0] which is not
# supported by Nginx < 1.3.9 [1]. As a result, pushing a large object with Git (i.e. a single large file)
# can lead to a 411 error. In theory you can get around this by tweaking this configuration file and either
# - installing an old version of Nginx with the chunkin module [2] compiled in, or
# - using a newer version of Nginx.
#
# At the time of writing we do not know if either of these theoretical solutions works. As a workaround
# users can use Git over SSH to push large files.
#
# [0] https://git.kernel.org/cgit/git/git.git/tree/Documentation/technical/http-protocol.txt#n99
# [1] https://github.com/agentzh/chunkin-nginx-module#status
# [2] https://github.com/agentzh/chunkin-nginx-module
 
upstream gitlab {
server unix:/<%= @path %>/tmp/sockets/gitlab.socket;
Loading
Loading
@@ -29,7 +42,8 @@ server {
ssl_prefer_server_ciphers on;
<% end %>
 
# Set value of client_max_body_size to at least the value of git.max_size in gitlab.yml
# Increase this if you want to upload large attachments
# Or if you want to accept large git objects over http
client_max_body_size 5m;
 
# individual nginx logs for this gitlab vhost
Loading
Loading
@@ -45,8 +59,8 @@ server {
# if a file, which is not found in the root folder is requested,
# then the proxy pass the request to the upsteam (gitlab unicorn)
location @gitlab {
proxy_read_timeout 300; # https://github.com/gitlabhq/gitlabhq/issues/694
proxy_connect_timeout 300; # https://github.com/gitlabhq/gitlabhq/issues/694
proxy_read_timeout 300; # Some requests take more than 30 seconds.
proxy_connect_timeout 300; # Some requests take more than 30 seconds.
proxy_redirect off;
 
proxy_set_header X-Forwarded-Proto $scheme;
Loading
Loading
@@ -56,4 +70,6 @@ server {
 
proxy_pass http://gitlab;
}
error_page 502 /502.html;
}
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