pip install --upgrade
echo "$0: install python-openstackclient python-glanceclient"
-pip install --upgrade python-openstackclient python-glanceclient python-neutronclient
+pip install --upgrade python-openstackclient python-glanceclient python-neutronclient keystonemiddleware
echo "$0: Create virtualenv"
virtualenv /tmp/tacker/venv
sed -i -- "s~# connection = mysql://root:pass@127.0.0.1:3306/tacker~connection = mysql://root:$MYSQL_PASSWORD@$ip:3306/tacker?charset=utf8~" /usr/local/etc/tacker/tacker.conf
sed -i -- ":a;N;$!ba;s~password = service-password\nusername = nova\nauth_url = http://127.0.0.1:35357~password = $OS_PASSWORD\nauth_url = http://$NOVA_HOST:35357~g" /usr/local/etc/tacker/tacker.conf
sed -i -- "s~heat_uri = http://localhost:8004/v1~heat_uri = http://$HEAT_HOST:8004/v1~" /usr/local/etc/tacker/tacker.conf
+sed -i -- "s~# api_paste_config = api-paste.ini~api_paste_config = /tmp/tacker/tacker/etc/tacker/api-paste.ini~" /usr/local/etc/tacker/tacker.conf
echo "$0: Populate Tacker database"
-/usr/local/bin/tacker-db-manage --config-file /etc/tacker/tacker.conf upgrade head
+/tmp/tacker/venv/bin/tacker-db-manage --config-file /etc/tacker/tacker.conf upgrade head
echo "$0: Install Tacker Client"
cd /tmp/tacker
#service apache2 restart
echo "$0: Start the Tacker Server"
-python /usr/local/bin/tacker-server --config-file /usr/local/etc/tacker/tacker.conf --log-file /var/log/tacker/tacker.log
+python /tmp/tacker/venv/bin/tacker-server --config-file /usr/local/etc/tacker/tacker.conf --log-file /var/log/tacker/tacker.log
# Registering default VIM: deferrred
cd /tmp/cloudify/blueprints
echo "$0: clone cloudify-hello-world-example"
- git clone https://github.com/cloudify-cosmo/cloudify-hello-world-example.git
- cd cloudify-hello-world-example
- git checkout 3.4.1-build
+ if [[ "$1" == "cloudify-manager" ]]; then
+ git clone https://github.com/cloudify-cosmo/cloudify-hello-world-example.git
+ cd cloudify-hello-world-example
+ git checkout 3.4.1-build
+ else
+ git clone https://github.com/blsaws/cloudify-cli-hello-world-example.git
+ cd cloudify-cli-hello-world-example
+ git checkout 3.4.1-build
+ fi
echo "$0: setup OpenStack CLI environment"
source /tmp/cloudify/admin-openrc.sh
external_network_name: $floating_network_name
webserver_port: 8080
key_name: vHello
+ssh_key_filename: ~/.ssh/vHello.pem
+ssh_user: ubuntu
+ssh_port: 22
EOF
fi
SERVER_URL=$(cfy deployments outputs -d vHello | awk "/ Value: / { print \$2 }")
else
echo "$0: install local blueprint"
- cfy local install --install-plugins -i vHello-inputs.yaml -p cloudify-hello-world-example/blueprint.yaml --allow-custom-parameters --parameters="floating_network_name=$floating_network_name" --task-retries=10 --task-retry-interval=30
+ cfy local install --install-plugins -i vHello-inputs.yaml -p cloudify-cli-hello-world-example/blueprint.yaml --allow-custom-parameters --parameters="floating_network_name=$floating_network_name" --task-retries=10 --task-retry-interval=30
if [ $? -eq 1 ]; then fail; fi
-# cfy local install replaces the following, per http://getcloudify.org/2016/04/07/cloudify-update-from-developers-features-improvements-open-source-python-devops.html
-# cfy local init --install-plugins -i vHello-inputs.yaml -p cloudify-hello-world-example/blueprint.yaml
-# cfy local execute -w install
-# Not sure if needed
-# cfy local create-requirements -p cloudify-hello-world-example/blueprint.yaml
-# if [ $? -eq 1 ]; then fail; fi
echo "$0: get vHello server address"
SERVER_URL=$(cfy local outputs | awk "/http_endpoint/ { print \$2 }" | sed -- 's/"//g')