OC: configure cassandra backup/restore schedule

Backup schedule enabled for both models, with contrail
3.x and 4.0.
Configuration was taken from official MCP guide [1]
[1] https://docs.mirantis.com/mcp/q2-18/mcp-operations-guide

PROD-22844

Change-Id: I1ba9537dd356f6e6d0b0e1e7e06ec175cd8ba026
diff --git a/classes/cluster/os-ha-contrail-40/.env b/classes/cluster/os-ha-contrail-40/.env
index ffe5d4d..3265c0a 100644
--- a/classes/cluster/os-ha-contrail-40/.env
+++ b/classes/cluster/os-ha-contrail-40/.env
@@ -1,4 +1,4 @@
-EXTRA_FORMULAS="barbican linux salt reclass maas memcached openssh ntp sphinx \
+EXTRA_FORMULAS="barbican cassandra linux salt reclass maas memcached openssh ntp sphinx \
         grafana libvirt rsyslog glusterfs postfix xtrabackup freeipa prometheus telegraf \
         elasticsearch kibana rundeck devops-portal rsync docker keepalived aptly jenkins \
         gerrit artifactory influxdb horizon nginx collectd heka mysql nova opencontrail logrotate"
diff --git a/classes/cluster/os-ha-contrail-40/infra/config.yml b/classes/cluster/os-ha-contrail-40/infra/config.yml
index f248234..f55d501 100644
--- a/classes/cluster/os-ha-contrail-40/infra/config.yml
+++ b/classes/cluster/os-ha-contrail-40/infra/config.yml
@@ -38,6 +38,7 @@
 - system.nova.client.flavor.default
 - cluster.os-ha-contrail-40.openstack.proxy
 - cluster.os-ha-contrail-40
+- system.cassandra.backup.server.single
 parameters:
   _param:
     ubuntu_xenial_image_url: "http://ci.mcp.mirantis.net:8085/images/ubuntu-16-04-x64-mcp1.1.qcow2"
@@ -50,6 +51,7 @@
     salt_master_base_environment: prd
     salt_minion_ca_host: ${linux:network:fqdn}
     salt_api_password_hash: "$6$sGnRlxGf$al5jMCetLP.vfI/fTl3Z0N7Za1aeiexL487jAtyRABVfT3NlwZxQGVhO7S1N8OwS/34VHYwZQA8lkXwKMN/GS1"
+    cassandra_backup_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD5OlYhHotouWbHRPu35pZG+sCDplz0+Khg3NYpbFf34xi6bD7nFbzICctJDn1xNPxkA3f7kFsqaV410n2Whd/m5gbqGyI2vmkequTQOqp64loxv3m4BEloB1noGYXfpz5QVHX3yhEv0KfoaUWGFaL5ciDpklL2GHafaCLnmEVE0OufP8P8p8P62tyK/Cn2RyAfCtajKbdWHjFgfH1vXAIrxegJeJBFuHptyiP3E0IROSojg7naBAPCCywBzl9uXqB+gvmXlTYAtsO8meNNlzz8trdFlEVnMpe7icKWjOU61m2psMZeV9/KSLEa3SdOKW475udXphXgdi51HWCZDFdL
   linux:
     system:
       kernel:
@@ -178,3 +180,6 @@
             mysql_cluster_role: slave
             linux_system_codename: xenial
             horizon_identity_host: ${_param:openstack_control_address}
