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 | 17 | |
| 18 | 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 | 23 | owner "root" |
| 24 | 24 | group "root" |
| 25 | 25 | mode "0775" |
| 26 | 26 | action :nothing |
| 27 | 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 | 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 | 35 | end |
| 36 | - node.consume_attributes(ChefServer.generate_config(node['fqdn'])) | |
| 36 | + node.consume_attributes(GitLab.generate_config(node['fqdn'])) | |
| 37 | 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 | 41 | end |
| 42 | 42 | |
| 43 | 43 | # Create the Chef User |
| 44 | -include_recipe "chef-server::users" | |
| 44 | +include_recipe "gitlab::users" | |
| 45 | 45 | |
| 46 | 46 | directory "/etc/chef" do |
| 47 | 47 | owner "root" |
| 48 | - group node['chef_server']['user']['username'] | |
| 48 | + group node['gitlab']['user']['username'] | |
| 49 | 49 | mode "0775" |
| 50 | 50 | action :create |
| 51 | 51 | end |
| 52 | 52 | |
| 53 | -directory "/var/opt/chef-server" do | |
| 53 | +directory "/var/opt/gitlab" do | |
| 54 | 54 | owner "root" |
| 55 | 55 | group "root" |
| 56 | 56 | mode "0755" |
| ... | ... | @@ -70,21 +70,21 @@ include_recipe "runit" |
| 70 | 70 | "bookshelf", |
| 71 | 71 | "erchef", |
| 72 | 72 | "bootstrap", |
| 73 | - "chef-server-webui", | |
| 73 | + "gitlab-webui", | |
| 74 | 74 | "nginx" |
| 75 | 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 | 78 | else |
| 79 | - include_recipe "chef-server::#{service}_disable" | |
| 79 | + include_recipe "gitlab::#{service}_disable" | |
| 80 | 80 | end |
| 81 | 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 | 87 | group "root" |
| 88 | 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 | 90 | end | ... | ... |