summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--provider_base/common.json35
-rw-r--r--provider_base/provider.json7
-rw-r--r--provider_base/services/webapp.json4
-rw-r--r--puppet/modules/leap_mx/manifests/init.pp15
-rw-r--r--puppet/modules/site_apt/manifests/init.pp10
-rw-r--r--puppet/modules/site_nickserver/manifests/init.pp9
-rw-r--r--puppet/modules/site_webapp/manifests/init.pp7
-rw-r--r--puppet/modules/soledad/manifests/server.pp6
-rw-r--r--puppet/modules/tapicero/manifests/init.pp8
9 files changed, 62 insertions, 39 deletions
diff --git a/provider_base/common.json b/provider_base/common.json
index cc4d2557..95ffa8d2 100644
--- a/provider_base/common.json
+++ b/provider_base/common.json
@@ -51,11 +51,36 @@
"version": "= Leap::Platform.version.to_s",
"major_version": "= Leap::Platform.major_version"
},
- "apt": {
- "url": {
- "basic": "= provider.apt.url.basic",
- "security": "= provider.apt.url.security",
- "backports": "= provider.apt.url.backports"
+ "sources": {
+ "apt": {
+ "basic": "http://http.debian.net/debian/",
+ "security": "http://security.debian.org/",
+ "backports": "http://http.debian.net/debian/"
+ },
+ "leap-mx": {
+ "type": "apt",
+ "package": "leap-mx",
+ "revision": "latest"
+ },
+ "nickserver": {
+ "type": "git",
+ "source": "https://leap.se/git/nickserver",
+ "revision": "origin/master"
+ },
+ "soledad": {
+ "type": "apt",
+ "package": "soledad-server",
+ "revision": "latest"
+ },
+ "tapicero": {
+ "type": "git",
+ "source": "https://leap.se/git/tapicero",
+ "revision": "origin/version/0.6"
+ },
+ "webapp": {
+ "type": "git",
+ "source": "https://leap.se/git/leap_web",
+ "revision": "origin/version/0.6"
}
}
}
diff --git a/provider_base/provider.json b/provider_base/provider.json
index a60411b1..f8d2715f 100644
--- a/provider_base/provider.json
+++ b/provider_base/provider.json
@@ -59,12 +59,5 @@
"client_version": {
"min": "0.5",
"max": null
- },
- "apt": {
- "url": {
- "basic": "http://http.debian.net/debian/",
- "security": "http://security.debian.org/",
- "backports": "http://http.debian.net/debian/"
- }
}
}
diff --git a/provider_base/services/webapp.json b/provider_base/services/webapp.json
index 67744f99..e80a758a 100644
--- a/provider_base/services/webapp.json
+++ b/provider_base/services/webapp.json
@@ -20,10 +20,6 @@
"secret_token": "= secret :webapp_secret_token",
"api_version": 1,
"secure": false,
- "git": {
- "source": "https://leap.se/git/leap_web",
- "revision": "origin/version/0.6"
- },
"client_version": "= provider.client_version",
"nagios_test_user": {
"username": "nagios_test",
diff --git a/puppet/modules/leap_mx/manifests/init.pp b/puppet/modules/leap_mx/manifests/init.pp
index c2cc96c6..d8a24821 100644
--- a/puppet/modules/leap_mx/manifests/init.pp
+++ b/puppet/modules/leap_mx/manifests/init.pp
@@ -7,10 +7,12 @@ class leap_mx {
$couchdb_host = 'localhost'
$couchdb_port = '4096'
+ $sources = hiera('sources')
+
include soledad::common
include site_apt::preferences::twisted
include leap_mx::syslog
-
+
#
# USER AND GROUP
#
@@ -45,11 +47,12 @@ class leap_mx {
#
package {
- 'leap-mx':
- ensure => latest,
- require => Class['site_apt::preferences::twisted'];
-
- [ 'leap-keymanager' ]:
+ $sources['leap-mx']['package']:
+ ensure => $sources['leap-mx']['revision'],
+ require => [
+ Class['site_apt::preferences::twisted'],
+ Class['site_apt::leap_repo'] ];
+ 'leap-keymanager':
ensure => latest;
}
diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp
index 506591dc..c32c29c4 100644
--- a/puppet/modules/site_apt/manifests/init.pp
+++ b/puppet/modules/site_apt/manifests/init.pp
@@ -1,10 +1,10 @@
class site_apt {
- $apt_config = hiera('apt')
- $apt_url = $apt_config['url']
- $apt_url_basic = $apt_url['basic']
- $apt_url_security = $apt_url['security']
- $apt_url_backports = $apt_url['backports']
+ $sources = hiera('sources')
+ $apt_config = $sources['apt']
+ $apt_url_basic = $apt_config['basic']
+ $apt_url_security = $apt_config['security']
+ $apt_url_backports = $apt_config['backports']
class { 'apt':
custom_key_dir => 'puppet:///modules/site_apt/keys',
diff --git a/puppet/modules/site_nickserver/manifests/init.pp b/puppet/modules/site_nickserver/manifests/init.pp
index eaf90d55..c2deab0f 100644
--- a/puppet/modules/site_nickserver/manifests/init.pp
+++ b/puppet/modules/site_nickserver/manifests/init.pp
@@ -34,11 +34,12 @@ class site_nickserver {
# See site_webapp/templates/haproxy_couchdb.cfg.erg
$couchdb_port = '4096'
+ $sources = hiera('sources')
+
# temporarily for now:
$domain = hiera('domain')
$address_domain = $domain['full_suffix']
-
include site_config::x509::cert
include site_config::x509::key
include site_config::x509::ca
@@ -69,9 +70,9 @@ class site_nickserver {
vcsrepo { '/srv/leap/nickserver':
ensure => present,
- revision => 'origin/master',
- provider => git,
- source => 'https://leap.se/git/nickserver',
+ revision => $sources['nickserver']['revision'],
+ provider => $sources['nickserver']['type'],
+ source => $sources['nickserver']['source'],
owner => 'nickserver',
group => 'nickserver',
require => [ User['nickserver'], Group['nickserver'] ],
diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp
index 9f97d2c5..ea64048b 100644
--- a/puppet/modules/site_webapp/manifests/init.pp
+++ b/puppet/modules/site_webapp/manifests/init.pp
@@ -11,6 +11,7 @@ class site_webapp {
$api_version = $webapp['api_version']
$secret_token = $webapp['secret_token']
$tor = hiera('tor', false)
+ $sources = hiera('sources')
Class['site_config::default'] -> Class['site_webapp']
@@ -43,9 +44,9 @@ class site_webapp {
vcsrepo { '/srv/leap/webapp':
ensure => present,
force => true,
- revision => $webapp['git']['revision'],
- provider => git,
- source => $webapp['git']['source'],
+ revision => $sources['webapp']['revision'],
+ provider => $sources['webapp']['type'],
+ source => $sources['webapp']['source'],
owner => 'leap-webapp',
group => 'leap-webapp',
require => [ User['leap-webapp'], Group['leap-webapp'] ],
diff --git a/puppet/modules/soledad/manifests/server.pp b/puppet/modules/soledad/manifests/server.pp
index 394e6032..b71fab69 100644
--- a/puppet/modules/soledad/manifests/server.pp
+++ b/puppet/modules/soledad/manifests/server.pp
@@ -12,6 +12,8 @@ class soledad::server {
$soledad_port = $soledad['port']
+ $sources = hiera('sources')
+
include site_config::x509::cert
include site_config::x509::key
include site_config::x509::ca
@@ -29,8 +31,8 @@ class soledad::server {
require => Class['soledad'];
}
- package { 'soledad-server':
- ensure => latest,
+ package { $sources['soledad']['package']:
+ ensure => $sources['soledad']['revision'],
require => [
Class['site_apt::preferences::twisted'],
Class['site_apt::leap_repo'] ];
diff --git a/puppet/modules/tapicero/manifests/init.pp b/puppet/modules/tapicero/manifests/init.pp
index 28711b94..8afb18b8 100644
--- a/puppet/modules/tapicero/manifests/init.pp
+++ b/puppet/modules/tapicero/manifests/init.pp
@@ -15,6 +15,8 @@ class tapicero {
$couchdb_mode = $couchdb['mode']
$couchdb_replication = $couchdb['replication']
+ $sources = hiera('sources')
+
Class['site_config::default'] -> Class['tapicero']
include site_config::ruby::dev
@@ -95,9 +97,9 @@ class tapicero {
vcsrepo { '/srv/leap/tapicero':
ensure => present,
force => true,
- revision => 'origin/version/0.6',
- provider => git,
- source => 'https://leap.se/git/tapicero',
+ revision => $sources['tapicero']['revision'],
+ provider => $sources['tapicero']['type'],
+ source => $sources['tapicero']['source'],
owner => 'tapicero',
group => 'tapicero',
require => [ User['tapicero'], Group['tapicero'] ],