+        opencontrail_control_node01:
+          classes:
+          - cluster.${_param:cluster_name}.opencontrail.control_init
diff --git a/classes/cluster/os-ha-contrail-40/opencontrail/control_init.yml b/classes/cluster/os-ha-contrail-40/opencontrail/control_init.yml
new file mode 100644
index 0000000..229ee2d
--- /dev/null
+++ b/classes/cluster/os-ha-contrail-40/opencontrail/control_init.yml
@@ -0,0 +1,41 @@
+classes:
+- system.cassandra.backup.client.single
+parameters:
+  cassandra:
+    backup:
+      client:
+        enabled: true
+        restore_latest: 1
+        restore_from: remote
+        containers:
+        - opencontrail_controller_1
+  _param:
+    cassandra_remote_backup_server: cfg01
+    root_private_key: |
+      -----BEGIN RSA PRIVATE KEY-----
+      MIIEpAIBAAKCAQEA+TpWIR6LaLlmx0T7t+aWRvrAg6Zc9PioYNzWKWxX9+MYumw+
+      5xW8yAnLSQ59cTT8ZAN3+5BbKmleNdJ9loXf5uYG6hsiNr5pHqrk0DqqeuJaMb95
+      uARJaAdZ6BmF36c+UFR198oRL9Cn6GlFhhWi+XIg6ZJS9hh2n2gi55hFRNDrnz/D
+      /KfD+trcivwp9kcgHwrWoym3Vh4xYHx9b1wCK8XoCXiQRbh6bcoj9xNCETkqI4O5
+      2gQDwgssAc5fbl6gfoL5l5U2ALbDvJnjTZc8/La3RZRFZzKXu4nClozlOtZtqbDG
+      XlffykixGt0nTiluO+bnV6YV4HYudR1gmQxXSwIDAQABAoIBAQDcoGfeqct/yaDS
+      hp7PDbG64//Ii11+/yEPnm93/BFjwAYEAg8tQnD8JK9w3QLvVJiZcPimGgSaZuyf
+      eNb0iU7MeJVmaN7A1473NxGXxFdmsTpnD7oQzLqu/NL6RJ3ef48KTbqgwKC2U2BQ
+      veBt8nlzmTTJkF8gvEdGlklP+9xWLV0xA3U4Zu3kFyrz0nUGRX59IoBt1eM0Ai2z
+      Uft6U0r4mrZmX1fwtqEDru5pETfqmWxukEQgrQtVhInbG2bHWXPqGUXRwMH6F31k
+      CoWX1+nizL0hdWiB9vSjLlJTIRKaMz0/KnPgpKGQ4ThPTQ67CwlExcErA60Z3k0/
+      lyPnHdYBAoGBAP1VOgz5EK8EPNRrXiyqzQqD4McbcLGIoVDjS+5WqfJKjy0tLTZo
+      lNhoqDPtoL6k3uBzXUFXUdfwaCr4eRxGLOI3wQZfaWydX0x22aMA81TfrviQZwzr
+      fbPwbbeSEQpToUBl6ZbPdkunGua9RqfdwGNrYbqFdvvgWbRyGcVDUmPjAoGBAPva
+      C8JUF7CFEXgMbM/cF6Uyh2f987AMlN+wKkfgSmVlWqubGqTFfn0w+eXDseivEJ6o
+      HcZhJ71jJXpUtkKUftxWO1BdRzvtCvjGWfpkzAAkIbn8QsfXfZR2qE2ondwNuu7p
+      zFOECqiodi/RNYAb/6+rUVPcMB/xF+0+BHBGnCt5AoGAaE53IHBMlkNAaJXsqKeK
+      1RGHs3Nw6yg+g3eTBAda4hAg85DuVMCqyJAO8ZKd5OEtg2z8sLKrWCX8PfUgqKuc
+      P2iFaYJPfhEt8+Xbpmn1xrRy7pVGWON9VmFgS30w1veoJUPQ8e9p3axoPykftm5v
+      kH/eNVZOr1aomMuCIN6fRdECgYEAu0GsbJjJ5F2MV44leYdTrWicdR3FCqjQKGF7
+      jmWd6zYo7F8uuER/f+XiaIvQxAkmelDVkqK6QX5uZz6FJYvzpzAWefJg/JWLCt2w
+      GRTI+XHkAb0miiAXJ0Pyb4tnlC5BR1JesdoDctOOzI7pEI/A1IS0u32D6rv/5k2u
+      TyyxAUECgYAM2e2gXv9rhhU6jvZVGfeLoD/ttid9CdYXpEYDWAgcSZo0hOLuIzL0
+      /qlNzZ5FOfPWJ0nMxs+WwslgNKgrA3SPwWWYADVgUDEXdmHUOzAGdojQtM0xSN1C
+      UoM0EwbVHjFOJWnykuB0x5snagp8Te25JEl+KS7i54LxY0BqY0KvfA==
+      -----END RSA PRIVATE KEY-----
diff --git a/classes/cluster/os-ha-contrail/.env b/classes/cluster/os-ha-contrail/.env
index f231f5d..1fac99f 100644
--- a/classes/cluster/os-ha-contrail/.env
+++ b/classes/cluster/os-ha-contrail/.env
@@ -1,4 +1,4 @@
-EXTRA_FORMULAS="barbican linux salt reclass maas memcached openssh ntp sphinx \
+EXTRA_FORMULAS="barbican cassandra linux salt reclass maas memcached openssh ntp sphinx \
         grafana libvirt rsyslog glusterfs postfix xtrabackup freeipa prometheus telegraf \
         elasticsearch kibana rundeck devops-portal rsync docker keepalived aptly jenkins \
         gerrit artifactory influxdb horizon nginx collectd heka mysql nova opencontrail logrotate apache"
