summaryrefslogtreecommitdiff
path: root/global/overlay/etc
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2015-02-24 11:19:10 +0100
committerLeif Johansson <leifj@sunet.se>2015-02-24 11:19:10 +0100
commite2cc0bc80fa8cfab7fecb04677a45a4f51cb561e (patch)
tree09d540d53a1d9fa49fea52d4b1339d7a51846ac4 /global/overlay/etc
parentc3415f304e2f11bdbf153bdb8e810e89311fc7a4 (diff)
parent7863ad617033064d6b5758d3d1f4bba32b9cc5dd (diff)
merge multiversesunet-ops-2015-02-24-v01
Diffstat (limited to 'global/overlay/etc')
-rwxr-xr-xglobal/overlay/etc/cosmos/apt/bootstrap-cosmos.sh42
-rw-r--r--global/overlay/etc/cosmos/apt/cosmos_1.2-2_all.debbin0 -> 11724 bytes
-rw-r--r--global/overlay/etc/cron.d/cosmos2
-rw-r--r--global/overlay/etc/logrotate.d/docker-containers7
-rw-r--r--global/overlay/etc/puppet/cosmos-modules.conf7
-rw-r--r--global/overlay/etc/puppet/hiera.yaml1
-rw-r--r--global/overlay/etc/puppet/puppet.conf6
7 files changed, 52 insertions, 13 deletions
diff --git a/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh b/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh
new file mode 100755
index 0000000..28cbde0
--- /dev/null
+++ b/global/overlay/etc/cosmos/apt/bootstrap-cosmos.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e
+
+cmd_hostname="$1"
+if test -z "$cmd_hostname"; then
+ echo "Usage: $0 HOSTNAME REPO TAGPATTERN"
+ exit 1
+fi
+
+cmd_repo="$2"
+if test -z "$cmd_repo"; then
+ echo "Usage $0 HOSTNAME REPO TAGPATTERN"
+ exit 2
+fi
+
+cmd_tags="$3"
+if test -z "$cmd_tags"; then
+ echo "Usage $0 HOSTNAME REPO TAGPATTERN"
+ exit 3
+fi
+
+set -x
+
+apt-get -y install rsync git-core wget
+dpkg -i cosmos_1.2-2_all.deb
+
+if ! test -d /var/cache/cosmos/repo; then
+ cosmos clone "$cmd_repo"
+fi
+
+hostname $cmd_hostname
+
+perl -pi -e "s,#COSMOS_REPO_MODELS=.*,COSMOS_REPO_MODELS=\"\\\$COSMOS_REPO/global/:\\\$COSMOS_REPO/$cmd_hostname/\"," /etc/cosmos/cosmos.conf
+perl -pi -e "s,#COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN=.*,COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN=\"${cmd_tags}*\"," /etc/cosmos/cosmos.conf
+
+env COSMOS_BASE=/var/cache/cosmos COSMOS_KEYS=/var/cache/cosmos/repo/global/overlay/etc/cosmos/keys /var/cache/cosmos/repo/global/post-tasks.d/015cosmos-trust
+
+(date; nohup cosmos -v update && nohup cosmos -v apply; date) 2>&1 | tee /var/log/cosmos.log
+
+
+exit 0
diff --git a/global/overlay/etc/cosmos/apt/cosmos_1.2-2_all.deb b/global/overlay/etc/cosmos/apt/cosmos_1.2-2_all.deb
new file mode 100644
index 0000000..9fe4434
--- /dev/null
+++ b/global/overlay/etc/cosmos/apt/cosmos_1.2-2_all.deb
Binary files differ
diff --git a/global/overlay/etc/cron.d/cosmos b/global/overlay/etc/cron.d/cosmos
index 58b45af..2aadd2e 100644
--- a/global/overlay/etc/cron.d/cosmos
+++ b/global/overlay/etc/cron.d/cosmos
@@ -1,4 +1,4 @@
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-*/15 * * * * root test -f /etc/no-automatic-cosmos || scriptherder --mode wrap --syslog --name cosmos -- /usr/local/bin/run-cosmos -v
+*/15 * * * * root test -f /etc/no-automatic-cosmos || scriptherder --mode wrap --syslog --name cosmos -- /usr/local/bin/run-cosmos
diff --git a/global/overlay/etc/logrotate.d/docker-containers b/global/overlay/etc/logrotate.d/docker-containers
new file mode 100644
index 0000000..e9c90b8
--- /dev/null
+++ b/global/overlay/etc/logrotate.d/docker-containers
@@ -0,0 +1,7 @@
+/var/lib/docker/containers/*/*.log {
+ rotate 7
+ daily
+ compress
+ delaycompress
+ copytruncate
+}
diff --git a/global/overlay/etc/puppet/cosmos-modules.conf b/global/overlay/etc/puppet/cosmos-modules.conf
index d3d00d5..80c0216 100644
--- a/global/overlay/etc/puppet/cosmos-modules.conf
+++ b/global/overlay/etc/puppet/cosmos-modules.conf
@@ -1,4 +1,3 @@
-#
# name source (puppetlabs fq name or git url) upgrade (yes/no)
#
concat git://github.com/SUNET/puppetlabs-concat.git yes sunet-*
@@ -8,17 +7,11 @@ ufw git://github.com/SUNET/puppet-module-ufw.git yes sunet-*
apt git://github.com/SUNET/puppetlabs-apt.git no sunet-*
vcsrepo git://github.com/SUNET/puppetlabs-vcsrepo.git no sunet-*
xinetd git://github.com/SUNET/puppetlabs-xinetd.git no sunet-*
-#golang elithrar/golang yes
python git://github.com/SUNET/puppet-python.git yes sunet-*
hiera-gpg git://github.com/SUNET/hiera-gpg.git no sunet-*
-#epel git://github.com/SUNET/puppet-module-epel.git yes sunet-*
-#erlang git://github.com/SUNET/garethr-erlang.git yes sunet-*
-#rabbitmq git://github.com/SUNET/puppetlabs-rabbitmq.git yes sunet-*
pound git://github.com/SUNET/puppet-pound.git yes sunet-*
augeas git://github.com/SUNET/puppet-augeas.git yes sunet-*
bastion git://github.com/SUNET/puppet-bastion.git yes sunet-*
-#wordpress hunner/wordpress no
-#mysql puppetlabs/mysql no
apache puppetlabs/apache no
pyff git://github.com/samlbits/puppet-pyff.git yes puppet-pyff-*
postgresql git://github.com/SUNET/puppetlabs-postgresql.git yes sunet-*
diff --git a/global/overlay/etc/puppet/hiera.yaml b/global/overlay/etc/puppet/hiera.yaml
index 782fa7f..3663305 100644
--- a/global/overlay/etc/puppet/hiera.yaml
+++ b/global/overlay/etc/puppet/hiera.yaml
@@ -8,6 +8,7 @@
:hierarchy:
- "%{env}/%{location}/%{calling_module}"
- "%{env}/%{calling_module}"
+ - local
- secrets.yaml
- common
diff --git a/global/overlay/etc/puppet/puppet.conf b/global/overlay/etc/puppet/puppet.conf
index 64452eb..ec11255 100644
--- a/global/overlay/etc/puppet/puppet.conf
+++ b/global/overlay/etc/puppet/puppet.conf
@@ -8,11 +8,7 @@ rundir=/var/run/puppet
factpath=/etc/puppet/facter
node_terminus = exec
external_nodes = /etc/puppet/cosmos_enc.py
-# We must add /etc/puppet/cosmos-modules to basemodulepath in order for Puppet to find
-# the hiera-gpg backend. If the backend isn't found - *everything* breaks. Puppet 3.7.1.
-basemodulepath = /etc/puppet/cosmos-modules:/etc/puppet/modules:/usr/share/puppet/modules
-#modulepath = /etc/puppet/cosmos-modules:/etc/puppet/modules:/usr/share/puppet/modules
-#config_version = /etc/puppet/cosmos_config_version
+basemodulepath = /etc/puppet/modules:/etc/puppet/cosmos-modules:/usr/share/puppet/modules
[master]
# These are needed when the puppetmaster is run by passenger