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::hal8000]",
 | 
			
		||||
    "recipe[kosmos-hubot::hal8000_xmpp]",
 | 
			
		||||
    "recipe[kosmos-hubot::wormhole]",
 | 
			
		||||
    "recipe[sockethub]",
 | 
			
		||||
    "recipe[sockethub::proxy]",
 | 
			
		||||
    "recipe[kosmos-dirsrv]"
 | 
			
		||||
 | 
			
		||||
@ -65,6 +65,7 @@
 | 
			
		||||
  },
 | 
			
		||||
  "run_list": [
 | 
			
		||||
    "recipe[kosmos-base]",
 | 
			
		||||
    "recipe[kosmos-hubot::wormhole]",
 | 
			
		||||
    "role[kredits_github]"
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -32,6 +32,7 @@ build_essential app_name do
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
include_recipe "kosmos-nodejs"
 | 
			
		||||
include_recipe "kosmos-hubot::_user"
 | 
			
		||||
 | 
			
		||||
application app_path do
 | 
			
		||||
  data_bag = Chef::EncryptedDataBagItem.load('credentials', app_name)
 | 
			
		||||
@ -62,6 +63,7 @@ application app_path do
 | 
			
		||||
    action :nothing
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  # TODO use chef systemd_service resource
 | 
			
		||||
  template "/lib/systemd/system/#{app_name}.service" do
 | 
			
		||||
    source 'nodejs.systemd.service.erb'
 | 
			
		||||
    owner 'root'
 | 
			
		||||
@ -70,6 +72,7 @@ application app_path do
 | 
			
		||||
    variables(
 | 
			
		||||
      user: app_user,
 | 
			
		||||
      group: app_group,
 | 
			
		||||
      without_redis: true,
 | 
			
		||||
      app_dir: app_path,
 | 
			
		||||
      entry: "#{app_path}/bin/hubot -a irc --name #{app_name}",
 | 
			
		||||
      environment: {
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,9 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Start nodejs app
 | 
			
		||||
<% unless @without_redis %>
 | 
			
		||||
Requires=redis-server.service
 | 
			
		||||
After=redis-server.service
 | 
			
		||||
<% end %>
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
ExecStart=<%= @entry %>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user