diff --git a/classes/cluster/os-ha-contrail/infra/config.yml b/classes/cluster/os-ha-contrail/infra/config.yml
index 27daba8..897297c 100755
--- a/classes/cluster/os-ha-contrail/infra/config.yml
+++ b/classes/cluster/os-ha-contrail/infra/config.yml
@@ -40,6 +40,7 @@
 - system.nova.client.flavor.default
 - cluster.os-ha-contrail.openstack.proxy
 - cluster.os-ha-contrail
+- system.cassandra.backup.server.single
 parameters:
   _param:
     ubuntu_xenial_image_url: "http://ci.mcp.mirantis.net:8085/images/ubuntu-16-04-x64-mcp1.1.qcow2"
@@ -52,6 +53,7 @@
     salt_master_base_environment: prd
     salt_minion_ca_host: ${linux:network:fqdn}
     salt_api_password_hash: "$6$sGnRlxGf$al5jMCetLP.vfI/fTl3Z0N7Za1aeiexL487jAtyRABVfT3NlwZxQGVhO7S1N8OwS/34VHYwZQA8lkXwKMN/GS1"
+    cassandra_backup_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD5OlYhHotouWbHRPu35pZG+sCDplz0+Khg3NYpbFf34xi6bD7nFbzICctJDn1xNPxkA3f7kFsqaV410n2Whd/m5gbqGyI2vmkequTQOqp64loxv3m4BEloB1noGYXfpz5QVHX3yhEv0KfoaUWGFaL5ciDpklL2GHafaCLnmEVE0OufP8P8p8P62tyK/Cn2RyAfCtajKbdWHjFgfH1vXAIrxegJeJBFuHptyiP3E0IROSojg7naBAPCCywBzl9uXqB+gvmXlTYAtsO8meNNlzz8trdFlEVnMpe7icKWjOU61m2psMZeV9/KSLEa3SdOKW475udXphXgdi51HWCZDFdL
   linux:
     system:
       kernel:
@@ -173,3 +175,6 @@
             mysql_cluster_role: slave
             linux_system_codename: xenial
             horizon_identity_host: ${_param:openstack_control_address}
