Skip to content

New runner and docker recipes #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
=====

Expand Down
2 changes: 2 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
ncurses
nodejs
openssh
packagecloud
postgresql
readline
redisio
Expand All @@ -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'

Expand Down
30 changes: 30 additions & 0 deletions recipes/docker.rb
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions recipes/runner.rb
Original file line number Diff line number Diff line change
@@ -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'