enabling ceph 21/5521/11
authorDan Radez <dradez@redhat.com>
Mon, 14 Dec 2015 19:42:51 +0000 (14:42 -0500)
committerDan Radez <dradez@redhat.com>
Tue, 12 Jan 2016 00:56:03 +0000 (19:56 -0500)
Change-Id: I2dc1bf7ffebb6a83face87a62a81cfb15f9a0689

build/instack.sh
ci/deploy.sh

index f3a366a..54f05d5 100755 (executable)
@@ -226,8 +226,14 @@ PACKAGES+=",openstack-nova-api,openstack-nova-cert,openstack-heat-api-cfn,openst
 PACKAGES+=",openstack-ceilometer-central,openstack-ceilometer-polling,openstack-ceilometer-collector,"
 PACKAGES+=",openstack-heat-api-cloudwatch,openstack-heat-engine,openstack-heat-common,openstack-ceilometer-notification"
 PACKAGES+=",hiera,puppet,memcached,keepalived,mariadb,mariadb-server,rabbitmq-server,python-pbr,python-proliantutils"
-
-LIBGUESTFS_BACKEND=direct virt-customize --install $PACKAGES -a instack.qcow2
+PACKAGES+=",ceph-common"
+
+# install the packages above and enabling ceph to live on the controller
+LIBGUESTFS_BACKEND=direct virt-customize --install $PACKAGES \
+    --run-command "sed -i '/ControllerEnableCephStorage/c\\  ControllerEnableCephStorage: true' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml" \
+    --run-command "sed -i '/  \$enable_ceph = /c\\  \$enable_ceph = true' /usr/share/openstack-tripleo-heat-templates/puppet/manifests/overcloud_controller_pacemaker.pp" \
+    --run-command "sed -i '/  \$enable_ceph = /c\\  \$enable_ceph = true' /usr/share/openstack-tripleo-heat-templates/puppet/manifests/overcloud_controller.pp" \
+    -a instack.qcow2
 popd
 
 
@@ -238,8 +244,10 @@ cp overcloud-full.qcow2 overcloud-full-odl.qcow2
 
 # remove unnecessary packages and install necessary packages
 LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum remove -y openstack-neutron-openvswitch" \
+    --install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
     --upload /etc/yum.repos.d/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \
-    --install opendaylight,python-networking-odl -a overcloud-full-odl.qcow2
+    --install opendaylight,python-networking-odl,ceph \
+    -a overcloud-full-odl.qcow2
 
 ## WORK AROUND
 ## when OpenDaylight lands in upstream RDO manager this can be removed
index 9d5d9d2..c7c8491 100755 (executable)
@@ -678,8 +678,13 @@ if [[ "$net_isolation_enabled" == "TRUE" ]]; then
   openstack-config --set undercloud.conf DEFAULT dhcp_end ${admin_network_dhcp_range##*,}
   openstack-config --set undercloud.conf DEFAULT inspection_iprange ${admin_network_introspection_range}
   openstack-config --set undercloud.conf DEFAULT undercloud_debug false
+
 fi
 
+sudo sed -i '/CephClusterFSID:/c\\  CephClusterFSID: \\x27$(cat /proc/sys/kernel/random/uuid)\\x27' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml
+sudo sed -i '/CephMonKey:/c\\  CephMonKey: \\x27'"\$(ceph-authtool --gen-print-key)"'\\x27' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml
+sudo sed -i '/CephAdminKey:/c\\  CephAdminKey: \\x27'"\$(ceph-authtool --gen-print-key)"'\\x27' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml
+
 openstack undercloud install &> apex-undercloud-install.log
 sleep 30
 sudo systemctl restart openstack-glance-api
@@ -710,6 +715,9 @@ function undercloud_prep_overcloud_deploy {
     exit 1
   fi
 
+  # make sure ceph is installed
+  DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml"
+
   # check if HA is enabled
   if [[ "$ha_enabled" == "TRUE" ]]; then
      DEPLOY_OPTIONS+=" --control-scale 3 --compute-scale 2"