Merge "Adding missing setup for instack"

This commit is contained in:
Jenkins 2014-05-29 09:59:22 +00:00 committed by Gerrit Code Review
commit fc3d290460

View File

@ -49,18 +49,22 @@
<div class="row-fluid">
<div class="span8">
{% blocktrans %}
Your cloud is now deployed; however, it needs to be initialized.
Your cloud is now deployed; however, it needs to be initialized. To do so, copy the appropriate script into a file, make it executable, and run it.
{% endblocktrans %}
<ul>
<li>
{% blocktrans %}
For <strong>Devtest</strong> users you can <a data-toggle="collapse" data-target="#devtest">see instructions here</a>.
<a data-toggle="collapse" data-target="#devtest"><strong>Devtest</strong> cloud initialization script</a>
{% endblocktrans %}
<div id="devtest" class="collapse">
<pre>
#!/usr/bin/bash
# You need to run the following commands from a machine where you have a checkout of the tripleo source code
# and direct access via SSH to your Overcloud control node ({{overcloud.keystone_ip}}).
set -eux
export TRIPLEO_ROOT=~/tripleo
cd $TRIPLEO_ROOT
@ -81,7 +85,7 @@
OVERCLOUD_ENDPOINT="http://$OVERCLOUD_IP:5000/v2.0"
NEW_JSON=$(jq '.overcloud.password="'${OVERCLOUD_ADMIN_PASSWORD}'" | .overcloud.endpoint="'${OVERCLOUD_ENDPOINT}'" | .overcloud.endpointhost="'${OVERCLOUD_IP}'"' $TE_DATAFILE)
echo $NEW_JSON > $TE_DATAFILE
echo $NEW_JSON &gt; $TE_DATAFILE
source ./tripleo-incubator/overcloudrc
@ -102,18 +106,28 @@
</li>
<li>
{% blocktrans %}
For <strong>Instack</strong> users you can <a data-toggle="collapse" data-target="#instack">see instructions here</a>.
<a data-toggle="collapse" data-target="#instack"><strong>Instack</strong> cloud initialization script</a>
{% endblocktrans %}
<div id="instack" class="collapse">
<pre>
#!/usr/bin/bash
set -eux
# You need to run the following commands from a Undercloud node where you have
# direct access via SSH to your Overcloud control node ({{overcloud.keystone_ip}}).
# Usually stack user has access to Overcloud control node, so switch to stack user
su stack
# Run these commands as the user you used to install the undercloud, likely the stack
# user if you followed the recommendations from http://openstack.redhat.com/Deploying_RDO_using_Instack.
# The commands should also be run from the home directory of that user.
# Source your deploy-overcloudrc
# This file was created when you followed http://openstack.redhat.com/Deploying_an_RDO_Overcloud_with_Instack
source deploy-overcloudrc
export OVERCLOUD_IP={{overcloud.keystone_ip}}
cat &gt; tripleo-overcloud-passwords &lt;&lt;EOF
export OVERCLOUD_ADMIN_TOKEN={{overcloud.attributes.AdminToken}}
export OVERCLOUD_ADMIN_PASSWORD={{overcloud.attributes.AdminPassword}}
export OVERCLOUD_CINDER_PASSWORD={{overcloud.attributes.CinderPassword}}
@ -123,6 +137,18 @@
export OVERCLOUD_NOVA_PASSWORD={{overcloud.attributes.NovaPassword}}
export OVERCLOUD_SWIFT_PASSWORD={{overcloud.attributes.SwiftPassword}}
export OVERCLOUD_SWIFT_HASH={{overcloud.attributes.SwiftHashSuffix}}
EOF
source tripleo-overcloud-passwords
JSONFILE=nodes.json
if [ ! -f $JSONFILE ]; then
echo '{}' &gt; $JSONFILE
fi
OVERCLOUD_ENDPOINT="http://{{overcloud.keystone_ip}}:5000/v2.0"
NEW_JSON=$(jq '.overcloud.password="'{{overcloud.attributes.AdminPassword}}'" | .overcloud.endpoint="'${OVERCLOUD_ENDPOINT}'" | .overcloud.endpointhost="'{{overcloud.keystone_ip}}'"' $JSONFILE)
echo $NEW_JSON &gt; $JSONFILE
export TE_DATAFILE=$JSONFILE
source /etc/tripleo/overcloudrc
@ -136,6 +162,13 @@
--swift-password $OVERCLOUD_SWIFT_PASSWORD \
--enable-horizon
keystone role-create --name heat_stack_user
# Setup the neutron
tripleo setup-neutron "" "" $NETWORK_CIDR "" "" "" $FLOATING_IP_START $FLOATING_IP_END $FLOATING_IP_CIDR
# Workaround https://bugs.launchpad.net/diskimage-builder/+bug/1211165
nova flavor-delete m1.tiny
nova flavor-create m1.tiny 1 512 2 1
</pre>
</div>
</li>