Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: atomic-penguin/cookbook-gitlab-deprecated
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: klamontagne/cookbook-gitlab5
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Jun 18, 2013

  1. Remove unicorn files for 5.x

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    6abd9d9 View commit details
  2. Remove gitolite files for 5.x

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    424b696 View commit details
  3. Add gitlab-shell recipe

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    ea8815a View commit details
  4. Replace unicorn with puma for 5.x

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    d4b7c1c View commit details
  5. Use rbenv for ruby

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    c9b8bb7 View commit details
  6. Fix nginx config for 5.x

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    7ffb07b View commit details
  7. Fix misc for GitLab 5.x

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    a4fb627 View commit details
  8. Patch gitlab-shell shebang for rbenv

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    a10e246 View commit details
  9. Update documentation

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    0b3dfcf View commit details
  10. Set default API URL as non https

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    80f922c View commit details
  11. Re-add nginx ssl

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    e2dc157 View commit details
  12. Fix init script ERB syntax

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    dda9d0a View commit details
  13. foodcritic

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    884d121 View commit details
  14. Update travis url

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    d85fa57 View commit details
  15. Add author

    Kevin Lamontagne committed Jun 18, 2013
    Copy the full SHA
    7e1a9a0 View commit details

Commits on Jun 19, 2013

  1. Use FORCE env variable to bypass gitlab setup prompt

    Kevin Lamontagne committed Jun 19, 2013
    Copy the full SHA
    a123c72 View commit details

Commits on Jun 26, 2013

  1. Run rake task gitlab:setup correctly

    Kevin Lamontagne committed Jun 26, 2013
    Copy the full SHA
    b4c836a View commit details

Commits on Jun 27, 2013

  1. Bump version -> 0.6.0

    Kevin Lamontagne committed Jun 27, 2013
    Copy the full SHA
    b8733f5 View commit details
  2. Add omniauth+providers attributes

    Kevin Lamontagne committed Jun 27, 2013
    Copy the full SHA
    9f68fb3 View commit details
  3. Fix port for https

    Kevin Lamontagne committed Jun 27, 2013
    Copy the full SHA
    03855c7 View commit details
  4. Document omniauth providers

    Kevin Lamontagne committed Jun 27, 2013
    Copy the full SHA
    e2f3d2b View commit details
  5. Make relation between https and api clearer in attributes file

    Kevin Lamontagne committed Jun 27, 2013
    Copy the full SHA
    97f1fba View commit details

Commits on Jun 28, 2013

  1. Upgrade 5.2 -> 5.3

    Kevin Lamontagne committed Jun 28, 2013
    Copy the full SHA
    9dec89d View commit details
  2. Match commit 70e80d from gitlabhq

    When stopped correctly there should be no warning about a
    missing socket file.
    Kevin Lamontagne committed Jun 28, 2013
    Copy the full SHA
    e30535c View commit details

Commits on Jul 2, 2013

  1. Correct travis URL

    Kevin Lamontagne authored and Kevin Lamontagne committed Jul 2, 2013
    Copy the full SHA
    70737ab View commit details

Commits on Jul 3, 2013

  1. Fix assets compile

    Kevin Lamontagne committed Jul 3, 2013
    Copy the full SHA
    e1355cd View commit details

Commits on Jul 9, 2013

  1. Run rake tasks later

    Kevin Lamontagne committed Jul 9, 2013
    Copy the full SHA
    3a1bd9f View commit details

Commits on Sep 12, 2013

  1. Create gitlab-satellites

    Kevin Lamontagne committed Sep 12, 2013
    Copy the full SHA
    8931dbd View commit details
