Merge "Revert "Fix reclass.storage for SL2""
diff --git a/docker/swarm/stack/influxdb.yml b/docker/swarm/stack/influxdb.yml
new file mode 100644
index 0000000..e753d18
--- /dev/null
+++ b/docker/swarm/stack/influxdb.yml
@@ -0,0 +1,29 @@
+classes:
+- system.influxdb.server.container
+- system.influxdb.server.tmpfs_wal
+- system.telegraf.agent.remote.input.influxdb
+parameters:
+  _param:
+    docker_influxdb_replicas: 1
+    docker_influxdb_data_dir: /srv/volumes/influxdb
+  docker:
+    client:
+      stack:
+        influxdb:
+          service:
+            server:
+              deploy:
+                replicas: ${_param:docker_influxdb_replicas}
+                restart_policy:
+                  condition: any
+              environment:
+                INFLUXDB_CONFIG_PATH: /etc/influxdb/influxdb.conf
+                INFLUXDB_DATA_DIR: /var/lib/influxdb/data
+                INFLUXDB_DATA_WAL_DIR: /var/lib/influxdb/wal
+              image: ${_param:docker_influxdb_image}
+              ports:
+              - 15016:8086
+              volumes:
+              - ${influxdb:server:prefix_dir}/etc/influxdb:/etc/influxdb
+              - ${_param:docker_influxdb_data_dir}:/var/lib/influxdb/data
+              - ${influxdb:server:data:wal_dir}:/var/lib/influxdb/wal
diff --git a/influxdb/client/database/ceilometer.yml b/influxdb/client/database/ceilometer.yml
new file mode 100644
index 0000000..52aebae
--- /dev/null
+++ b/influxdb/client/database/ceilometer.yml
@@ -0,0 +1,25 @@
+parameters:
+  _param:
+    influxdb_ceilometer_rp_duration: 30d
+  influxdb:
+    client:
+      database:
+        ceilometer:
+          enabled: true
+          name: ceilometer
+          retention_policy:
+            - name: ceilometer_default
+              is_default: true
+              duration: ${_param:influxdb_ceilometer_rp_duration}
+              replication: 1
+      user:
+        ceilometer:
+          enabled: true
+          name: ceilometer
+          password: ${_param:ceilometer_influxdb_password}
+      grant:
+        ceilometer_all:
+          enabled: true
+          user: ceilometer
+          database: ceilometer
+          privilege: all
diff --git a/influxdb/client/database/stacklight.yml b/influxdb/client/database/stacklight.yml
new file mode 100644
index 0000000..d07d0b8
--- /dev/null
+++ b/influxdb/client/database/stacklight.yml
@@ -0,0 +1,25 @@
+parameters:
+  _param:
+    influxdb_stacklight_rp_duration: 30d
+  influxdb:
+    client:
+      database:
+        lma:
+          enabled: true
+          name: lma
+          retention_policy:
+          - name: lma_default
+            is_default: true
+            duration: ${_param:influxdb_stacklight_password}
+            replication: 1
+      user:
+        lma:
+          enabled: true
+          name: lma
+          password: ${_param:influxdb_stacklight_password}
+      grant:
+        lma_all:
+          enabled: true
+          user: lma
+          database: lma
+          privilege: all
diff --git a/influxdb/client/init.yml b/influxdb/client/init.yml
new file mode 100644
index 0000000..8c66f1b
--- /dev/null
+++ b/influxdb/client/init.yml
@@ -0,0 +1,13 @@
+classes:
+- service.influxdb.client
+parameters:
+  _param:
+    influxdb_client_port: 8086
+  influxdb:
+    client:
+      server:
+        protocol: http
+        host: ${_param:influxdb_client_host}
+        port: ${_param:influxdb_client_port}
+        user: root
+        password: ${_param:influxdb_client_password}
diff --git a/influxdb/server/container.yml b/influxdb/server/container.yml
new file mode 100644
index 0000000..d7e7df7
--- /dev/null
+++ b/influxdb/server/container.yml
@@ -0,0 +1,19 @@
+classes:
+- service.influxdb.server.container
+parameters:
+  influxdb:
+    server:
+      enabled: true
+      prefix_dir: /srv/volumes/local/influxdb
+      http:
+        enabled: true
+        bind:
+          port: 8086
+      admin:
+        enabled: true
+        bind:
+          port: 8083
+        user:
+          enabled: true
+          name: 'root'
+          password: ${_param:influxdb_admin_password}
diff --git a/jenkins/client/job/deploy/lab/mk/init.yml b/jenkins/client/job/deploy/lab/mk/init.yml
index dde1fb0..b9d486d 100644
--- a/jenkins/client/job/deploy/lab/mk/init.yml
+++ b/jenkins/client/job/deploy/lab/mk/init.yml
@@ -116,9 +116,22 @@
                 default: "docker-dev-virtual.docker.mirantis.net/mirantis/kubernetes/k8s-conformance:v1.5.1-3_1482332392819"
 
               # Tempest settings
