Move wormhole from barnard to nodejs-2
Fixed two small bugs in the recipe: * hubot user wasn't created when necessary * systemd template always included redis service dependency
This commit is contained in:
parent
333a76f086
commit
fe63f01f7b
@ -107,7 +107,6 @@
|
|||||||
"recipe[kosmos-hubot::botka_freenode]",
|
"recipe[kosmos-hubot::botka_freenode]",
|
||||||
"recipe[kosmos-hubot::hal8000]",
|
"recipe[kosmos-hubot::hal8000]",
|
||||||
"recipe[kosmos-hubot::hal8000_xmpp]",
|
"recipe[kosmos-hubot::hal8000_xmpp]",
|
||||||
"recipe[kosmos-hubot::wormhole]",
|
|
||||||
"recipe[sockethub]",
|
"recipe[sockethub]",
|
||||||
"recipe[sockethub::proxy]",
|
"recipe[sockethub::proxy]",
|
||||||
"recipe[kosmos-dirsrv]"
|
"recipe[kosmos-dirsrv]"
|
||||||
|
@ -65,6 +65,7 @@
|
|||||||
},
|
},
|
||||||
"run_list": [
|
"run_list": [
|
||||||
"recipe[kosmos-base]",
|
"recipe[kosmos-base]",
|
||||||
|
"recipe[kosmos-hubot::wormhole]",
|
||||||
"role[kredits_github]"
|
"role[kredits_github]"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ build_essential app_name do
|
|||||||
end
|
end
|
||||||
|
|
||||||
include_recipe "kosmos-nodejs"
|
include_recipe "kosmos-nodejs"
|
||||||
|
include_recipe "kosmos-hubot::_user"
|
||||||
|
|
||||||
application app_path do
|
application app_path do
|
||||||
data_bag = Chef::EncryptedDataBagItem.load('credentials', app_name)
|
data_bag = Chef::EncryptedDataBagItem.load('credentials', app_name)
|
||||||
@ -62,6 +63,7 @@ application app_path do
|
|||||||
action :nothing
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO use chef systemd_service resource
|
||||||
template "/lib/systemd/system/#{app_name}.service" do
|
template "/lib/systemd/system/#{app_name}.service" do
|
||||||
source 'nodejs.systemd.service.erb'
|
source 'nodejs.systemd.service.erb'
|
||||||
owner 'root'
|
owner 'root'
|
||||||
@ -70,6 +72,7 @@ application app_path do
|
|||||||
variables(
|
variables(
|
||||||
user: app_user,
|
user: app_user,
|
||||||
group: app_group,
|
group: app_group,
|
||||||
|
without_redis: true,
|
||||||
app_dir: app_path,
|
app_dir: app_path,
|
||||||
entry: "#{app_path}/bin/hubot -a irc --name #{app_name}",
|
entry: "#{app_path}/bin/hubot -a irc --name #{app_name}",
|
||||||
environment: {
|
environment: {
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Start nodejs app
|
Description=Start nodejs app
|
||||||
|
<% unless @without_redis %>
|
||||||
Requires=redis-server.service
|
Requires=redis-server.service
|
||||||
After=redis-server.service
|
After=redis-server.service
|
||||||
|
<% end %>
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=<%= @entry %>
|
ExecStart=<%= @entry %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user