diff options
author | dosire <sytses@gmail.com> | 2014-02-20 14:43:57 +0100 |
---|---|---|
committer | dosire <sytses@gmail.com> | 2014-02-20 14:43:57 +0100 |
commit | efdf9b7b3b926fda7e0072f0d4224a7e2d68ebf8 (patch) | |
tree | 78be1a0ee40b0fe15457d2b9f736ad3aa1804f9e | |
parent | f591e4a48c662f2ed5a5c1f3e1ed92d7ad2cd1fb (diff) | |
download | gitlab-ce-efdf9b7b3b926fda7e0072f0d4224a7e2d68ebf8.tar.gz |
Adding a Dockerfile to build a production server based on the cookbook.
-rw-r--r-- | Berksfile | 9 | ||||
-rw-r--r-- | Dockerfile | 18 | ||||
-rw-r--r-- | solo.json | 34 | ||||
-rw-r--r-- | solo.rb | 5 |
4 files changed, 66 insertions, 0 deletions
diff --git a/Berksfile b/Berksfile new file mode 100644 index 00000000000..02f665fb592 --- /dev/null +++ b/Berksfile @@ -0,0 +1,9 @@ +site :opscode + +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' +# 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 'gitlab', git: 'https://gitlab.com/gitlab-org/cookbook-gitlab.git' + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000..c3396d29bba --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM ubuntu:12.10 + +RUN apt-get -y update +RUN apt-get -y install curl build-essential libxml2-dev libxslt-dev git +RUN curl -L https://www.opscode.com/chef/install.sh | bash +RUN echo "gem: --no-ri --no-rdoc" > ~/.gemrc +RUN /opt/chef/embedded/bin/gem install berkshelf + +# Thanks Paul Czarkowski "paul@paulcz.net" for http://tech.paulcz.net/2013/09/creating-immutable-servers-with-chef-and-docker-dot-io.html + +RUN apt-get -y update + +# Copy solo.rb, solo.json, Berksfile, etc. +ADD . /chef + +RUN cd /chef && /opt/chef/embedded/bin/berks install --path /chef/cookbooks +RUN chef-solo -c /chef/solo.rb -j /chef/solo.json + diff --git a/solo.json b/solo.json new file mode 100644 index 00000000000..e7705b2900a --- /dev/null +++ b/solo.json @@ -0,0 +1,34 @@ +{ + "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" + ] +} + diff --git a/solo.rb b/solo.rb new file mode 100644 index 00000000000..659040197cc --- /dev/null +++ b/solo.rb @@ -0,0 +1,5 @@ +root = File.absolute_path(File.dirname(__FILE__)) + +file_cache_path root +cookbook_path root + '/cookbooks' + |