mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
puppet: Move all puppetized config files to the humbug module and reference them with puppet URLs
(imported from commit f0f325bbad381b87c12c6f7888f4dd5d6989f09f)
This commit is contained in:
@@ -21,7 +21,7 @@ if ! [ -e "$amazon_key_file" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
server_private_key_file=$humbug_root/servers/puppet/files/id_rsa
|
||||
server_private_key_file=$humbug_root/servers/puppet/modules/humbug/files/id_rsa
|
||||
if ! [ -e "$server_private_key_file" ]; then
|
||||
echo "You need a server ssh key at $server_private_key_file"
|
||||
exit 1
|
||||
@@ -73,7 +73,7 @@ scp -i "$amazon_key_file" "$humbug_cert_file" root@"$server":/root/humbug/certs/
|
||||
# TODO: Copy the real certs into place for prod servers
|
||||
|
||||
ssh "$server" -t -i "$amazon_key_file" -lroot <<EOF
|
||||
cp -a /root/humbug/servers/puppet/puppet.conf /etc/puppet/
|
||||
cp -a /root/humbug/servers/puppet/modules/humbug/files/puppet.conf /etc/puppet/
|
||||
# HACK: run puppet twice to workaround bug in puppet's dependency
|
||||
# resolution (namely apache module 'ssl' being enabled _after_ the
|
||||
# sites that use it )
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -19,7 +19,7 @@ class humbug::apache {
|
||||
owner => "www-data",
|
||||
group => "www-data",
|
||||
mode => 600,
|
||||
source => "/root/humbug/servers/puppet/files/apache/users",
|
||||
source => "puppet:///modules/humbug/apache/users",
|
||||
}
|
||||
|
||||
file { "/etc/apache2/certs/":
|
||||
@@ -53,7 +53,7 @@ class humbug::apache {
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 640,
|
||||
source => "/root/humbug/servers/puppet/files/apache/ports.conf",
|
||||
source => "puppet:///modules/humbug/apache/ports.conf",
|
||||
}
|
||||
|
||||
file { "/etc/apache2/sites-available/":
|
||||
@@ -62,7 +62,7 @@ class humbug::apache {
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 640,
|
||||
source => "/root/humbug/servers/puppet/files/apache/sites/",
|
||||
source => "puppet:///modules/humbug/apache/sites/",
|
||||
}
|
||||
|
||||
apache2site { 'humbug-default':
|
||||
|
||||
@@ -13,7 +13,7 @@ class humbug::app_frontend {
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 644,
|
||||
source => "/root/humbug/servers/puppet/files/nginx/nginx.conf",
|
||||
source => "puppet:///modules/humbug/nginx/nginx.conf",
|
||||
}
|
||||
file { "/etc/nginx/humbug-include/":
|
||||
require => Package[nginx],
|
||||
@@ -21,7 +21,7 @@ class humbug::app_frontend {
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 644,
|
||||
source => "/root/humbug/servers/puppet/files/nginx/humbug-include/",
|
||||
source => "puppet:///modules/humbug/nginx/humbug-include/",
|
||||
}
|
||||
file { "/etc/nginx/sites-available/humbug":
|
||||
require => Package[nginx],
|
||||
@@ -29,7 +29,7 @@ class humbug::app_frontend {
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 644,
|
||||
source => "/root/humbug/servers/puppet/files/nginx/sites-available/humbug",
|
||||
source => "puppet:///modules/humbug/nginx/sites-available/humbug",
|
||||
}
|
||||
|
||||
exec {"pip6":
|
||||
|
||||
@@ -51,7 +51,7 @@ class humbug::base {
|
||||
mode => 600,
|
||||
owner => "humbug",
|
||||
group => "humbug",
|
||||
source => '/root/humbug/servers/puppet/files/authorized_keys',
|
||||
source => 'puppet:///modules/humbug/authorized_keys',
|
||||
}
|
||||
|
||||
file { '/home/humbug/.ssh':
|
||||
@@ -65,7 +65,7 @@ class humbug::base {
|
||||
file { '/root/.ssh/authorized_keys':
|
||||
ensure => file,
|
||||
mode => 600,
|
||||
source => '/root/humbug/servers/puppet/files/root_authorized_keys',
|
||||
source => 'puppet:///modules/humbug/root_authorized_keys',
|
||||
}
|
||||
|
||||
# This is just an empty file. It's used by the app to test if it's running
|
||||
@@ -73,25 +73,25 @@ class humbug::base {
|
||||
file { '/etc/humbug-server':
|
||||
ensure => file,
|
||||
mode => 644,
|
||||
source => '/root/humbug/servers/puppet/files/humbug-server',
|
||||
source => 'puppet:///modules/humbug/humbug-server',
|
||||
}
|
||||
|
||||
file { '/etc/puppet/puppet.conf':
|
||||
ensure => file,
|
||||
mode => 640,
|
||||
source => '/root/humbug/servers/puppet/puppet.conf',
|
||||
source => 'puppet:///modules/humbug/puppet.conf',
|
||||
}
|
||||
|
||||
file { '/etc/iptables/rules':
|
||||
ensure => file,
|
||||
mode => 600,
|
||||
source => '/root/humbug/servers/puppet/files/iptables/rules',
|
||||
source => 'puppet:///modules/humbug/iptables/rules',
|
||||
}
|
||||
|
||||
file { '/etc/apt/apt.conf.d/02periodic':
|
||||
ensure => file,
|
||||
mode => 644,
|
||||
source => '/root/humbug/servers/puppet/files/apt/apt.conf.d/02periodic',
|
||||
source => 'puppet:///modules/humbug/apt/apt.conf.d/02periodic',
|
||||
}
|
||||
|
||||
file { '/etc/ssh/sshd_config':
|
||||
|
||||
@@ -17,6 +17,6 @@ class humbug::bots {
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 640,
|
||||
source => "/root/humbug/servers/puppet/files/supervisor/conf.d/feedback-bot.conf",
|
||||
source => "puppet:///modules/humbug/supervisor/conf.d/feedback-bot.conf",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class humbug::postgres {
|
||||
owner => "postgres",
|
||||
group => "postgres",
|
||||
mode => 644,
|
||||
source => "/root/humbug/servers/puppet/files/postgresql/postgresql.conf",
|
||||
source => "puppet:///modules/humbug/postgresql/postgresql.conf",
|
||||
}
|
||||
|
||||
file { "/etc/postgresql/9.1/main/pg_hba.conf":
|
||||
@@ -26,7 +26,7 @@ class humbug::postgres {
|
||||
owner => "postgres",
|
||||
group => "postgres",
|
||||
mode => 640,
|
||||
source => "/root/humbug/servers/puppet/files/postgresql/pg_hba.conf",
|
||||
source => "puppet:///modules/humbug/postgresql/pg_hba.conf",
|
||||
}
|
||||
|
||||
common::line { 'shmmax':
|
||||
|
||||
@@ -31,6 +31,6 @@ class humbug::wiki {
|
||||
recurse => true,
|
||||
owner => "wiki",
|
||||
group => "wiki",
|
||||
source => "/root/humbug/servers/puppet/files/wiki",
|
||||
source => "puppet:///modules/humbug/wiki",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,10 @@ from os import path
|
||||
|
||||
exclude_trees = """
|
||||
zephyr/static/third
|
||||
servers/puppet/modules
|
||||
servers/puppet/modules/common
|
||||
servers/puppet/modules/puppet-common
|
||||
servers/puppet/modules/apt
|
||||
servers/puppet/modules/puppet-apt
|
||||
certs
|
||||
""".split()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user