Commit 7974a8ac3d1cc46170f7145bed456b71c009d05e
1 parent
a5912c02
Exists in
master
and in
17 other branches
Replace chef.server with gitlab in default.rb
Showing
1 changed file
with
21 additions
and
21 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/recipes/default.rb
@@ -17,40 +17,40 @@ | @@ -17,40 +17,40 @@ | ||
17 | 17 | ||
18 | require 'openssl' | 18 | require 'openssl' |
19 | 19 | ||
20 | -ENV['PATH'] = "/opt/chef-server/bin:/opt/chef-server/embedded/bin:#{ENV['PATH']}" | 20 | +ENV['PATH'] = "/opt/gitlab/bin:/opt/gitlab/embedded/bin:#{ENV['PATH']}" |
21 | 21 | ||
22 | -directory "/etc/chef-server" do | 22 | +directory "/etc/gitlab" do |
23 | owner "root" | 23 | owner "root" |
24 | group "root" | 24 | group "root" |
25 | mode "0775" | 25 | mode "0775" |
26 | action :nothing | 26 | action :nothing |
27 | end.run_action(:create) | 27 | end.run_action(:create) |
28 | 28 | ||
29 | -if File.exists?("/etc/chef-server/chef-server.json") | ||
30 | - Chef::Log.warn("Please move to /etc/chef-server/chef-server.rb for configuration - /etc/chef-server/chef-server.json is deprecated.") | 29 | +if File.exists?("/etc/gitlab/gitlab.json") |
30 | + Chef::Log.warn("Please move to /etc/gitlab/gitlab.rb for configuration - /etc/gitlab/gitlab.json is deprecated.") | ||
31 | else | 31 | else |
32 | - ChefServer[:node] = node | ||
33 | - if File.exists?("/etc/chef-server/chef-server.rb") | ||
34 | - ChefServer.from_file("/etc/chef-server/chef-server.rb") | 32 | + GitLab[:node] = node |
33 | + if File.exists?("/etc/gitlab/gitlab.rb") | ||
34 | + GitLab.from_file("/etc/gitlab/gitlab.rb") | ||
35 | end | 35 | end |
36 | - node.consume_attributes(ChefServer.generate_config(node['fqdn'])) | 36 | + node.consume_attributes(GitLab.generate_config(node['fqdn'])) |
37 | end | 37 | end |
38 | 38 | ||
39 | -if File.exists?("/var/opt/chef-server/bootstrapped") | ||
40 | - node.set['chef_server']['bootstrap']['enable'] = false | 39 | +if File.exists?("/var/opt/gitlab/bootstrapped") |
40 | + node.set['gitlab']['bootstrap']['enable'] = false | ||
41 | end | 41 | end |
42 | 42 | ||
43 | # Create the Chef User | 43 | # Create the Chef User |
44 | -include_recipe "chef-server::users" | 44 | +include_recipe "gitlab::users" |
45 | 45 | ||
46 | directory "/etc/chef" do | 46 | directory "/etc/chef" do |
47 | owner "root" | 47 | owner "root" |
48 | - group node['chef_server']['user']['username'] | 48 | + group node['gitlab']['user']['username'] |
49 | mode "0775" | 49 | mode "0775" |
50 | action :create | 50 | action :create |
51 | end | 51 | end |
52 | 52 | ||
53 | -directory "/var/opt/chef-server" do | 53 | +directory "/var/opt/gitlab" do |
54 | owner "root" | 54 | owner "root" |
55 | group "root" | 55 | group "root" |
56 | mode "0755" | 56 | mode "0755" |
@@ -70,21 +70,21 @@ include_recipe "runit" | @@ -70,21 +70,21 @@ include_recipe "runit" | ||
70 | "bookshelf", | 70 | "bookshelf", |
71 | "erchef", | 71 | "erchef", |
72 | "bootstrap", | 72 | "bootstrap", |
73 | - "chef-server-webui", | 73 | + "gitlab-webui", |
74 | "nginx" | 74 | "nginx" |
75 | ].each do |service| | 75 | ].each do |service| |
76 | - if node["chef_server"][service]["enable"] | ||
77 | - include_recipe "chef-server::#{service}" | 76 | + if node["gitlab"][service]["enable"] |
77 | + include_recipe "gitlab::#{service}" | ||
78 | else | 78 | else |
79 | - include_recipe "chef-server::#{service}_disable" | 79 | + include_recipe "gitlab::#{service}_disable" |
80 | end | 80 | end |
81 | end | 81 | end |
82 | 82 | ||
83 | -include_recipe "chef-server::chef-pedant" | 83 | +include_recipe "gitlab::chef-pedant" |
84 | 84 | ||
85 | -file "/etc/chef-server/chef-server-running.json" do | ||
86 | - owner node['chef_server']['user']['username'] | 85 | +file "/etc/gitlab/gitlab-running.json" do |
86 | + owner node['gitlab']['user']['username'] | ||
87 | group "root" | 87 | group "root" |
88 | mode "0600" | 88 | mode "0600" |
89 | - content Chef::JSONCompat.to_json_pretty({ "chef_server" => node['chef_server'].to_hash, "run_list" => node.run_list }) | 89 | + content Chef::JSONCompat.to_json_pretty({ "gitlab" => node['gitlab'].to_hash, "run_list" => node.run_list }) |
90 | end | 90 | end |