-              TEMPEST_IMAGE_LINK:
+              TEMPEST_IMAGE:
                 type: string
+                description: "Tempest image link"
                 default: "sandbox-docker-prod-local.docker.mirantis.net/mirantis/rally_tempest:0.1"
+              TARGET_TEST_NODE:
+                type: string
+                description: "Node to run tests"
+                default: ""
+              DOCKER_INSTALL:
+                type: boolean
+                description: "Install docker on the target if true"
+                default: "true"
+              PATTERN:
+                type: string
+                description: "Run tests matched to pattern only"
+                default: ""
 
               ASK_ON_ERROR:
                 type: boolean
diff --git a/neutron/client/service/octavia.yml b/neutron/client/service/octavia.yml
index e818f76..90a4a4e 100644
--- a/neutron/client/service/octavia.yml
+++ b/neutron/client/service/octavia.yml
@@ -1,6 +1,8 @@
 classes:
 - service.neutron.client
 parameters:
+  _param:
+    octavia_hm_bind_ip: '192.168.0.12'
   neutron:
     client:
       server:
@@ -19,7 +21,7 @@
               port:
                 octavia-health-manager-listen-port:
                   fixed_ips:
-                    - ip_address: '192.168.0.12'
+                    - ip_address: ${_param:octavia_hm_bind_ip}
                   device_owner: Octavia:health-mgr
                   binding_host_id: ${_param:openstack_gateway_node01_hostname}
                   security_groups:
diff --git a/prometheus/server/target/dns.yml b/prometheus/server/target/dns.yml
index ed6602d..e2745f1 100644
--- a/prometheus/server/target/dns.yml
+++ b/prometheus/server/target/dns.yml
@@ -25,3 +25,8 @@
               - 'tasks.monitoring_remote_agent'
               type: A
               port: ${telegraf:remote_agent:output:prometheus_client:bind:port}
+            - name: 'remote_storage_adapter'
+              domain:
+              - 'tasks.monitoring_remote_storage_adapter'
+              type: A
+              port: ${prometheus:remote_storage_adapter:bind:port}
diff --git a/reclass/storage/system/openstack_control_single.yml b/reclass/storage/system/openstack_control_single.yml
new file mode 100644
index 0000000..016ab96
--- /dev/null
+++ b/reclass/storage/system/openstack_control_single.yml
@@ -0,0 +1,15 @@
+parameters:
+  _param:
+    openstack_control_node01_hostname: ctl01
+  reclass:
+    storage:
+      node:
+        openstack_control_node01:
+          name: ${_param:openstack_control_node01_hostname}
+          domain: ${_param:cluster_domain}
+          classes:
+          - cluster.${_param:cluster_name}.openstack.control
+          params:
+            salt_master_host: ${_param:reclass_config_master}
+            linux_system_codename: xenial
+            single_address: ${_param:openstack_control_node01_address}
diff --git a/reclass/storage/system/openstack_gateway_single_octavia.yml b/reclass/storage/system/openstack_gateway_single_octavia.yml
index 7291977..2a5b952 100644
--- a/reclass/storage/system/openstack_gateway_single_octavia.yml
+++ b/reclass/storage/system/openstack_gateway_single_octavia.yml
@@ -4,6 +4,4 @@
       node:
         openstack_gateway_node01:
           classes:
-          - system.octavia.manager.single
-          - system.salt.minion.ca.octavia_ca
-          - system.salt.minion.cert.octavia_amp_client
+          - cluster.${_param:cluster_name}.openstack.octavia_manager
diff --git a/telegraf/agent/remote/input/influxdb.yml b/telegraf/agent/remote/input/influxdb.yml
new file mode 100644
index 0000000..9b28476
--- /dev/null
+++ b/telegraf/agent/remote/input/influxdb.yml
@@ -0,0 +1,12 @@
+parameters:
+  _param:
+    telegraf_remote_agent_influxdb_port: 15016
+    telegraf_remote_agent_influxdb_protocol: http
+  telegraf:
+    remote_agent:
+      input:
+        influxdb:
+          servers:
+          - url: "${_param:telegraf_remote_agent_influxdb_protocol}://${_param:telegraf_remote_agent_influxdb_address}:${_param:telegraf_remote_agent_influxdb_port}/debug/vars"
+          tags:
+            host: ${_param:telegraf_remote_agent_influxdb_address}