diff --git a/README.md b/README.md index d84b167..7c0f342 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,25 @@ is calculated. - You can provide a query string here to filter which users will be selected - Default: "" +Recipes +======= + +## default + +This installs and starts GitLab with nginx and your chosen database. + +## runner + +This installs GitLab Runner. This does not have to be on the same system, in fact GitLab recommend against it. + +## docker + +This installs Docker and starts the service. It includes the `runner` recipe above. + +## mysql, postgres + +These are internal, set `gitlab['database']['type']` instead. + Usage ===== diff --git a/metadata.rb b/metadata.rb index 6734d2f..d21124e 100644 --- a/metadata.rb +++ b/metadata.rb @@ -18,6 +18,7 @@ ncurses nodejs openssh + packagecloud postgresql readline redisio @@ -30,6 +31,7 @@ depends cb_depend end depends 'chef_nginx', '~> 5.1' +depends 'docker', '~> 2.0' depends 'mysql', '~> 6.0' depends 'mysql2_chef_gem' diff --git a/recipes/docker.rb b/recipes/docker.rb new file mode 100644 index 0000000..de334d4 --- /dev/null +++ b/recipes/docker.rb @@ -0,0 +1,30 @@ +# +# Cookbook Name:: gitlab +# Recipe:: docker +# +# Copyright 2016, Yakara Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +include_recipe 'gitlab::runner' + +docker_service 'default' do + action [:create, :start] +end + +group 'docker' do + members 'gitlab-runner' + append true + action :modify +end diff --git a/recipes/runner.rb b/recipes/runner.rb new file mode 100644 index 0000000..2b74d5b --- /dev/null +++ b/recipes/runner.rb @@ -0,0 +1,24 @@ +# +# Cookbook Name:: gitlab +# Recipe:: runner +# +# Copyright 2016, Yakara Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +packagecloud_repo 'runner/gitlab-ci-multi-runner' do + base_url 'https://packages.gitlab.com' +end + +package 'gitlab-ci-multi-runner'