Deploy schlupp from new private repo
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user