Enable octavia on pike deploy

Change-Id: I2a000d90de9d55321130f30c27c2de8ba48c7a58
diff --git a/tcp_tests/templates/cookied-cicd-pike-dvr-sl/environment_context.yaml b/tcp_tests/templates/cookied-cicd-pike-dvr-sl/environment_context.yaml
index 045df31..24c36e5 100644
--- a/tcp_tests/templates/cookied-cicd-pike-dvr-sl/environment_context.yaml
+++ b/tcp_tests/templates/cookied-cicd-pike-dvr-sl/environment_context.yaml
@@ -250,7 +250,6 @@
     gtw01:
       reclass_storage_name: openstack_gateway_node01
       roles:
-      - openstack_gateway
       - linux_system_codename_xenial
       interfaces:
         ens3:
diff --git a/tcp_tests/templates/cookied-cicd-pike-ovs-sl/cookiecutter-context-pike-ovs-sl.yaml b/tcp_tests/templates/cookied-cicd-pike-ovs-sl/cookiecutter-context-pike-ovs-sl.yaml
index c3e838d..7917d5b 100644
--- a/tcp_tests/templates/cookied-cicd-pike-ovs-sl/cookiecutter-context-pike-ovs-sl.yaml
+++ b/tcp_tests/templates/cookied-cicd-pike-ovs-sl/cookiecutter-context-pike-ovs-sl.yaml
@@ -231,3 +231,4 @@
   tenant_vlan: '20'
   upstream_proxy_enabled: 'False'
   use_default_network_scheme: 'False'
+  openstack_octavia_enabled: 'True'
diff --git a/tcp_tests/templates/cookied-cicd-pike-ovs-sl/environment-context.yaml b/tcp_tests/templates/cookied-cicd-pike-ovs-sl/environment-context.yaml
index d4f9647..adcfe0c 100644
--- a/tcp_tests/templates/cookied-cicd-pike-ovs-sl/environment-context.yaml
+++ b/tcp_tests/templates/cookied-cicd-pike-ovs-sl/environment-context.yaml
@@ -248,7 +248,6 @@
     gtw01:
       reclass_storage_name: openstack_gateway_node01
       roles:
-      - openstack_gateway
       - linux_system_codename_xenial
       interfaces:
         ens3:
diff --git a/tcp_tests/templates/cookied-mcp-pike-dvr/_context-cookiecutter-mcp-pike-dvr.yaml b/tcp_tests/templates/cookied-mcp-pike-dvr/_context-cookiecutter-mcp-pike-dvr.yaml
index 068396b..36e2ee0 100644
--- a/tcp_tests/templates/cookied-mcp-pike-dvr/_context-cookiecutter-mcp-pike-dvr.yaml
+++ b/tcp_tests/templates/cookied-mcp-pike-dvr/_context-cookiecutter-mcp-pike-dvr.yaml
@@ -203,3 +203,5 @@
   openstack_share_node01_hostname: share01
   openstack_share_node02_hostname: share02
   openstack_share_node03_hostname: share03
+  openstack_octavia_enabled: 'True'
+
diff --git a/tcp_tests/templates/cookied-mcp-pike-dvr/_context-environment.yaml b/tcp_tests/templates/cookied-mcp-pike-dvr/_context-environment.yaml
index 8ec7377..abd8d0f 100644
--- a/tcp_tests/templates/cookied-mcp-pike-dvr/_context-environment.yaml
+++ b/tcp_tests/templates/cookied-mcp-pike-dvr/_context-environment.yaml
@@ -185,7 +185,6 @@
     gtw01.mcp-pike-dvr.local:
       reclass_storage_name: openstack_gateway_node01
       roles:
-      - openstack_gateway
       - linux_system_codename_xenial
       interfaces:
         ens3:
diff --git a/tcp_tests/templates/cookied-mcp-pike-dvr/openstack.yaml b/tcp_tests/templates/cookied-mcp-pike-dvr/openstack.yaml
index 000f4f9..59e85e3 100644
--- a/tcp_tests/templates/cookied-mcp-pike-dvr/openstack.yaml
+++ b/tcp_tests/templates/cookied-mcp-pike-dvr/openstack.yaml
@@ -56,3 +56,8 @@
 {{ SHARED_OPENSTACK.MACRO_INSTALL_COMPUTE(CELL_MAPPING=true) }}
 
 {{ SHARED_OPENSTACK.MACRO_INSTALL_MANILA() }}
+
+{{ SHARED_OPENSTACK.MACRO_INSTALL_OCTAVIA_API() }}
+
+{{ SHARED_OPENSTACK.MACRO_INSTALL_OCTAVIA_MANAGER() }}
+
diff --git a/tcp_tests/templates/shared-openstack.yaml b/tcp_tests/templates/shared-openstack.yaml
index 0461358..dbc9146 100644
--- a/tcp_tests/templates/shared-openstack.yaml
+++ b/tcp_tests/templates/shared-openstack.yaml
@@ -337,7 +337,51 @@
 {%- endmacro %}
 
 {%- macro MACRO_INSTALL_OCTAVIA_API() %}
-# TO DO
+- description: Install octavia api service on primary node
+  cmd: salt -C 'I@octavia:api:role:primary' state.sls octavia.api
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 1, delay: 5}
+  skip_fail: false
+
+- description: Install octavia api service
+  cmd: salt -C 'I@octavia:api' state.sls octavia.api
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 1, delay: 5}
+  skip_fail: false
+
+{%- endmacro %}
+
+{%- macro MACRO_INSTALL_OCTAVIA_MANAGER() %}
+- description: Update mine
+  cmd: salt -C 'I@neutron:client' mine.update && sleep 60
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 1, delay: 5}
+  skip_fail: false
+
+- description: Install octavia manager
+  cmd: salt -C 'I@octavia:manager' state.sls octavia.manager
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 1, delay: 5}
+  skip_fail: false
+
+- description: Execute octavia ca
+  cmd: salt -C 'I@octavia:manager' state.sls salt.minion.ca
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 1, delay: 5}
+  skip_fail: false
+
+- description: Execute octavia cert
+  cmd: salt -C 'I@octavia:manager' state.sls salt.minion.cert
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 1, delay: 5}
+  skip_fail: false
+
+- description: Execute octavia client
+  cmd: salt -C 'I@octavia:client' state.sls octavia.client
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 1, delay: 5}
+  skip_fail: false
+
 {%- endmacro %}
 
 {%- macro MACRO_INSTALL_DOGTAG() %}