+        opencontrail_control_node01:
+          classes:
+          - cluster.${_param:cluster_name}.opencontrail.control_init
diff --git a/classes/cluster/os-ha-contrail/opencontrail/control_init.yml b/classes/cluster/os-ha-contrail/opencontrail/control_init.yml
new file mode 100644
index 0000000..75d9c30
--- /dev/null
+++ b/classes/cluster/os-ha-contrail/opencontrail/control_init.yml
@@ -0,0 +1,39 @@
+classes:
+- system.cassandra.backup.client.single
+parameters:
+  cassandra:
+    backup:
+      client:
+        enabled: true
+        restore_latest: 1
+        restore_from: remote
+  _param:
+    cassandra_remote_backup_server: cfg01
+    root_private_key: |
+      -----BEGIN RSA PRIVATE KEY-----
+      MIIEpAIBAAKCAQEA+TpWIR6LaLlmx0T7t+aWRvrAg6Zc9PioYNzWKWxX9+MYumw+
+      5xW8yAnLSQ59cTT8ZAN3+5BbKmleNdJ9loXf5uYG6hsiNr5pHqrk0DqqeuJaMb95
+      uARJaAdZ6BmF36c+UFR198oRL9Cn6GlFhhWi+XIg6ZJS9hh2n2gi55hFRNDrnz/D
+      /KfD+trcivwp9kcgHwrWoym3Vh4xYHx9b1wCK8XoCXiQRbh6bcoj9xNCETkqI4O5
+      2gQDwgssAc5fbl6gfoL5l5U2ALbDvJnjTZc8/La3RZRFZzKXu4nClozlOtZtqbDG
+      XlffykixGt0nTiluO+bnV6YV4HYudR1gmQxXSwIDAQABAoIBAQDcoGfeqct/yaDS
+      hp7PDbG64//Ii11+/yEPnm93/BFjwAYEAg8tQnD8JK9w3QLvVJiZcPimGgSaZuyf
+      eNb0iU7MeJVmaN7A1473NxGXxFdmsTpnD7oQzLqu/NL6RJ3ef48KTbqgwKC2U2BQ
+      veBt8nlzmTTJkF8gvEdGlklP+9xWLV0xA3U4Zu3kFyrz0nUGRX59IoBt1eM0Ai2z
+      Uft6U0r4mrZmX1fwtqEDru5pETfqmWxukEQgrQtVhInbG2bHWXPqGUXRwMH6F31k
+      CoWX1+nizL0hdWiB9vSjLlJTIRKaMz0/KnPgpKGQ4ThPTQ67CwlExcErA60Z3k0/
+      lyPnHdYBAoGBAP1VOgz5EK8EPNRrXiyqzQqD4McbcLGIoVDjS+5WqfJKjy0tLTZo
+      lNhoqDPtoL6k3uBzXUFXUdfwaCr4eRxGLOI3wQZfaWydX0x22aMA81TfrviQZwzr
+      fbPwbbeSEQpToUBl6ZbPdkunGua9RqfdwGNrYbqFdvvgWbRyGcVDUmPjAoGBAPva
+      C8JUF7CFEXgMbM/cF6Uyh2f987AMlN+wKkfgSmVlWqubGqTFfn0w+eXDseivEJ6o
+      HcZhJ71jJXpUtkKUftxWO1BdRzvtCvjGWfpkzAAkIbn8QsfXfZR2qE2ondwNuu7p
+      zFOECqiodi/RNYAb/6+rUVPcMB/xF+0+BHBGnCt5AoGAaE53IHBMlkNAaJXsqKeK
+      1RGHs3Nw6yg+g3eTBAda4hAg85DuVMCqyJAO8ZKd5OEtg2z8sLKrWCX8PfUgqKuc
+      P2iFaYJPfhEt8+Xbpmn1xrRy7pVGWON9VmFgS30w1veoJUPQ8e9p3axoPykftm5v
+      kH/eNVZOr1aomMuCIN6fRdECgYEAu0GsbJjJ5F2MV44leYdTrWicdR3FCqjQKGF7
+      jmWd6zYo7F8uuER/f+XiaIvQxAkmelDVkqK6QX5uZz6FJYvzpzAWefJg/JWLCt2w
+      GRTI+XHkAb0miiAXJ0Pyb4tnlC5BR1JesdoDctOOzI7pEI/A1IS0u32D6rv/5k2u
+      TyyxAUECgYAM2e2gXv9rhhU6jvZVGfeLoD/ttid9CdYXpEYDWAgcSZo0hOLuIzL0
+      /qlNzZ5FOfPWJ0nMxs+WwslgNKgrA3SPwWWYADVgUDEXdmHUOzAGdojQtM0xSN1C
+      UoM0EwbVHjFOJWnykuB0x5snagp8Te25JEl+KS7i54LxY0BqY0KvfA==
+      -----END RSA PRIVATE KEY-----