Commit 59b0bb69 authored by Marin Jankovski's avatar Marin Jankovski

Release for 6.6

parent 16fc6ece
# Package
# Packages
if platform_family?("rhel")
packages = %w{
libicu-devel libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel
......@@ -20,36 +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 hq config
# 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 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"
......@@ -103,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
......@@ -194,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"
......@@ -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"
......
......@@ -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'
)
......@@ -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'
)
......
......@@ -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")
......@@ -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")
......@@ -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")
......@@ -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")
......
......@@ -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 %>
......@@ -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 %>
......@@ -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
......
# 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;
......@@ -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
......@@ -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;
......@@ -56,4 +70,6 @@ server {
proxy_pass http://gitlab;
}
error_page 502 /502.html;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment