Commit e5f1b5a791e90c753a12e682d9202392c7540487
Committed by
Sergio Oliveira
1 parent
6d98bb76
Exists in
master
and in
79 other branches
Removing useless commands on colab default recipe
Signed-off-by: Alexandre Barbosa <alexandreab@live.com> Signed-off-by: Paulo Tada <paulohtfs@gmail.com>
Showing
1 changed file
with
2 additions
and
30 deletions
Show diff stats
cookbooks/colab/recipes/default.rb
@@ -11,12 +11,6 @@ if node['platform'] == 'centos' | @@ -11,12 +11,6 @@ if node['platform'] == 'centos' | ||
11 | end | 11 | end |
12 | end | 12 | end |
13 | 13 | ||
14 | -# FIXME should not be needed; colab should depend on the right version of | ||
15 | -# colab-deps | ||
16 | -package 'colab-deps' do | ||
17 | - action :upgrade | ||
18 | -end | ||
19 | - | ||
20 | package 'colab' do | 14 | package 'colab' do |
21 | action :upgrade | 15 | action :upgrade |
22 | notifies :restart, 'service[colab]' | 16 | notifies :restart, 'service[colab]' |
@@ -40,13 +34,6 @@ directory '/var/lock/colab' do | @@ -40,13 +34,6 @@ directory '/var/lock/colab' do | ||
40 | mode 0755 | 34 | mode 0755 |
41 | end | 35 | end |
42 | 36 | ||
43 | -execute 'secret-key' do | ||
44 | - f = '/etc/colab/secret.key' | ||
45 | - command "openssl rand -hex 32 -out #{f} && chown root:colab #{f} && chmod 0640 #{f}" | ||
46 | - not_if { File.exists?(f) } | ||
47 | - notifies :create, 'template[/etc/colab/settings.yaml]' | ||
48 | -end | ||
49 | - | ||
50 | template '/etc/sysconfig/colab' do | 37 | template '/etc/sysconfig/colab' do |
51 | owner 'root' | 38 | owner 'root' |
52 | group 'root' | 39 | group 'root' |
@@ -61,6 +48,7 @@ template '/etc/colab/settings.d/00-database.py' do | @@ -61,6 +48,7 @@ template '/etc/colab/settings.d/00-database.py' do | ||
61 | notifies :restart, 'service[colab]' | 48 | notifies :restart, 'service[colab]' |
62 | end | 49 | end |
63 | 50 | ||
51 | +# Creating a gitlab admin user | ||
64 | template '/tmp/admin-gitlab.json' do | 52 | template '/tmp/admin-gitlab.json' do |
65 | 53 | ||
66 | password = SecureRandom.random_number.to_s | 54 | password = SecureRandom.random_number.to_s |
@@ -89,23 +77,6 @@ execute 'create-admin-token-gitlab' do | @@ -89,23 +77,6 @@ execute 'create-admin-token-gitlab' do | ||
89 | user 'git' | 77 | user 'git' |
90 | end | 78 | end |
91 | 79 | ||
92 | -template '/etc/colab/settings.d/01-apps.yaml' do | ||
93 | - owner 'root' | ||
94 | - group 'colab' | ||
95 | - mode 0640 | ||
96 | - notifies :restart, 'service[colab]' | ||
97 | - | ||
98 | - get_private_token = lambda do | ||
99 | - Dir.chdir '/usr/lib/gitlab' do | ||
100 | - `sudo -u git RAILS_ENV=production bundle exec rails runner \"puts User.find_by_name(\'admin-gitlab\').private_token\"`.strip | ||
101 | - end | ||
102 | - end | ||
103 | - | ||
104 | - variables( | ||
105 | - :get_private_token => get_private_token | ||
106 | - ) | ||
107 | -end | ||
108 | - | ||
109 | # Adding settings.d files | 80 | # Adding settings.d files |
110 | template '/etc/colab/settings.d/02-logging.py' do | 81 | template '/etc/colab/settings.d/02-logging.py' do |
111 | owner 'root' | 82 | owner 'root' |
@@ -160,6 +131,7 @@ service 'colab' do | @@ -160,6 +131,7 @@ service 'colab' do | ||
160 | action :restart | 131 | action :restart |
161 | end | 132 | end |
162 | 133 | ||
134 | +# Static files | ||
163 | directory '/var/lib/colab-assets/spb/' do | 135 | directory '/var/lib/colab-assets/spb/' do |
164 | owner 'root' | 136 | owner 'root' |
165 | group 'root' | 137 | group 'root' |