From 5bafe7947a20b1d6208577ad6151053701243382 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 14 Nov 2012 23:08:59 -0800 Subject: inherit .json from leap_platform/provider_base --- test/leap_platform/provider_base/common.json | 25 ++++++++++++++++++++ test/leap_platform/provider_base/provider.json | 27 ++++++++++++++++++++++ test/leap_platform/provider_base/services/ca.json | 6 +++++ .../provider_base/services/couchdb.json | 22 ++++++++++++++++++ .../provider_base/services/openvpn.json | 18 +++++++++++++++ .../provider_base/services/webapp.json | 21 +++++++++++++++++ test/leap_platform/provider_templates/common.json | 0 test/leap_platform/provider_templates/node.json | 0 .../leap_platform/provider_templates/provider.json | 0 test/leap_platform/puppet/BLAH | 0 10 files changed, 119 insertions(+) create mode 100644 test/leap_platform/provider_base/common.json create mode 100644 test/leap_platform/provider_base/provider.json create mode 100644 test/leap_platform/provider_base/services/ca.json create mode 100644 test/leap_platform/provider_base/services/couchdb.json create mode 100644 test/leap_platform/provider_base/services/openvpn.json create mode 100644 test/leap_platform/provider_base/services/webapp.json create mode 100644 test/leap_platform/provider_templates/common.json create mode 100644 test/leap_platform/provider_templates/node.json create mode 100644 test/leap_platform/provider_templates/provider.json create mode 100644 test/leap_platform/puppet/BLAH (limited to 'test/leap_platform') diff --git a/test/leap_platform/provider_base/common.json b/test/leap_platform/provider_base/common.json new file mode 100644 index 0000000..f355780 --- /dev/null +++ b/test/leap_platform/provider_base/common.json @@ -0,0 +1,25 @@ +{ + "ip_address": "REQUIRED", + "services": [], + "domain": { + "full_suffix": "= global.provider.domain", + "internal_suffix": "= global.provider.internal_domain", + "full": "= node.name + '.' + domain.full_suffix", + "internal": "= node.name + '.' + domain.internal_suffix", + "name": "= node.name + '.' + (dns.public ? domain.full_suffix : domain.internal_suffix)" + }, + "dns": { + "public": "= service_type != 'internal_service'" + }, + "ssh": { + "authorized_keys": "= file :authorized_keys", + "known_hosts": "= file :known_hosts", + "port": 22 + }, + "x509": { + "use": false, + "cert": "= x509.use ? file(:node_x509_cert, :missing => 'x509 certificate for node $node. Run `leap update-cert`') : nil", + "key": "= x509.use ? file(:node_x509_key, :missing => 'x509 key for node $node. Run `leap update-cert`') : nil" + }, + "local": "= self.vagrant?" +} diff --git a/test/leap_platform/provider_base/provider.json b/test/leap_platform/provider_base/provider.json new file mode 100644 index 0000000..a144d04 --- /dev/null +++ b/test/leap_platform/provider_base/provider.json @@ -0,0 +1,27 @@ +{ + "domain": "REQUIRED", + "internal_domain": "= domain.sub(/\\..*$/,'.i')", + "name": { + "en": "REQUIRED" + }, + "description": { + "en": "REQUIRED" + }, + "languages": ["en"], + "default_language": "en", + "enrollment_policy": "open", + "ca": { + "name": "= global.provider.ca.organization + ' Root CA'", + "organization": "= global.provider.name[global.provider.default_language]", + "organizational_unit": "= 'https://' + global.common.domain.full_suffix", + "bit_size": 4096, + "life_span": "10y", + "server_certificates": { + "bit_size": 3248, + "life_span": "1y" + } + }, + "vagrant":{ + "network":"10.5.5.0/24" + } +} \ No newline at end of file diff --git a/test/leap_platform/provider_base/services/ca.json b/test/leap_platform/provider_base/services/ca.json new file mode 100644 index 0000000..68f970f --- /dev/null +++ b/test/leap_platform/provider_base/services/ca.json @@ -0,0 +1,6 @@ +{ + "service_type": "internal_service", + "x509": { + "use": true + } +} diff --git a/test/leap_platform/provider_base/services/couchdb.json b/test/leap_platform/provider_base/services/couchdb.json new file mode 100644 index 0000000..1c8005c --- /dev/null +++ b/test/leap_platform/provider_base/services/couchdb.json @@ -0,0 +1,22 @@ +{ + "service_type": "internal_service", + "x509": { + "use": true + }, + "couch": { + "users": { + "admin": { + "username": "admin", + "password": "= secret :couch_admin_password" + }, + "webapp": { + "username": "webapp", + "password": "= secret :couch_webapp_password" + }, + "ca_daemon": { + "username": "ca_daemon", + "password": "= secret :couch_ca_daemon_password" + } + } + } +} diff --git a/test/leap_platform/provider_base/services/openvpn.json b/test/leap_platform/provider_base/services/openvpn.json new file mode 100644 index 0000000..0a6b2c4 --- /dev/null +++ b/test/leap_platform/provider_base/services/openvpn.json @@ -0,0 +1,18 @@ +# +# "server_crt": "= file :node_x509_cert", +# "server_key": "= file :node_x509_key" +# +{ + "service_type": "user_service", + "x509": { + "use": true + }, + "openvpn": { + "ports": ["80", "443", "53", "1194"], + "filter_dns": false, + "nat": true, + "ca_crt": "= file :ca_cert", + "ca_key": "= file :ca_key", + "dh": "= file :dh_params" + } +} diff --git a/test/leap_platform/provider_base/services/webapp.json b/test/leap_platform/provider_base/services/webapp.json new file mode 100644 index 0000000..cf023a9 --- /dev/null +++ b/test/leap_platform/provider_base/services/webapp.json @@ -0,0 +1,21 @@ +{ + "service_type": "public_service", + "x509": { + "use": true, + "commercial_cert": "= try_file [:commercial_cert, global.provider.domain]", + "commercial_key": "= try_file [:commercial_key, global.provider.domain]" + }, + "api_domain": "= 'api.' + domain.full_suffix", + "dns": { + "aliases": "= [domain.full, api_domain]" + }, + "webapp": { + "modules": ["user", "billing", "help"], + "couchdb_hosts": "= nodes[:services => :couchdb].field('domain.name')", + "couchdb_user": "= global.services[:couchdb].couch.users[:webapp]" + }, + "definition_files": { + "provider": "= file('service-definitions/provider.json.erb')", + "eip_service": "file('service-definitions/eip-service.json.erb')" + } +} \ No newline at end of file diff --git a/test/leap_platform/provider_templates/common.json b/test/leap_platform/provider_templates/common.json new file mode 100644 index 0000000..e69de29 diff --git a/test/leap_platform/provider_templates/node.json b/test/leap_platform/provider_templates/node.json new file mode 100644 index 0000000..e69de29 diff --git a/test/leap_platform/provider_templates/provider.json b/test/leap_platform/provider_templates/provider.json new file mode 100644 index 0000000..e69de29 diff --git a/test/leap_platform/puppet/BLAH b/test/leap_platform/puppet/BLAH new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3