Commit 720d3c34419a552132fc6c75732083740b510ab3
Exists in
master
and in
17 other branches
Merge branch 'omnibus_ctl' into 'master'
Add omnibus-ctl
Showing
5 changed files
with
95 additions
and
0 deletions
Show diff stats
config/projects/gitlab.rb
@@ -30,6 +30,9 @@ dependency "preparation" | @@ -30,6 +30,9 @@ dependency "preparation" | ||
30 | 30 | ||
31 | dependency "gitlab-shell" | 31 | dependency "gitlab-shell" |
32 | dependency "gitlab-webui" | 32 | dependency "gitlab-webui" |
33 | +dependency "chef-gem" | ||
34 | +dependency "gitlab-ctl" | ||
35 | +dependency "gitlab-cookbooks" | ||
33 | 36 | ||
34 | # version manifest file | 37 | # version manifest file |
35 | dependency "version-manifest" | 38 | dependency "version-manifest" |
@@ -0,0 +1,27 @@ | @@ -0,0 +1,27 @@ | ||
1 | +# | ||
2 | +# Copyright:: Copyright (c) 2012 Opscode, Inc. | ||
3 | +# License:: Apache License, Version 2.0 | ||
4 | +# | ||
5 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | +# you may not use this file except in compliance with the License. | ||
7 | +# You may obtain a copy of the License at | ||
8 | +# | ||
9 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | +# | ||
11 | +# Unless required by applicable law or agreed to in writing, software | ||
12 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | +# See the License for the specific language governing permissions and | ||
15 | +# limitations under the License. | ||
16 | +# | ||
17 | + | ||
18 | +name "gitlab-cookbooks" | ||
19 | + | ||
20 | +dependency "rsync" | ||
21 | + | ||
22 | +source :path => File.expand_path("files/gitlab-cookbooks", Omnibus.project_root) | ||
23 | + | ||
24 | +build do | ||
25 | + command "mkdir -p #{install_dir}/embedded/cookbooks" | ||
26 | + command "#{install_dir}/embedded/bin/rsync --delete -a ./ #{install_dir}/embedded/cookbooks/" | ||
27 | +end |
@@ -0,0 +1,65 @@ | @@ -0,0 +1,65 @@ | ||
1 | +# | ||
2 | +# Copyright:: Copyright (c) 2012 Opscode, Inc. | ||
3 | +# License:: Apache License, Version 2.0 | ||
4 | +# | ||
5 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | +# you may not use this file except in compliance with the License. | ||
7 | +# You may obtain a copy of the License at | ||
8 | +# | ||
9 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | +# | ||
11 | +# Unless required by applicable law or agreed to in writing, software | ||
12 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | +# See the License for the specific language governing permissions and | ||
15 | +# limitations under the License. | ||
16 | +# | ||
17 | + | ||
18 | +name "gitlab-ctl" | ||
19 | + | ||
20 | +dependency "rsync" | ||
21 | +dependency "omnibus-ctl" | ||
22 | + | ||
23 | +build do | ||
24 | + block do | ||
25 | + open("#{install_dir}/bin/gitlab-ctl", "w") do |file| | ||
26 | + file.print <<-EOH | ||
27 | +#!/bin/bash | ||
28 | +# | ||
29 | +# Copyright:: Copyright (c) 2012 Opscode, Inc. | ||
30 | +# License:: Apache License, Version 2.0 | ||
31 | +# | ||
32 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
33 | +# you may not use this file except in compliance with the License. | ||
34 | +# You may obtain a copy of the License at | ||
35 | +# | ||
36 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
37 | +# | ||
38 | +# Unless required by applicable law or agreed to in writing, software | ||
39 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
40 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
41 | +# See the License for the specific language governing permissions and | ||
42 | +# limitations under the License. | ||
43 | +# | ||
44 | + | ||
45 | +# Ensure the calling environment (disapproval look Bundler) does not infect our | ||
46 | +# Ruby environment if gitlab-ctl is called from a Ruby script. | ||
47 | +for ruby_env_var in RUBYOPT \\ | ||
48 | + BUNDLE_BIN_PATH \\ | ||
49 | + BUNDLE_GEMFILE \\ | ||
50 | + GEM_PATH \\ | ||
51 | + GEM_HOME | ||
52 | +do | ||
53 | + unset $ruby_env_var | ||
54 | +done | ||
55 | + | ||
56 | +#{install_dir}/embedded/bin/omnibus-ctl gitlab #{install_dir}/embedded/service/omnibus-ctl $@ | ||
57 | + EOH | ||
58 | + end | ||
59 | + end | ||
60 | + | ||
61 | + command "chmod 755 #{install_dir}/bin/gitlab-ctl" | ||
62 | + | ||
63 | + # additional omnibus-ctl commands | ||
64 | + command "#{install_dir}/embedded/bin/rsync -a ./ #{install_dir}/embedded/service/omnibus-ctl/" | ||
65 | +end |