aboutsummaryrefslogtreecommitdiff
path: root/test/leap_platform
diff options
context:
space:
mode:
Diffstat (limited to 'test/leap_platform')
-rw-r--r--test/leap_platform/provider_base/common.json25
-rw-r--r--test/leap_platform/provider_base/provider.json27
-rw-r--r--test/leap_platform/provider_base/services/ca.json6
-rw-r--r--test/leap_platform/provider_base/services/couchdb.json22
-rw-r--r--test/leap_platform/provider_base/services/openvpn.json18
-rw-r--r--test/leap_platform/provider_base/services/webapp.json21
-rw-r--r--test/leap_platform/provider_templates/common.json0
-rw-r--r--test/leap_platform/provider_templates/node.json0
-rw-r--r--test/leap_platform/provider_templates/provider.json0
-rw-r--r--test/leap_platform/puppet/BLAH0
10 files changed, 119 insertions, 0 deletions
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
--- /dev/null
+++ b/test/leap_platform/provider_templates/common.json
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
--- /dev/null
+++ b/test/leap_platform/provider_templates/node.json
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
--- /dev/null
+++ b/test/leap_platform/provider_templates/provider.json
diff --git a/test/leap_platform/puppet/BLAH b/test/leap_platform/puppet/BLAH
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/leap_platform/puppet/BLAH