add OpenContrail tor support
Change-Id: I64ac7acd6f2c00661fd07291f893dafa29bfad88
diff --git a/haproxy/proxy/listen/opencontrail/tor.yml b/haproxy/proxy/listen/opencontrail/tor.yml
new file mode 100644
index 0000000..0595ccd
--- /dev/null
+++ b/haproxy/proxy/listen/opencontrail/tor.yml
@@ -0,0 +1,19 @@
+parameters:
+ haproxy:
+ proxy:
+ listen:
+ contrail_tor01:
+ type: contrail-tor
+ service_name: contrail
+ binds:
+ - address: ${_param:cluster_vip_address}
+ port: 6631
+ servers:
+ - name: sw01
+ host: ${_param:cluster_node01_address}
+ port: 6632
+ params: check
+ - name: sw02
+ host: ${_param:cluster_node02_address}
+ port: 6632
+ params: check backup
diff --git a/opencontrail/compute/tor/cluster.yml b/opencontrail/compute/tor/cluster.yml
new file mode 100644
index 0000000..662de03
--- /dev/null
+++ b/opencontrail/compute/tor/cluster.yml
@@ -0,0 +1,4 @@
+classes:
+- service.haproxy.proxy.single
+- service.keepalived.cluster.single
+- service.opencontrail.compute.tor.cluster
diff --git a/reclass/storage/system/opencontrail_tor_cluster.yml b/reclass/storage/system/opencontrail_tor_cluster.yml
new file mode 100644
index 0000000..81d7314
--- /dev/null
+++ b/reclass/storage/system/opencontrail_tor_cluster.yml
@@ -0,0 +1,31 @@
+parameters:
+ _param:
+ opencontrail_tor01_node01_hostname: tor01
+ opencontrail_tor01_node02_hostname: tor02
+ opencontrail_tor01_node01_tenant_address: ${_param:opencontrail_tor01_node01_address}
+ opencontrail_tor01_node02_tenant_address: ${_param:opencontrail_tor01_node02_address}
+ reclass:
+ storage:
+ node:
+ opencontrail_tor01_node01:
+ name: ${_param:opencontrail_tor01_node01_hostname}
+ domain: ${_param:cluster_domain}
+ classes:
+ - cluster.${_param:cluster_name}.opencontrail.tor
+ params:
+ salt_master_host: ${_param:reclass_config_master}
+ linux_system_codename: xenial
+ single_address: ${_param:opencontrail_tor01_node01_address}
+ tenant_address: ${_param:opencontrail_tor01_node01_tenant_address}
+ keepalived_vip_priority: 103
+ opencontrail_tor01_node02:
+ name: ${_param:opencontrail_tor01_node02_hostname}
+ domain: ${_param:cluster_domain}
+ classes:
+ - cluster.${_param:cluster_name}.opencontrail.tor
+ params:
+ salt_master_host: ${_param:reclass_config_master}
+ linux_system_codename: xenial
+ single_address: ${_param:opencontrail_tor01_node02_address}
+ tenant_address: ${_param:opencontrail_tor01_node02_tenant_address}
+ keepalived_vip_priority: 102
diff --git a/salt/minion/cert/opencontrail/tor.yml b/salt/minion/cert/opencontrail/tor.yml
new file mode 100644
index 0000000..eb9c704
--- /dev/null
+++ b/salt/minion/cert/opencontrail/tor.yml
@@ -0,0 +1,14 @@
+parameters:
+ _param:
+ salt_minion_ca_authority: salt_master_ca
+ salt:
+ minion:
+ cert:
+ opencontrail_tor:
+ host: ${_param:salt_minion_ca_host}
+ authority: ${_param:salt_minion_ca_authority}
+ common_name: opencontrail_tor
+ key_file: /etc/contrail/ssl/certs/tor.key
+ cert_file: /etc/contrail/ssl/certs/tor.crt
+ ca_file: /etc/contrail/ssl/certs/ca.crt
+ signing_policy: cert_open