Deploy schlupp from new private repo
This commit is contained in:
		
							parent
							
								
									90835233de
								
							
						
					
					
						commit
						691a0e5533
					
				| @ -1,20 +1,32 @@ | ||||
| { | ||||
|   "id": "schlupp_5apps", | ||||
|   "nickserv_password": { | ||||
|     "encrypted_data": "vvrgkhRNU7P1SUwarjhqYUHwnsM3aNTpjnlrQVAROzs=\n", | ||||
|     "iv": "xKyDQiwzXdnDIRFK4O1wMg==\n", | ||||
|     "encrypted_data": "yeOvG/qNxQrrNzwbFuVx1Iv46e4TFTFdaF0YIZto9Go=\n", | ||||
|     "iv": "jC6ynFlZ9OVhJPCAGuAsmQ==\n", | ||||
|     "version": 1, | ||||
|     "cipher": "aes-256-cbc" | ||||
|   }, | ||||
|   "rs_logger_token": { | ||||
|     "encrypted_data": "vFpOfCfABrpeb2VOi0nhpZdgu255iLllaXthvY2ZZBE0k/EHYZwuUJv0X/rO\nF7GfHtSP/Jy0M5IYYL1+r72zeQ==\n", | ||||
|     "iv": "0nDz+V6NyZyzSYzln56MEQ==\n", | ||||
|     "encrypted_data": "U741T96OE3Cptk8adfIARV6F+U2ND4e3WBIaEa/yMiNwXHRZpppLisXXZYEn\nvTGrVrEI0aBQjkf7IaygxZq5UQ==\n", | ||||
|     "iv": "YwOa1Dj23zlg8gj80ce8Bg==\n", | ||||
|     "version": 1, | ||||
|     "cipher": "aes-256-cbc" | ||||
|   }, | ||||
|   "webhook_token": { | ||||
|     "encrypted_data": "XMhVPR/vCukJWE9GQ/PmPdjVCqsaPXLn59JENU+ViWnawdoWuOcTL6kbehmf\nyqKu\n", | ||||
|     "iv": "SAAqOyUuqtrDEXv5snj3Pw==\n", | ||||
|     "encrypted_data": "1eBL9/DoaIWZjXdU7ID6VQvpygn6JCTOoZEhTqcyf/r0DnFUpqRLkn7AYUnR\nj0Fy\n", | ||||
|     "iv": "CXxFSgmRPKfs+QNIGQTvsQ==\n", | ||||
|     "version": 1, | ||||
|     "cipher": "aes-256-cbc" | ||||
|   }, | ||||
|   "rs_ops_token": { | ||||
|     "encrypted_data": "cVHPjmjhd7iCTTgsagl4FbAo+5bC+2eOcZeb2sNp2WHLBh1/Ucs9PrxPv2Oo\n4s/Nxf1GltdgW3h/MlQ+JWvNAQ==\n", | ||||
|     "iv": "QKghQOc3Vmix9zSqtEHHfQ==\n", | ||||
|     "version": 1, | ||||
|     "cipher": "aes-256-cbc" | ||||
|   }, | ||||
|   "deploy_key": { | ||||
|     "encrypted_data": "MTVUcqeZipsrYk7lHVCsH7WG7FAt3IFM1/AMtPWYt0To/tfptJHiJms5L5HF\nNibFoHAg1Y/fG+egQVzuT8cx62M13g1uIBXIKeHI2NYBPaIU8R6NjTk0rUMR\n3WD7OJYBy62vPCiTkZGMtg5kt+4fPz3IxWfcIqFr/FeKKZIWPJmFDrUtY6yW\nhelyMd5k2s/haYh1pgs4bXJT4WhFOmYpjH0sSD5j0gr1liAPjuetP/zsKZz6\napFUy8wLpXVkD4f08PqwKsCtxPWSyObrP9BV2xP1KPYUvf63LWvN9qH9ue51\nm2kBPBZQMjkbaUMkcQziuCSiLfCmwRanx/FlThwyGJEukImIqL2DCHTUJLF2\n3MKx+/KWvoOgREWgXtsjhN7MKrM56I435JxfwX1akmYm0/e1IFveWeSDPKvU\nH22tzyaxioJtdm18AJCqPZkishqjnmlOk8yWIIu8aCd/r828soryIdWpcBmb\nVU1GM/Am/+4hy/Kex5t8B7tlS6YRs8odJe+c/J2WzoqOblyGYxa8rfui9P54\nhDGZ5JIUZ7M9XTkbXDwhxjcDVxCBP7ebb25j1oR4uDhwPMlXWQ/aNDgD62Cd\nbiTWa90QYfYVvqbwKJ4WKJ5VDwy5w5XObpn4jpwj+hXUeuxFyzTBbjvzxNwX\naS/tu6juWInxzAzLPRKaWoggVakuN3R00pIqniB0wWx36bpqj1n0Ct07/spU\nQqCvEhvS26KTrNMU0b/i9Un7u2RXpfZguNzvxjjj83k2KrBnNNnwxAvPvUBq\nosuODpvlIsypMjbwYHoRDkkbfsfuTblOFvx/s7uC/uo9j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iM3U\nKM629oIm5GKWyx1yFwIYKdsyb6KfDsB5MjyqY5LxRrGp8maChD8eDcG0uJSC\nhGpb8ct54HsDHgbaK7sb5vMqpuMaQKLXY8QipsxMI7UYzroIAH9XzRzsvwyb\nLb9GGQccNs+bLEaMUTJRr5ceIpLxXn9NnNhb0d+Ld2yQIrM7Yy285EdzNr+1\nYz6ve0AShfvhK4JENgHhOzttWRdGtj8gunf51WtOXhzjoVDfg3mc9Kx4tOr8\nqPQ7SIv45oAeJY26PSPRrhNQ17q7oF1HnwJIjsaALipDWgWYBtrjkvHwaMb/\nRIgaDfSRqy6Q3TaaPCSDGXI4bbdTHa0EUcOM5h01UnAWSvEUgfKzij+u5fPO\nG6eYhS3sZrQKffNTgSC2MyN816/N2/7OBn7vDoLVYtplZWvFU2CeaNx7jR8I\na1iHH84AasnuOlyLNUQaG//w\n", | ||||
|     "iv": "b+k3nFusX77B9riJSP0ocQ==\n", | ||||
|     "version": 1, | ||||
|     "cipher": "aes-256-cbc" | ||||
|   } | ||||
|  | ||||
| @ -5,7 +5,8 @@ | ||||
|     "sockethub::proxy", | ||||
|     "kosmos-hubot", | ||||
|     "kosmos-wordpress", | ||||
|     "kosmos-mediawiki" | ||||
|     "kosmos-mediawiki", | ||||
|     "5apps-hubot" | ||||
|   ], | ||||
|   "automatic": { | ||||
|     "ipaddress": "dev.kosmos.org" | ||||
|  | ||||
							
								
								
									
										11
									
								
								site-cookbooks/5apps-hubot/CHANGELOG.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								site-cookbooks/5apps-hubot/CHANGELOG.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| # 5apps-hubot CHANGELOG | ||||
| 
 | ||||
| This file is used to list changes made in each version of the 5apps-hubot cookbook. | ||||
| 
 | ||||
| ## 0.1.0 | ||||
| - [your_name] - Initial release of 5apps-hubot | ||||
| 
 | ||||
| - - - | ||||
| Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown. | ||||
| 
 | ||||
| The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown. | ||||
							
								
								
									
										80
									
								
								site-cookbooks/5apps-hubot/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										80
									
								
								site-cookbooks/5apps-hubot/README.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,80 @@ | ||||
| # 5apps-hubot Cookbook | ||||
| 
 | ||||
| TODO: Enter the cookbook description here. | ||||
| 
 | ||||
| e.g. | ||||
| This cookbook makes your favorite breakfast sandwich. | ||||
| 
 | ||||
| ## Requirements | ||||
| 
 | ||||
| TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc. | ||||
| 
 | ||||
| e.g. | ||||
| ### Platforms | ||||
| 
 | ||||
| - SandwichOS | ||||
| 
 | ||||
| ### Chef | ||||
| 
 | ||||
| - Chef 12.0 or later | ||||
| 
 | ||||
| ### Cookbooks | ||||
| 
 | ||||
| - `toaster` - 5apps-hubot needs toaster to brown your bagel. | ||||
| 
 | ||||
| ## Attributes | ||||
| 
 | ||||
| TODO: List your cookbook attributes here. | ||||
| 
 | ||||
| e.g. | ||||
| ### 5apps-hubot::default | ||||
| 
 | ||||
| <table> | ||||
|   <tr> | ||||
|     <th>Key</th> | ||||
|     <th>Type</th> | ||||
|     <th>Description</th> | ||||
|     <th>Default</th> | ||||
|   </tr> | ||||
|   <tr> | ||||
|     <td><tt>['5apps-hubot']['bacon']</tt></td> | ||||
|     <td>Boolean</td> | ||||
|     <td>whether to include bacon</td> | ||||
|     <td><tt>true</tt></td> | ||||
|   </tr> | ||||
| </table> | ||||
| 
 | ||||
| ## Usage | ||||
| 
 | ||||
| ### 5apps-hubot::default | ||||
| 
 | ||||
| TODO: Write usage instructions for each cookbook. | ||||
| 
 | ||||
| e.g. | ||||
| Just include `5apps-hubot` in your node's `run_list`: | ||||
| 
 | ||||
| ```json | ||||
| { | ||||
|   "name":"my_node", | ||||
|   "run_list": [ | ||||
|     "recipe[5apps-hubot]" | ||||
|   ] | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| ## Contributing | ||||
| 
 | ||||
| TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section. | ||||
| 
 | ||||
| e.g. | ||||
| 1. Fork the repository on Github | ||||
| 2. Create a named feature branch (like `add_component_x`) | ||||
| 3. Write your change | ||||
| 4. Write tests for your change (if applicable) | ||||
| 5. Run the tests, ensuring they all pass | ||||
| 6. Submit a Pull Request using Github | ||||
| 
 | ||||
| ## License and Authors | ||||
| 
 | ||||
| Authors: TODO: List authors | ||||
| 
 | ||||
							
								
								
									
										11
									
								
								site-cookbooks/5apps-hubot/metadata.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								site-cookbooks/5apps-hubot/metadata.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| name             '5apps-hubot' | ||||
| maintainer       'Kosmos' | ||||
| maintainer_email 'mail@kosmos.org' | ||||
| license          'All rights reserved' | ||||
| description      'Installs/Configures 5apps-hubot' | ||||
| long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | ||||
| version          '0.1.0' | ||||
| 
 | ||||
| depends 'kosmos-nodejs' | ||||
| depends 'application' | ||||
| depends 'application_nodejs' | ||||
							
								
								
									
										54
									
								
								site-cookbooks/5apps-hubot/recipes/default.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								site-cookbooks/5apps-hubot/recipes/default.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,54 @@ | ||||
| # | ||||
| # Cookbook Name:: 5apps-hubot | ||||
| # Recipe:: default | ||||
| # | ||||
| # Copyright 2016, Kosmos | ||||
| # | ||||
| # All rights reserved - Do Not Redistribute | ||||
| # | ||||
| 
 | ||||
| firewall_rule 'hubot_express_schlupp' do | ||||
|   port     8081 | ||||
|   protocol :tcp | ||||
|   command  :allow | ||||
| end | ||||
| 
 | ||||
| schlupp_5apps_data_bag_item = Chef::EncryptedDataBagItem.load('credentials', 'schlupp_5apps') | ||||
| 
 | ||||
| application "schlupp" do | ||||
|   path "/srv/schlupp" | ||||
|   owner "hubot" | ||||
|   group "hubot" | ||||
| 
 | ||||
|   action :deploy | ||||
| 
 | ||||
|   repository "git@gitlab.com:5apps/schlupp.git" | ||||
|   revision   "master" | ||||
|   deploy_key schlupp_5apps_data_bag_item['deploy_key'] | ||||
| 
 | ||||
|   nodejs do | ||||
|     entry_point "/srv/schlupp/current/bin/hubot -a irc" | ||||
|     # Use our own systemd service that depends on redis-server | ||||
|     template "nodejs.systemd.service.erb" | ||||
|     environment "HUBOT_IRC_SERVER"            => "5apps.irc.grove.io", | ||||
|                 "HUBOT_IRC_ROOMS"             => "#5apps,#5info,#5ops,#core,#deploy,#gymapp,#liveident,#storage,#watercooler", | ||||
|                 "HUBOT_IRC_NICK"              => "schlupp", | ||||
|                 "HUBOT_IRC_NICKSERV_PASSWORD" => schlupp_5apps_data_bag_item['nickserv_password'], | ||||
|                 "HUBOT_IRC_PASSWORD"          => "5apps", | ||||
|                 "HUBOT_IRC_UNFLOOD"           => "100", | ||||
|                 "HUBOT_RSS_PRINTSUMMARY"      => "false", | ||||
|                 "HUBOT_RSS_IRCCOLORS"         => "true", | ||||
|                 "EXPRESS_PORT"                => "8081", | ||||
|                 "HUBOT_RSS_HEADER"            => "Update:", | ||||
|                 "HUBOT_AUTH_ADMIN"            => "galfert,gregkare,basti", | ||||
|                 "HUBOT_IRC_USESSL"            => "true", | ||||
|                 "REDIS_URL"                   => "redis://localhost:6379/5apps", | ||||
|                 "HUBOT_IRC_PORT"              => "6697", | ||||
|                 "RS_LOGGER_USER"              => "5apps@5apps.com", | ||||
|                 "RS_LOGGER_TOKEN"             => schlupp_5apps_data_bag_item['rs_logger_token'], | ||||
|                 "RS_LOGGER_SERVER_NAME"       => "grove-5apps", | ||||
|                 "RS_OPS_TOKEN"                => schlupp_5apps_data_bag_item['rs_ops_token'], | ||||
|                 "WEBHOOK_TOKEN"               => schlupp_5apps_data_bag_item['webhook_token'], | ||||
|                 "HUBOT_IRC_SERVER_FAKE_SSL"   => "true" # Accept expired grove cert... | ||||
|   end | ||||
| end | ||||
| @ -0,0 +1,17 @@ | ||||
| [Unit] | ||||
| Description=Start nodejs app | ||||
| Requires=redis-server.service | ||||
| After=redis-server.service | ||||
| 
 | ||||
| [Service] | ||||
| ExecStart=<%= @entry %> | ||||
| WorkingDirectory=<%= @app_dir %> | ||||
| User=<%= @user %> | ||||
| Group=<%= @group %> | ||||
| <% unless @environment.empty? -%> | ||||
| Environment=<% @environment.each do |key, value| -%>'<%= key %>=<%= value %>' <% end %> | ||||
| <% end -%> | ||||
| Restart=always | ||||
| 
 | ||||
| [Install] | ||||
| WantedBy=multi-user.target | ||||
| @ -7,3 +7,5 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | ||||
| version          '0.1.0' | ||||
| 
 | ||||
| depends 'kosmos-nodejs' | ||||
| depends 'application' | ||||
| depends 'application_nodejs' | ||||
|  | ||||
| @ -13,12 +13,6 @@ firewall_rule 'hubot_express_hal8000' do | ||||
|   command  :allow | ||||
| end | ||||
| 
 | ||||
| firewall_rule 'hubot_express_schlupp' do | ||||
|   port     8081 | ||||
|   protocol :tcp | ||||
|   command  :allow | ||||
| end | ||||
| 
 | ||||
| include_recipe "kosmos-nodejs" | ||||
| include_recipe "kosmos-redis" | ||||
| 
 | ||||
| @ -97,44 +91,6 @@ application "hal8000" do | ||||
|   end | ||||
| end | ||||
| 
 | ||||
| schlupp_5apps_data_bag_item = Chef::EncryptedDataBagItem.load('credentials', 'schlupp_5apps') | ||||
| 
 | ||||
| application "schlupp" do | ||||
|   path "/srv/schlupp" | ||||
|   owner "hubot" | ||||
|   group "hubot" | ||||
| 
 | ||||
|   action :deploy | ||||
| 
 | ||||
|   repository "https://github.com/67P/hal8000.git" | ||||
|   revision   "master" | ||||
| 
 | ||||
|   nodejs do | ||||
|     entry_point "/srv/schlupp/current/bin/hubot -a irc" | ||||
|     # Use our own systemd service that depends on redis-server | ||||
|     template "nodejs.systemd.service.erb" | ||||
|     environment "HUBOT_IRC_SERVER"            => "5apps.irc.grove.io", | ||||
|                 "HUBOT_IRC_ROOMS"             => "#5apps,#5info,#5ops,#core,#deploy,#gymapp,#liveident,#storage,#watercooler", | ||||
|                 "HUBOT_IRC_NICK"              => "schlupp", | ||||
|                 "HUBOT_IRC_NICKSERV_PASSWORD" => schlupp_5apps_data_bag_item['nickserv_password'], | ||||
|                 "HUBOT_IRC_PASSWORD"          => "5apps", | ||||
|                 "HUBOT_IRC_UNFLOOD"           => "100", | ||||
|                 "HUBOT_RSS_PRINTSUMMARY"      => "false", | ||||
|                 "HUBOT_RSS_IRCCOLORS"         => "true", | ||||
|                 "EXPRESS_PORT"                => "8081", | ||||
|                 "HUBOT_RSS_HEADER"            => "Update:", | ||||
|                 "HUBOT_AUTH_ADMIN"            => "galfert,gregkare,basti", | ||||
|                 "HUBOT_IRC_USESSL"            => "true", | ||||
|                 "REDIS_URL"                   => "redis://localhost:6379/5apps", | ||||
|                 "HUBOT_IRC_PORT"              => "6697", | ||||
|                 "RS_LOGGER_USER"              => "5apps@5apps.com", | ||||
|                 "RS_LOGGER_TOKEN"             => schlupp_5apps_data_bag_item['rs_logger_token'], | ||||
|                 "RS_LOGGER_SERVER_NAME"       => "grove-5apps", | ||||
|                 "WEBHOOK_TOKEN"               => schlupp_5apps_data_bag_item['webhook_token'], | ||||
|                 "HUBOT_IRC_SERVER_FAKE_SSL"   => "true" # Accept expired grove cert... | ||||
|   end | ||||
| end | ||||
| 
 | ||||
| botka_freenode_data_bag_item = Chef::EncryptedDataBagItem.load('credentials', 'botka_freenode') | ||||
| 
 | ||||
| application "botka_freenode" do | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user