From 67d71104bbd5122187232460026f654c4edd9228 Mon Sep 17 00:00:00 2001
From: Spyros Trigazis <strigazi@gmail.com>
Date: Mon, 5 Dec 2016 17:40:18 +0100
Subject: [PATCH] Disable horizon, swift and ceilometer

Swift Ceilometer and horizon are not used. Disabling them
it will give us space.

Cleanup disabling of octavia and neutron/lbaas.

Closes-Bug: #1646870
Closes-Bug: #1648148
Change-Id: I4b177421f0eb0a058b8927b9d2dd12865d3c920e
---
 devstack/settings                 | 26 +++++++++++++++++---------
 doc/source/dev/quickstart.rst     | 22 +++++++++++++++-------
 magnum/tests/contrib/gate_hook.sh | 10 ----------
 3 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/devstack/settings b/devstack/settings
index 954d734477..13f437f82f 100644
--- a/devstack/settings
+++ b/devstack/settings
@@ -27,15 +27,23 @@ enable_service q-l3
 enable_service q-meta
 enable_service neutron
 
-# Disable LBaaS(v1) service
-disable_service q-lbaas
-# Enable LBaaS(v2) services
-enable_service q-lbaasv2
-enable_service octavia
-enable_service o-cw
-enable_service o-hk
-enable_service o-hm
-enable_service o-api
+# Disable horizon
+disable_service horizon
+
+# Disable swift
+disable_service s-account
+disable_service s-container
+disable_service s-object
+disable_service s-proxy
+
+# Disable ceilometer
+disable_service ceilometer-acentral
+disable_service ceilometer-acompute
+disable_service ceilometer-alarm-evaluator
+disable_service ceilometer-alarm-notifier
+disable_service ceilometer-anotification
+disable_service ceilometer-api
+disable_service ceilometer-collector
 
 # Enable Magnum services
 enable_service magnum-api
diff --git a/doc/source/dev/quickstart.rst b/doc/source/dev/quickstart.rst
index 387fe30a07..5e96e427f8 100644
--- a/doc/source/dev/quickstart.rst
+++ b/doc/source/dev/quickstart.rst
@@ -120,9 +120,8 @@ Kilo, and heat must be enabled by yourself)::
     # Enable barbican service and use it to store TLS certificates
     # For details http://docs.openstack.org/developer/magnum/dev/tls.html
     enable_plugin barbican https://git.openstack.org/openstack/barbican
+
     enable_plugin heat https://git.openstack.org/openstack/heat
-    enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas
-    enable_plugin octavia https://git.openstack.org/openstack/octavia
 
     # Enable magnum plugin after dependent plugins
     enable_plugin magnum https://git.openstack.org/openstack/magnum
@@ -130,6 +129,20 @@ Kilo, and heat must be enabled by yourself)::
     # Optional:  uncomment to enable the Magnum UI plugin in Horizon
     #enable_plugin magnum-ui https://github.com/openstack/magnum-ui
 
+    VOLUME_BACKING_FILE_SIZE=20G
+    END
+
+**NOTE:** Update PUBLIC_INTERFACE as appropriate for your system.
+
+**NOTE:** Enable heat plugin is necessary.
+
+Optionally, you can enable neutron/lbaas v2 with octavia to create load
+balancers for multi master clusters::
+
+    cat >> /opt/stack/devstack/local.conf << END
+    enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas
+    enable_plugin octavia https://git.openstack.org/openstack/octavia
+
     # Disable LBaaS(v1) service
     disable_service q-lbaas
     # Enable LBaaS(v2) services
@@ -139,13 +152,8 @@ Kilo, and heat must be enabled by yourself)::
     enable_service o-hk
     enable_service o-hm
     enable_service o-api
-    VOLUME_BACKING_FILE_SIZE=20G
     END
 
-**NOTE:** Update PUBLIC_INTERFACE as appropriate for your system.
-
-**NOTE:** Enable heat plugin is necessary.
-
 Optionally, you can enable ceilometer in devstack. If ceilometer is enabled,
 magnum will periodically send metrics to ceilometer::
 
diff --git a/magnum/tests/contrib/gate_hook.sh b/magnum/tests/contrib/gate_hook.sh
index d7e0a1c539..db2b2bae44 100755
--- a/magnum/tests/contrib/gate_hook.sh
+++ b/magnum/tests/contrib/gate_hook.sh
@@ -20,16 +20,6 @@ special=$2
 
 export PROJECTS="openstack/barbican $PROJECTS"
 export DEVSTACK_LOCAL_CONFIG="enable_plugin heat git://git.openstack.org/openstack/heat"
-export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer"
-
-# Disable LBaaS(v1) and LBaaS(v2)
-export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service q-lbaas"
-export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service q-lbaasv2"
-export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service octavia"
-export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service o-cw"
-export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service o-hk"
-export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service o-hm"
-export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service o-api"
 
 if [ "$coe" = "mesos" ]; then
     echo "MAGNUM_GUEST_IMAGE_URL=https://fedorapeople.org/groups/magnum/ubuntu-mesos-latest.qcow2" >> $BASE/new/devstack/localrc