75 changes: 37 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <a name="title"></a> cookbook-gitlab [![Build Status](https://secure.travis-ci.org/atomic-penguin/cookbook-gitlab.png?branch=master)](http://travis-ci.org/atomic-penguin/cookbook-gitlab)
# <a name="title"></a> cookbook-gitlab [![Build Status](https://secure.travis-ci.org/klamontagne/cookbook-gitlab5.png?branch=master)](http://travis-ci.org/klamontagne/cookbook-gitlab5)

## Description

@@ -7,17 +7,14 @@ application.

Code hosted on github [here](https://github.com/gitlabhq/gitlabhq/tree/stable).

This cookbook was developed on RHEL/CentOS 6. Other platforms may need re-worked,
please open an issue or send a pull request to either, atomic-penguin or jackl0phty, on github.
This cookbook was developed on Ubuntu 12.04. Other platforms may need some tweaks,
please open an issue or send a pull request on GitHub

## Requirements
============

* Hard disk space
- About 200 Mb, plus enough space for repositories on /var

* Ruby 1.9.1 packages
- Packages used for Debian / Ubuntu only
- About 200 Mb, plus enough space for repositories on /home/git

* Nginx package
- All platforms need an nginx package to configure Nginx and Unicorn.
@@ -28,7 +25,7 @@ The dependencies in this cookbook add up to over 1,500 lines of code.
This would not have been possible without the great community work of so many others.
Much kudos to everyone who added indirectly to the epicness of this cookbook.

* [ruby\_build](http://fnichol.github.com/chef-ruby_build/)
* [ruby\_build](http://fnichol.github.com/chef-ruby_build/) and [rbenv](https://github.com/fnichol/chef-rbenv)
- Thanks to Fletcher Nichol for his awesome ruby\_build cookbook.
This ruby\_build LWRP is used to build Ruby 1.9.2 for gitlab,
since Redhat shipped rubies are not compatible with the application.
@@ -63,58 +60,47 @@ Much kudos to everyone who added indirectly to the epicness of this cookbook.

## Notes about conflicts

* [gitolite](http://ckbk.it/gitolite) cookbook
- The gitolite recipe within our cookbook was based on David Ruan's cookbook.
We couldn't integrate gitolite and gitlab without significant rework on David's
original cookbook. Our gitolite recipe will only configure gitolite for use with gitlab.
Our gitlab::gitolite recipe will not set up a standalone gitolite installation as David's
cookbook does.

* [nginx](http://ckbk.it/nginx) cookbook
- Our default recipe templates out the /etc/nginx/conf.d/default.conf. This will directly
conflict with another cookbook, such as nginx, trying to manage this file.
- Our default recipe templates out the /etc/nginx/conf.d/default.conf or /etc/nginx/sites-available/default. This will directly
conflict with another cookbook, such as nginx, or APT package management, trying to manage this file.

## Attributes

* gitlab['gitolite\_url']
- Github gitolite address
- Default git://github.com/sitaramc/gitolite.git
* gitlab['gitlab-shell\_url']
- Github gitlab-shell address
- Default https://github.com/gitlabhq/gitlab-shell.git

* gitlab['git\_user'] & gitlab['git\_group']
- Git service account for gitolite
- Git service account for GitLab
- Default git

* gitlab['git\_home']
- Top-level home for gitolite and repositories
- Default /var/git
- Top-level home for GitLab, gitlab-shell and repositories
- Default /home/git

* gitlab['gitolite\_home']
- Application home for gitolite
- Default /var/git/gitolite

* gitlab['gitolite\_umask']
- Umask setting for gitolite.rc
- Defaults to 0007
* gitlab['gitlab-shell\_home']
- Application home for gitlab-shell
- Default /home/git/gitlab-shell

* gitlab['user'] & gitlab['group']
- Gitlab service user and group for Unicorn Rails app
- Default gitlab
- Gitlab service user and group for Puma Rails app
- Default git

* gitlab['home']
- Gitlab top-level home for service account
- default /var/gitlab
- default /home/git

* gitlab['app\_home']
- Gitlab application home
- Default /var/gitlab/gitlab
- Default /home/git/gitlab

* gitlab['gitlab\_url']
- Github gitlab address
- Default git://github.com/gitlabhq/gitlabhq.git

* gitlab['gitlab\_branch']
- Gitlab git branch
- Default master
- Default 5-2-stable

* gitlab['packages']
- Platform specific OS packages
@@ -124,9 +110,8 @@ Much kudos to everyone who added indirectly to the epicness of this cookbook.
- Defaults to yes

* gitlab['install\_ruby']
- Attribute to determine whether vendor packages are installed,
or Rubies are built
- Redhat family defaults 1.9.2; Debian family defaults to package.
- Attribute to determine ruby version installed by rbenv
- Default 1.9.3-p429

* gitlab['https']
- Whether https should be used
@@ -148,6 +133,17 @@ Much kudos to everyone who added indirectly to the epicness of this cookbook.
- In seconds. Older backups will automatically be deleted when new backup is created. Set to 0 to keep backups forever.
- Defaults to 604800

* gitlab['puma_workers']
- Number of puma workers for clustering mode (see puma.rb)
- Defaults to 0 (disabled)

* gitlab['omniauth']['enable_omniauth'], gitlab['omniauth']['allow_single_sign_on'], gitlab['omniauth']['block_auto_created_users']
- Omniauth support variables (see gitlab.yml)
- Defaults disable Omniauth
* gitlab['omniauth']['providers']
- Array of providers for omniauth (Google, Twitter, GitHub), you need to install the appropriate gem (as the git user) for others.
- Example: [ { :name => "google_oauth2", :app_id => "xyz.apps.googleusercontent.com", :app_secret => "abcd" } ]

### Database Attributes

**Note**, most of the database attributes have sane defaults. You will only need to change these configuration options if
@@ -207,6 +203,9 @@ Copyright: 2012
Author: Eric G. Wolfe
Copyright: 2012

Author: K. Lamontagne
Copyright: 2013

Gitlolite Author: David Ruan
Copyright: RailsAnt, Inc., 2010

54 changes: 40 additions & 14 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -18,14 +18,14 @@
# limitations under the License.

# Set attributes for the git user
default['gitlab']['user'] = "gitlab"
default['gitlab']['group'] = "gitlab"
default['gitlab']['home'] = "/var/gitlab"
default['gitlab']['user'] = "git"
default['gitlab']['group'] = "git"
default['gitlab']['home'] = "/home/git"
default['gitlab']['app_home'] = "#{node['gitlab']['home']}/gitlab"

# Set github URL for gitlab
default['gitlab']['gitlab_url'] = "git://github.com/gitlabhq/gitlabhq.git"
default['gitlab']['gitlab_branch'] = "stable"
default['gitlab']['gitlab_branch'] = "5-3-stable"

# Database setup
default['gitlab']['database']['type'] = "mysql"
@@ -36,11 +36,18 @@
default['gitlab']['database']['database'] = "gitlab"
default['gitlab']['database']['username'] = "gitlab"

# nginx vhost file path
case node['platform']
when "ubuntu","debian"
default['gitlab']['nginx_vhost'] = "/etc/nginx/sites-available/default"
else # "redhat","centos","amazon","scientific" ## other?
default['gitlab']['nginx_vhost'] = "/etc/nginx/conf.d/default.conf"
end

# Required packages for Gitlab
case node['platform']
when "ubuntu","debian"
default['gitlab']['packages'] = %w{
ruby1.9.1 ruby1.9.1-dev ri1.9.1 libruby1.9.1
curl wget checkinstall libxslt-dev libsqlite3-dev
libcurl4-openssl-dev libssl-dev libmysql++-dev
libicu-dev libc6-dev libyaml-dev nginx python python-dev
@@ -62,7 +69,6 @@
end
else
default['gitlab']['packages'] = %w{
ruby1.9.1 ruby1.9.1-dev ri1.9.1 libruby1.9.1
curl wget checkinstall libxslt-dev libsqlite3-dev
libcurl4-openssl-dev libssl-dev libmysql++-dev
libicu-dev libc6-dev libyaml-dev nginx python
@@ -72,18 +78,38 @@

default['gitlab']['trust_local_sshkeys'] = "yes"

# Problems deploying this on RedHat provided rubies.
case node['platform']
when "redhat","centos","scientific","amazon"
default['gitlab']['install_ruby'] = "1.9.2-p290"
else
default['gitlab']['install_ruby'] = "package"
end
default['gitlab']['install_ruby'] = "1.9.3-p429"

default['gitlab']['https'] = false
# hostname used for gitlab-shell. Set as https if you set the above to true
default['gitlab']['gitlab_api_url'] = "http://localhost/"

default['gitlab']['ssl_certificate'] = "/etc/nginx/#{node['fqdn']}.crt"
default['gitlab']['ssl_certificate_key'] = "/etc/nginx/#{node['fqdn']}.key"
default['gitlab']['ssl_req'] = "/C=US/ST=Several/L=Locality/O=Example/OU=Operations/CN=#{node['fqdn']}/emailAddress=root@localhost"

default['gitlab']['backup_path'] = node['gitlab']['app_home'] + "/backups"

default['gitlab']['backup_path'] = "tmp/backups"
default['gitlab']['backup_keep_time'] = 604800

# workers for puma "cluster mode", see config/puma.rb
default['gitlab']['puma_wokers'] = 0

# rbenv
node.default['rbenv']['user_installs'] = [
{ 'user' => default['gitlab']['user'] }
]

# Google oauth2
default['gitlab']['omniauth']['enable_omniauth'] = false
default['gitlab']['omniauth']['allow_single_sign_on'] = false
default['gitlab']['omniauth']['block_auto_created_users'] = true
default['gitlab']['omniauth']['providers'] = {}
#example
#default['gitlab']['omniauth']['providers'] = [ { :name => "google_oauth2",
# :app_id => "xyz.apps.googleusercontent.com",
# :app_secret => "abcd" } ]




10 changes: 5 additions & 5 deletions attributes/gitolite.rb → attributes/gitlab-shell.rb
Original file line number Diff line number Diff line change
@@ -18,16 +18,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

default['gitlab']['gitolite_url'] = "https://github.com/gitlabhq/gitolite.git"
default['gitlab']['gitolite_branch'] = "gl-v304"
default['gitlab']['gitlab-shell_url'] = "https://github.com/gitlabhq/gitlab-shell.git"
default['gitlab']['gitlab-shell_branch'] = "v1.4.0"
default['gitlab']['git_user'] = "git"
default['gitlab']['git_group'] = "git"

# Set git home directory
default['gitlab']['git_home'] = "/var/git"
default['gitlab']['git_home'] = "/home/git"

# Set gitolite home directory
default['gitlab']['gitolite_home'] = "#{node['gitlab']['git_home']}/gitolite"
default['gitlab']['gitlab-shell_home'] = "#{node['gitlab']['git_home']}/gitlab-shell"

# Set gitolite umask
default['gitlab']['gitolite_umask'] = "0007"
default['gitlab']['gitlab-shell_umask'] = "0007"
4 changes: 2 additions & 2 deletions metadata.rb
Original file line number Diff line number Diff line change
@@ -4,11 +4,11 @@
description "Installs/Configures gitlab"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
name "gitlab"
version "0.5.0"
version "0.6.0"
%w{ gitolite nginx }.each do |cb_conflict|
conflicts cb_conflict
end
%w{ yumrepo ruby_build git redisio build-essential python readline sudo openssh perl xml zlib database mysql postgresql }.each do |cb_depend|
%w{ yumrepo ruby_build rbenv git redisio build-essential python readline sudo openssh perl xml zlib database mysql postgresql }.each do |cb_depend|
depends cb_depend
end
%w{ redhat centos scientific amazon debian ubuntu }.each do |os|
Loading