Fixed code styling
This commit is contained in:
parent
4641e77438
commit
2f0ff1f559
|
@ -50,7 +50,7 @@ application botka_xmpp_path do
|
|||
group "hubot"
|
||||
content [
|
||||
"hubot-help",
|
||||
"hubot-remotestorage-logger"
|
||||
"hubot-remotestorage-logger",
|
||||
].to_json
|
||||
end
|
||||
|
||||
|
@ -76,23 +76,23 @@ application botka_xmpp_path do
|
|||
group 'root'
|
||||
mode '0644'
|
||||
variables(
|
||||
:user => "hubot",
|
||||
:group => "hubot",
|
||||
:app_dir => botka_xmpp_path,
|
||||
:entry => "#{botka_xmpp_path}/bin/hubot -a xmpp --name botka",
|
||||
:environment => { "HUBOT_XMPP_USERNAME" => "botka@5apps.com/hubot",
|
||||
"HUBOT_XMPP_PASSWORD" => botka_xmpp_data_bag_item['password'],
|
||||
"HUBOT_XMPP_ROOMS" => "5info@muc.5apps.com,5ops@muc.5apps.com,core@muc.5apps.com,deploy@muc.5apps.com,storage@muc.5apps.com,watercooler@muc.5apps.com,hilti@muc.5apps.com,gymapp@muc.5apps.com",
|
||||
"HUBOT_XMPP_HOST" => "xmpp.5apps.com",
|
||||
"HUBOT_RSS_PRINTSUMMARY" => "false",
|
||||
"EXPRESS_PORT" => "8082",
|
||||
"HUBOT_RSS_HEADER" => "Update:",
|
||||
"HUBOT_AUTH_ADMIN" => "basti,garret,greg",
|
||||
"REDIS_URL" => "redis://localhost:6379/5apps_botka_xmpp",
|
||||
"RS_LOGGER_USER" => "5apps@5apps.com",
|
||||
"RS_LOGGER_TOKEN" => botka_xmpp_data_bag_item['rs_logger_token'],
|
||||
"RS_LOGGER_SERVER_NAME" => "5apps",
|
||||
"WEBHOOK_TOKEN" => botka_xmpp_data_bag_item['webhook_token'] }
|
||||
user: "hubot",
|
||||
group: "hubot",
|
||||
app_dir: botka_xmpp_path,
|
||||
entry: "#{botka_xmpp_path}/bin/hubot -a xmpp --name botka",
|
||||
environment: { "HUBOT_XMPP_USERNAME" => "botka@5apps.com/hubot",
|
||||
"HUBOT_XMPP_PASSWORD" => botka_xmpp_data_bag_item['password'],
|
||||
"HUBOT_XMPP_ROOMS" => "5info@muc.5apps.com,5ops@muc.5apps.com,core@muc.5apps.com,deploy@muc.5apps.com,storage@muc.5apps.com,watercooler@muc.5apps.com,hilti@muc.5apps.com,gymapp@muc.5apps.com",
|
||||
"HUBOT_XMPP_HOST" => "xmpp.5apps.com",
|
||||
"HUBOT_RSS_PRINTSUMMARY" => "false",
|
||||
"EXPRESS_PORT" => "8082",
|
||||
"HUBOT_RSS_HEADER" => "Update:",
|
||||
"HUBOT_AUTH_ADMIN" => "basti,garret,greg",
|
||||
"REDIS_URL" => "redis://localhost:6379/5apps_botka_xmpp",
|
||||
"RS_LOGGER_USER" => "5apps@5apps.com",
|
||||
"RS_LOGGER_TOKEN" => botka_xmpp_data_bag_item['rs_logger_token'],
|
||||
"RS_LOGGER_SERVER_NAME" => "5apps",
|
||||
"WEBHOOK_TOKEN" => botka_xmpp_data_bag_item['webhook_token'] }
|
||||
)
|
||||
|
||||
notifies :run, "execute[systemctl daemon-reload]", :delayed
|
||||
|
|
|
@ -59,7 +59,7 @@ application schlupp_xmpp_path do
|
|||
"hubot-seen",
|
||||
"hubot-rss-reader",
|
||||
"hubot-incoming-webhook",
|
||||
"hubot-yubikey-invalidation"
|
||||
"hubot-yubikey-invalidation",
|
||||
].to_json
|
||||
end
|
||||
|
||||
|
@ -78,23 +78,23 @@ application schlupp_xmpp_path do
|
|||
group 'root'
|
||||
mode '0644'
|
||||
variables(
|
||||
:user => "hubot",
|
||||
:group => "hubot",
|
||||
:app_dir => schlupp_xmpp_path,
|
||||
:entry => "#{schlupp_xmpp_path}/bin/hubot -a xmpp --name schlupp",
|
||||
:environment => { "HUBOT_XMPP_USERNAME" => "schlupp@5apps.com/hubot",
|
||||
"HUBOT_XMPP_PASSWORD" => schlupp_xmpp_data_bag_item['password'],
|
||||
"HUBOT_XMPP_ROOMS" => "5info@muc.5apps.com,5ops@muc.5apps.com,core@muc.5apps.com,deploy@muc.5apps.com,storage@muc.5apps.com,watercooler@muc.5apps.com,hilti@muc.5apps.com,test@muc.5apps.com,gymapp@muc.5apps.com",
|
||||
"HUBOT_XMPP_HOST" => "xmpp.5apps.com",
|
||||
"HUBOT_RSS_PRINTSUMMARY" => "false",
|
||||
"EXPRESS_PORT" => "8083",
|
||||
"HUBOT_RSS_HEADER" => "Update:",
|
||||
"HUBOT_AUTH_ADMIN" => "basti,garret,greg",
|
||||
"REDIS_URL" => "redis://localhost:6379/5apps_schlupp_xmpp",
|
||||
"RS_OPS_TOKEN" => schlupp_xmpp_data_bag_item['rs_ops_token'],
|
||||
"WEBHOOK_TOKEN" => schlupp_xmpp_data_bag_item['webhook_token'],
|
||||
"AIRTABLE_API_KEY" => schlupp_xmpp_data_bag_item['airtable_api_key'],
|
||||
"GITHUB_TOKEN" => schlupp_xmpp_data_bag_item['github_token'] }
|
||||
user: "hubot",
|
||||
group: "hubot",
|
||||
app_dir: schlupp_xmpp_path,
|
||||
entry: "#{schlupp_xmpp_path}/bin/hubot -a xmpp --name schlupp",
|
||||
environment: { "HUBOT_XMPP_USERNAME" => "schlupp@5apps.com/hubot",
|
||||
"HUBOT_XMPP_PASSWORD" => schlupp_xmpp_data_bag_item['password'],
|
||||
"HUBOT_XMPP_ROOMS" => "5info@muc.5apps.com,5ops@muc.5apps.com,core@muc.5apps.com,deploy@muc.5apps.com,storage@muc.5apps.com,watercooler@muc.5apps.com,hilti@muc.5apps.com,test@muc.5apps.com,gymapp@muc.5apps.com",
|
||||
"HUBOT_XMPP_HOST" => "xmpp.5apps.com",
|
||||
"HUBOT_RSS_PRINTSUMMARY" => "false",
|
||||
"EXPRESS_PORT" => express_port,
|
||||
"HUBOT_RSS_HEADER" => "Update:",
|
||||
"HUBOT_AUTH_ADMIN" => "basti,garret,greg",
|
||||
"REDIS_URL" => "redis://localhost:6379/5apps_schlupp_xmpp",
|
||||
"RS_OPS_TOKEN" => schlupp_xmpp_data_bag_item['rs_ops_token'],
|
||||
"WEBHOOK_TOKEN" => schlupp_xmpp_data_bag_item['webhook_token'],
|
||||
"AIRTABLE_API_KEY" => schlupp_xmpp_data_bag_item['airtable_api_key'],
|
||||
"GITHUB_TOKEN" => schlupp_xmpp_data_bag_item['github_token'] }
|
||||
)
|
||||
|
||||
notifies :run, "execute[systemctl daemon-reload]", :delayed
|
||||
|
|
|
@ -29,7 +29,7 @@ execute "letsencrypt cert for xmpp.5apps.com" do
|
|||
cwd "/usr/local/certbot"
|
||||
only_if do
|
||||
File.exist?("#{node['nginx']['dir']}/sites-enabled/xmpp.5apps.com") &&
|
||||
! File.exist?("/etc/letsencrypt/live/xmpp.5apps.com/fullchain.pem")
|
||||
!File.exist?("/etc/letsencrypt/live/xmpp.5apps.com/fullchain.pem")
|
||||
end
|
||||
notifies :create, "template[#{node['nginx']['dir']}/sites-available/xmpp.5apps.com]", :delayed
|
||||
notifies :run, "execute[copy the tls cert to prosody folder]", :delayed
|
||||
|
|
|
@ -28,12 +28,12 @@ gem_package 'backup' do
|
|||
end
|
||||
|
||||
backup_data = Chef::EncryptedDataBagItem.load('credentials', 'backup')
|
||||
backup_dir = node["backup"]["dir"]
|
||||
directory backup_dir
|
||||
directory "#{backup_dir}/models"
|
||||
directory "#{backup_dir}/log"
|
||||
|
||||
directory node["backup"]["dir"]
|
||||
directory "#{node["backup"]["dir"]}/models"
|
||||
directory "#{node["backup"]["dir"]}/log"
|
||||
|
||||
template "#{node["backup"]["dir"]}/config.rb" do
|
||||
template "#{backup_dir}/config.rb" do
|
||||
source "config.rb.erb"
|
||||
mode 0640
|
||||
sensitive true
|
||||
|
@ -46,7 +46,7 @@ template "#{node["backup"]["dir"]}/config.rb" do
|
|||
end
|
||||
|
||||
if node["backup"]["default_model"]
|
||||
template "#{node["backup"]["dir"]}/models/default.rb" do
|
||||
template "#{backup_dir}/models/default.rb" do
|
||||
source "backup.rb.erb"
|
||||
mode 0640
|
||||
end
|
||||
|
@ -54,7 +54,7 @@ if node["backup"]["default_model"]
|
|||
cron "default backup model" do
|
||||
hour node['backup']['cron']['hour']
|
||||
minute node['backup']['cron']['minute']
|
||||
command "/usr/bin/env HOME=/home/user PATH=/usr/local/bin:/usr/local/ruby/bin:/usr/bin:/bin:$PATH /bin/sh -l -c 'backup perform -t default --root-path #{node["backup"]["dir"]} >> /var/log/backup.log 2>&1'"
|
||||
command "/usr/bin/env HOME=/home/user PATH=/usr/local/bin:/usr/local/ruby/bin:/usr/bin:/bin:$PATH /bin/sh -l -c 'backup perform -t default --root-path #{backup_dir} >> /var/log/backup.log 2>&1'"
|
||||
end
|
||||
|
||||
include_recipe 'logrotate'
|
||||
|
|
|
@ -17,5 +17,5 @@ node.default['ipfs']['config']['swarm']['addr_filter'] = [
|
|||
"/ip4/198.18.0.0/ipcidr/15",
|
||||
"/ip4/198.51.100.0/ipcidr/24",
|
||||
"/ip4/203.0.113.0/ipcidr/24",
|
||||
"/ip4/240.0.0.0/ipcidr/4"
|
||||
"/ip4/240.0.0.0/ipcidr/4",
|
||||
]
|
||||
|
|
|
@ -6,6 +6,6 @@ description 'Installs/Configures ipfs'
|
|||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '0.1.0'
|
||||
|
||||
supports ['ubuntu', 'debian']
|
||||
supports %w(ubuntu debian)
|
||||
|
||||
depends 'ark'
|
||||
|
|
|
@ -34,7 +34,7 @@ execute "ipfs init --empty-repo" do
|
|||
end
|
||||
|
||||
if platform?('ubuntu') && node[:platform_version].to_f < 15.04 ||
|
||||
platform?('debian') && node['platform_version'].to_f < 8
|
||||
platform?('debian') && node['platform_version'].to_f < 8
|
||||
template "ipfs.initd.service.erb" do
|
||||
path "/etc/init.d/ipfs"
|
||||
source 'ipfs.initd.service.erb'
|
||||
|
|
|
@ -15,8 +15,9 @@ action :create do
|
|||
not_if do
|
||||
require 'json'
|
||||
require 'mixlib/shellout'
|
||||
cmd = Mixlib::ShellOut.new("ipfs", "config", key, user: 'ipfs',
|
||||
env: {"IPFS_PATH" => "/home/ipfs/.ipfs"})
|
||||
cmd = Mixlib::ShellOut.new("ipfs", "config", key,
|
||||
user: 'ipfs',
|
||||
env: { "IPFS_PATH" => "/home/ipfs/.ipfs" })
|
||||
cmd.run_command
|
||||
begin
|
||||
JSON.parse(cmd.stdout) == value
|
||||
|
|
|
@ -4,7 +4,6 @@ require 'serverspec'
|
|||
set :backend, :exec
|
||||
|
||||
describe "IPFS" do
|
||||
|
||||
# It is in the PATH
|
||||
describe command("which ipfs") do
|
||||
its(:exit_status) { should eq 0 }
|
||||
|
@ -22,5 +21,4 @@ describe "IPFS" do
|
|||
expect(service("ipfs")).to be_running
|
||||
expect(service("ipfs")).to be_enabled
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -59,7 +59,7 @@ application hal8000_path do
|
|||
"hubot-seen",
|
||||
"hubot-rss-reader",
|
||||
"hubot-incoming-webhook",
|
||||
"hubot-auth"
|
||||
"hubot-auth",
|
||||
].to_json
|
||||
end
|
||||
|
||||
|
@ -78,32 +78,32 @@ application hal8000_path do
|
|||
group 'root'
|
||||
mode '0644'
|
||||
variables(
|
||||
:user => "hubot",
|
||||
:group => "hubot",
|
||||
:app_dir => hal8000_path,
|
||||
:entry => "#{hal8000_path}/bin/hubot -a irc",
|
||||
:environment => { "HUBOT_IRC_SERVER" => "irc.freenode.net",
|
||||
"HUBOT_IRC_ROOMS" => "#5apps,#kosmos,#kosmos-dev,#remotestorage,#hackerbeach,#unhosted,#sockethub",
|
||||
"HUBOT_IRC_NICK" => "hal8000",
|
||||
"HUBOT_IRC_NICKSERV_USERNAME" => "hal8000",
|
||||
"HUBOT_IRC_NICKSERV_PASSWORD" => hal8000_freenode_data_bag_item['nickserv_password'],
|
||||
"HUBOT_IRC_UNFLOOD" => "100",
|
||||
"HUBOT_RSS_PRINTSUMMARY" => "false",
|
||||
"HUBOT_RSS_IRCCOLORS" => "true",
|
||||
# "HUBOT_LOG_LEVEL" => "error",
|
||||
"EXPRESS_PORT" => "8080",
|
||||
"HUBOT_RSS_HEADER" => "Update:",
|
||||
"HUBOT_AUTH_ADMIN" => "bkero,derbumi,galfert,gregkare,jaaan,slvrbckt,raucao",
|
||||
"OA_ASSET_FROM_ADDRESS" => "akRWZJMETdM2U5UGKadKhv1PAj2npoGja1m",
|
||||
"OA_DEFAULT_QUANTITY" => "100",
|
||||
"OA_ASSET_ID" => "AbDn6L2AUGnDreUuNkGFEqcxnsoUP4HCjm",
|
||||
"OA_SERVER_URL" => "http://localhost:4562",
|
||||
"OA_SERVER_USERNAME" => "kosmos",
|
||||
"OA_SERVER_PASSWORD" => "asEjdak1yqw",
|
||||
"OA_MAX_QUANTITY" => "5000",
|
||||
"OA_BOT_KEYWORD" => "kredits",
|
||||
"OA_PLUSPLUS_ROOMS" => "#kosmos",
|
||||
"WEBHOOK_TOKEN" => hal8000_freenode_data_bag_item['webhook_token'] }
|
||||
user: "hubot",
|
||||
group: "hubot",
|
||||
app_dir: hal8000_path,
|
||||
entry: "#{hal8000_path}/bin/hubot -a irc",
|
||||
environment: { "HUBOT_IRC_SERVER" => "irc.freenode.net",
|
||||
"HUBOT_IRC_ROOMS" => "#5apps,#kosmos,#kosmos-dev,#remotestorage,#hackerbeach,#unhosted,#sockethub",
|
||||
"HUBOT_IRC_NICK" => "hal8000",
|
||||
"HUBOT_IRC_NICKSERV_USERNAME" => "hal8000",
|
||||
"HUBOT_IRC_NICKSERV_PASSWORD" => hal8000_freenode_data_bag_item['nickserv_password'],
|
||||
"HUBOT_IRC_UNFLOOD" => "100",
|
||||
"HUBOT_RSS_PRINTSUMMARY" => "false",
|
||||
"HUBOT_RSS_IRCCOLORS" => "true",
|
||||
# "HUBOT_LOG_LEVEL" => "error",
|
||||
"EXPRESS_PORT" => "8080",
|
||||
"HUBOT_RSS_HEADER" => "Update:",
|
||||
"HUBOT_AUTH_ADMIN" => "bkero,derbumi,galfert,gregkare,jaaan,slvrbckt,raucao",
|
||||
"OA_ASSET_FROM_ADDRESS" => "akRWZJMETdM2U5UGKadKhv1PAj2npoGja1m",
|
||||
"OA_DEFAULT_QUANTITY" => "100",
|
||||
"OA_ASSET_ID" => "AbDn6L2AUGnDreUuNkGFEqcxnsoUP4HCjm",
|
||||
"OA_SERVER_URL" => "http://localhost:4562",
|
||||
"OA_SERVER_USERNAME" => "kosmos",
|
||||
"OA_SERVER_PASSWORD" => "asEjdak1yqw",
|
||||
"OA_MAX_QUANTITY" => "5000",
|
||||
"OA_BOT_KEYWORD" => "kredits",
|
||||
"OA_PLUSPLUS_ROOMS" => "#kosmos",
|
||||
"WEBHOOK_TOKEN" => hal8000_freenode_data_bag_item['webhook_token'] }
|
||||
)
|
||||
notifies :run, "execute[systemctl daemon-reload]", :delayed
|
||||
notifies :restart, "service[hal8000_nodejs]", :delayed
|
||||
|
@ -134,7 +134,7 @@ application botka_freenode_path do
|
|||
group "hubot"
|
||||
content [
|
||||
"hubot-help",
|
||||
"hubot-remotestorage-logger"
|
||||
"hubot-remotestorage-logger",
|
||||
].to_json
|
||||
end
|
||||
|
||||
|
@ -153,25 +153,25 @@ application botka_freenode_path do
|
|||
group 'root'
|
||||
mode '0644'
|
||||
variables(
|
||||
:user => "hubot",
|
||||
:group => "hubot",
|
||||
:app_dir => botka_freenode_path,
|
||||
:entry => "#{botka_freenode_path}/bin/hubot -a irc",
|
||||
:environment => { "HUBOT_IRC_SERVER" => "irc.freenode.net",
|
||||
"HUBOT_IRC_ROOMS" => "#5apps,#kosmos,#kosmos-dev,#remotestorage,#hackerbeach,#unhosted,#sockethub,#opensourcedesign,#openknot,#emberjs,#mastodon,#indieweb",
|
||||
"HUBOT_IRC_NICK" => "botka",
|
||||
"HUBOT_IRC_NICKSERV_USERNAME" => "botka",
|
||||
"HUBOT_IRC_NICKSERV_PASSWORD" => botka_freenode_data_bag_item['nickserv_password'],
|
||||
"HUBOT_IRC_UNFLOOD" => "100",
|
||||
"HUBOT_RSS_PRINTSUMMARY" => "false",
|
||||
"HUBOT_RSS_IRCCOLORS" => "true",
|
||||
# "HUBOT_LOG_LEVEL" => "error",
|
||||
"EXPRESS_PORT" => "8082",
|
||||
"HUBOT_AUTH_ADMIN" => "bkero,derbumi,galfert,gregkare,jaaan,slvrbckt,raucao",
|
||||
"RS_LOGGER_USER" => "kosmos@5apps.com",
|
||||
"RS_LOGGER_TOKEN" => botka_freenode_data_bag_item['rs_logger_token'],
|
||||
"RS_LOGGER_SERVER_NAME" => "freenode",
|
||||
"RS_LOGGER_PUBLIC" => "true" }
|
||||
user: "hubot",
|
||||
group: "hubot",
|
||||
app_dir: botka_freenode_path,
|
||||
entry: "#{botka_freenode_path}/bin/hubot -a irc",
|
||||
environment: { "HUBOT_IRC_SERVER" => "irc.freenode.net",
|
||||
"HUBOT_IRC_ROOMS" => "#5apps,#kosmos,#kosmos-dev,#remotestorage,#hackerbeach,#unhosted,#sockethub,#opensourcedesign,#openknot,#emberjs,#mastodon,#indieweb",
|
||||
"HUBOT_IRC_NICK" => "botka",
|
||||
"HUBOT_IRC_NICKSERV_USERNAME" => "botka",
|
||||
"HUBOT_IRC_NICKSERV_PASSWORD" => botka_freenode_data_bag_item['nickserv_password'],
|
||||
"HUBOT_IRC_UNFLOOD" => "100",
|
||||
"HUBOT_RSS_PRINTSUMMARY" => "false",
|
||||
"HUBOT_RSS_IRCCOLORS" => "true",
|
||||
# "HUBOT_LOG_LEVEL" => "error",
|
||||
"EXPRESS_PORT" => "8082",
|
||||
"HUBOT_AUTH_ADMIN" => "bkero,derbumi,galfert,gregkare,jaaan,slvrbckt,raucao",
|
||||
"RS_LOGGER_USER" => "kosmos@5apps.com",
|
||||
"RS_LOGGER_TOKEN" => botka_freenode_data_bag_item['rs_logger_token'],
|
||||
"RS_LOGGER_SERVER_NAME" => "freenode",
|
||||
"RS_LOGGER_PUBLIC" => "true" }
|
||||
)
|
||||
notifies :run, "execute[systemctl daemon-reload]", :delayed
|
||||
notifies :restart, "service[botka_freenode_nodejs]", :delayed
|
||||
|
|
|
@ -54,7 +54,7 @@ unless node.chef_environment == "development"
|
|||
cwd "/usr/local/certbot"
|
||||
only_if do
|
||||
File.exist?("#{node['nginx']['dir']}/sites-enabled/ipfs.kosmos.org") &&
|
||||
! File.exist?("/etc/letsencrypt/live/ipfs.kosmos.org/fullchain.pem")
|
||||
!File.exist?("/etc/letsencrypt/live/ipfs.kosmos.org/fullchain.pem")
|
||||
end
|
||||
notifies :create, "template[#{node['nginx']['dir']}/sites-available/ipfs.kosmos.org]", :delayed
|
||||
end
|
||||
|
|
|
@ -19,10 +19,10 @@ end
|
|||
|
||||
postgresql_database 'mastodon' do
|
||||
connection(
|
||||
:host => '127.0.0.1',
|
||||
:port => 5432,
|
||||
:username => 'postgres',
|
||||
:password => node['postgresql']['password']['postgres']
|
||||
host: '127.0.0.1',
|
||||
port: 5432,
|
||||
username: 'postgres',
|
||||
password: node['postgresql']['password']['postgres']
|
||||
)
|
||||
action :create
|
||||
end
|
||||
|
@ -70,7 +70,7 @@ application mastodon_path do
|
|||
otp_secret: mastodon_credentials['otp_secret'],
|
||||
smtp_login: mastodon_credentials['smtp_user_name'],
|
||||
smtp_password: mastodon_credentials['smtp_password'],
|
||||
smtp_from_address: "mail@#{node["kosmos-mastodon"]["server_name"]}",
|
||||
smtp_from_address: "mail@#{node['kosmos-mastodon']['server_name']}",
|
||||
s3_bucket: "kosmos-social",
|
||||
aws_access_key_id: mastodon_credentials['aws_access_key_id'],
|
||||
aws_secret_access_key: mastodon_credentials['aws_secret_access_key'],
|
||||
|
@ -91,7 +91,7 @@ application mastodon_path do
|
|||
bundle_install do
|
||||
user "mastodon"
|
||||
deployment true
|
||||
without %w{development test}
|
||||
without %w(development test)
|
||||
end
|
||||
|
||||
npm_install do
|
||||
|
|
|
@ -42,7 +42,6 @@ unless node.chef_environment == "development"
|
|||
command "./certbot-auto certonly --webroot --agree-tos --email ops@5apps.com --webroot-path /var/www/mastodon -d #{server_name} -n"
|
||||
cwd "/usr/local/certbot"
|
||||
not_if { File.exist? "/etc/letsencrypt/live/#{server_name}/fullchain.pem" }
|
||||
notifies :reload, "service[nginx]", :delayed
|
||||
notifies :create, "template[#{node['nginx']['dir']}/sites-available/mastodon]", :immediately
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ include_recipe 'ark'
|
|||
#
|
||||
# sudo su - /var/www/mediawiki-1.xx.y/maintenance/update.php
|
||||
node.override['mediawiki']['version'] = "1.28.0"
|
||||
node.override['mediawiki']['webdir'] = "#{node["mediawiki"]["docroot_dir"]}/mediawiki-#{node['mediawiki']['version']}"
|
||||
node.override['mediawiki']['webdir'] = "#{node['mediawiki']['docroot_dir']}/mediawiki-#{node['mediawiki']['version']}"
|
||||
node.override['mediawiki']['tarball']['name'] = "mediawiki-#{node['mediawiki']['version']}.tar.gz"
|
||||
node.override['mediawiki']['tarball']['url'] = "https://releases.wikimedia.org/mediawiki/1.28/#{node['mediawiki']['tarball']['name']}"
|
||||
node.override['mediawiki']['language_code'] = 'en'
|
||||
|
@ -53,7 +53,7 @@ include_recipe "mediawiki::nginx"
|
|||
include_recipe "kosmos-base::letsencrypt"
|
||||
|
||||
execute "letsencrypt cert for wiki.kosmos.org" do
|
||||
command "./certbot-auto certonly --webroot --agree-tos --email ops@5apps.com --webroot-path #{node["mediawiki"]["docroot_dir"]} -d wiki.kosmos.org -n"
|
||||
command "./certbot-auto certonly --webroot --agree-tos --email ops@5apps.com --webroot-path #{node['mediawiki']['docroot_dir']} -d wiki.kosmos.org -n"
|
||||
cwd "/usr/local/certbot"
|
||||
not_if { File.exist? "/etc/letsencrypt/live/wiki.kosmos.org/fullchain.pem" }
|
||||
notifies :reload, "service[nginx]", :delayed
|
||||
|
@ -112,7 +112,7 @@ end
|
|||
ruby_block "configuration" do
|
||||
block do
|
||||
file = Chef::Util::FileEdit.new("#{node['mediawiki']['webdir']}/LocalSettings.php")
|
||||
file.search_file_replace_line(/\$wgLogo\ =\ \"\$wgResourceBasePath\/resources\/assets\/wiki.png\";/,
|
||||
file.search_file_replace_line(%r{\$wgLogo\ =\ \"\$wgResourceBasePath\/resources\/assets\/wiki.png\";},
|
||||
"$wgLogo = \"$wgResourceBasePath/skins/common/images/kosmos.png\";")
|
||||
file.insert_line_if_no_match(/# Our config/,
|
||||
<<-EOF
|
||||
|
|
|
@ -13,30 +13,30 @@ include_recipe "php-fpm::configure"
|
|||
include_recipe 'php-fpm::repository' unless node['php-fpm']['skip_repository_install']
|
||||
include_recipe "kosmos-base::letsencrypt"
|
||||
|
||||
if node['php-fpm']['package_name'].nil?
|
||||
if platform_family?("rhel")
|
||||
php_fpm_package_name = "php-fpm"
|
||||
else
|
||||
php_fpm_package_name = "php5-fpm"
|
||||
end
|
||||
else
|
||||
php_fpm_package_name = node['php-fpm']['package_name']
|
||||
end
|
||||
php_fpm_package_name = if node['php-fpm']['package_name'].nil?
|
||||
if platform_family?("rhel")
|
||||
"php-fpm"
|
||||
else
|
||||
"php5-fpm"
|
||||
end
|
||||
else
|
||||
node['php-fpm']['package_name']
|
||||
end
|
||||
|
||||
package php_fpm_package_name do
|
||||
action :upgrade
|
||||
end
|
||||
|
||||
if node['php-fpm']['service_name'].nil?
|
||||
php_fpm_service_name = php_fpm_package_name
|
||||
else
|
||||
php_fpm_service_name = node['php-fpm']['service_name']
|
||||
end
|
||||
php_fpm_service_name = if node['php-fpm']['service_name'].nil?
|
||||
php_fpm_package_name
|
||||
else
|
||||
node['php-fpm']['service_name']
|
||||
end
|
||||
|
||||
service "php-fpm" do
|
||||
service_name php_fpm_service_name
|
||||
supports :start => true, :stop => true, :restart => true, :reload => true
|
||||
action [ :enable, :start ]
|
||||
supports start: true, stop: true, restart: true, reload: true
|
||||
action [:enable, :start]
|
||||
end
|
||||
|
||||
php_fpm_pool "www" do
|
||||
|
@ -47,7 +47,7 @@ php_fpm_pool "wordpress" do
|
|||
listen "127.0.0.1:9001"
|
||||
user node['wordpress']['install']['user']
|
||||
group node['wordpress']['install']['group']
|
||||
if node['platform'] == 'ubuntu' and node['platform_version'] == '10.04'
|
||||
if node['platform'] == 'ubuntu' && node['platform_version'] == '10.04'
|
||||
process_manager 'dynamic'
|
||||
end
|
||||
listen_owner node['wordpress']['install']['user']
|
||||
|
|
|
@ -49,13 +49,12 @@ application path_to_deploy do
|
|||
group 'root'
|
||||
mode '0644'
|
||||
variables(
|
||||
:user => "sockethub",
|
||||
:group => "sockethub",
|
||||
:app_dir => path_to_deploy,
|
||||
:entry => "/usr/local/bin/node /usr/local/bin/npm start",
|
||||
:environment => { 'DEBUG' => '*',
|
||||
'PORT' => node['sockethub']['port'] }
|
||||
|
||||
user: "sockethub",
|
||||
group: "sockethub",
|
||||
app_dir: path_to_deploy,
|
||||
entry: "/usr/local/bin/node /usr/local/bin/npm start",
|
||||
environment: { 'DEBUG' => '*',
|
||||
'PORT' => node['sockethub']['port'] }
|
||||
)
|
||||
notifies :run, "execute[systemctl daemon-reload]", :delayed
|
||||
notifies :restart, "service[sockethub_nodejs]", :delayed
|
||||
|
|
Loading…
Reference in New Issue