Merge "Update ceilosca.sh to Newton vintage"

This commit is contained in:
Jenkins 2017-04-24 22:53:54 +00:00 committed by Gerrit Code Review
commit 7321072de1
4 changed files with 34 additions and 13 deletions

View File

@ -5,14 +5,15 @@ There are a few options for configuring Ceilosca on top of a Ceilometer and Mona
Choose one:
- DevStack can be instructed through the local.conf to "enable ceilosca". Reference the included devstack/sample-local.conf for one configuration.
- Use the included Vagrantfile to create and provision a VM.
- Use the included Vagrantfile to create and provision a VM. This will provision a new Ubuntu 16.04 VM and run the ceilosca.sh.
- Under certain conditions the monasca_test_setup.py may be used to set up Ceilosca for testing. This .py may also be useful reference if you choose to write your own integration scripts.
- (Deprecated) the devstack/ceilosca.sh script will copy Ceilosca components on top of Ceilometer.
- ceilosca.sh is left as reference, but has not been updated for the Newton release.
- The devstack/ceilosca.sh script will copy Ceilosca components on top of Ceilometer.
- ceilosca.sh has been updated to the Newton release.
- ceilosca.sh is also used by the Vagrant deployment option.
- The script should be tweaked before execution, particularly the lines.
- export SERVICE_HOST=192.168.10.6
- export HOST_IP_IFACE=eth0
- The script was run by a sudoers user with no password.
- The script should be run by a sudoers user with no password required. Such as is described in https://docs.openstack.org/developer/devstack/
- And did not configure Horizon

View File

@ -26,7 +26,7 @@ Vagrant.configure(2) do |config|
end
config.vm.hostname = "devstack"
config.vm.box = "ubuntu/trusty64"
config.vm.box = "bento/ubuntu-16.04"
# config.vm.box_check_update = false
config.vm.network "private_network",ip:"192.168.10.6"
config.vm.synced_folder "~/", "/vagrant_home"
@ -36,6 +36,8 @@ Vagrant.configure(2) do |config|
vb.memory = "12800"
vb.cpus = 4
# vb.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
# bento box bug workaround - https://github.com/chef/bendo/issues/688
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
config.vm.provision "shell", privileged: false, path: "ceilosca.sh"

View File

@ -4,9 +4,11 @@
cd $HOME
#Essentials
sudo apt-get update
sudo apt-get -y upgrade
# Note - Vagrant bento box chokes on update/upgrade, so just use a current build instead
# sudo apt-get update
# sudo apt-get -y upgrade
sudo apt-get -y install git
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo apt-get -y install python-dev
@ -37,10 +39,10 @@ if [ $http_proxy ]; then
sudo cp ./maven_proxy_settings.xml /root/.m2/settings.xml
fi
#Clone devstack and switch to mitaka
#Clone devstack and switch to newton
git clone https://git.openstack.org/openstack-dev/devstack | true
cd devstack
git checkout stable/mitaka
git checkout stable/newton
#Add hard coded IP to the default interface
##NOTE: Change the interface if your system is different net_if
@ -49,6 +51,7 @@ export HOST_IP_IFACE=eth0
sudo ip addr add $SERVICE_HOST/24 dev $HOST_IP_IFACE || true
#local.conf for devstack
#NOTE: setting other services to versions compatible with newton and later Ceilosca
echo '[[local|localrc]]
SERVICE_HOST=$SERVICE_HOST
HOST_IP=$SERVICE_HOST
@ -65,6 +68,10 @@ LOGDIR=$DEST/logs
LOG_COLOR=False
disable_service ceilometer-alarm-notifier ceilometer-alarm-evaluator
disable_service ceilometer-collector
disable_service monasca-thresh
# The following must be disabled as the test does not work at this point
# See https://bugs.launchpad.net/monasca/+bug/1636508
disable_service monasca-smoke-test
enable_service rabbit mysql key tempest
# The following two variables allow switching between Java and Python for the implementations
# of the Monasca API and the Monasca Persister. If these variables are not set, then the
@ -76,9 +83,11 @@ MONASCA_API_IMPLEMENTATION_LANG=${MONASCA_API_IMPLEMENTATION_LANG:-python}
#MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-java}
MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-python}
# This line will enable all of Monasca.
enable_plugin monasca-api https://git.openstack.org/openstack/monasca-api
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer
enable_plugin ceilosca https://github.com/openstack/monasca-ceilometer
enable_plugin monasca-api https://git.openstack.org/openstack/monasca-api stable/newton
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer stable/newton
enable_plugin ceilosca https://github.com/openstack/monasca-ceilometer master
# Optional
#enable_plugin monasca-transform https://git.openstack.org/openstack/monasca-transform master
' > local.conf
#Run the stack.sh

View File

@ -26,8 +26,17 @@ function configure_ceilosca {
iniset $CEILOMETER_CONF database metering_connection monasca://$MONASCA_API_URL
iniset $CEILOMETER_CONF notification workers $API_WORKERS
# disable, otherwise Ceilosca won't process and store event data
iniset $CEILOMETER_CONF notifications workload_partitioning False
# Disable, otherwise Ceilosca won't process and store event data
iniset $CEILOMETER_CONF notification disable_non_metric_meters False
# Workaround: Client has a problem with the /identity auth url only in service_credentials
auth_url=$(iniget $CEILOMETER_CONF service_credentials auth_url)
if [[ -n "$auth_url" ]]; then
# Go direct to the port
auth_url=${auth_url/%\/identity/:35357\/v3}
iniset $CEILOMETER_CONF service_credentials ${auth_url}
fi
}
function preinstall_ceilosca {