Tuskar/Instack
< Tuskar
Contents
Using Tuskar and Tuskar-UI with instack
Installing from source
Follow steps in https://github.com/agroup/instack-undercloud/blob/master/README-source.md
Create ssh tunnel so you can access Tuskar UI from you machine, example:
# 192.168.122.215 is undercloud ip # ibm-x3550m4-07.lab.eng.brq.redhat.com is lab addr # Tuskar-UI be accessible on localhost:8045 in your browser ssh -L 8045:192.168.122.215:80 root@ibm-x3550m4-07.lab.eng.brq.redhat.com
Installing, Updating and testing Overcloud from CLI
# after you install Undercloud, deploy Overcloud using this: export CONTROLSCALE=1 export COMPUTESCALE=1 export BLOCKSTORAGESCALE=0 export SWIFTSTORAGESCALE=0 source deploy-overcloudrc source tripleo-undercloud-passwords source stackrc source instack-undercloud/deploy-virt-overcloudrc source instack-undercloud/instack-sourcerc instack-deploy-overcloud --tuskar
# And run this for stack-update: export BLOCKSTORAGESCALE=1 export SWIFTSTORAGESCALE=1 instack-update-overcloud --tuskar
# Run tests of Overcloud instack-test-overcloud
# if you want to verify Overcloud with CLI, run this: source stackrc source tripleo-overcloud-passwords OVERCLOUD_ENDPOINT=$(heat output-show overcloud KeystoneURL|sed 's/^"\(.*\)"$/\1/') export OVERCLOUD_IP=$(echo $OVERCLOUD_ENDPOINT | awk -F '[/:]' '{print $4}') export no_proxy=${no_proxy:-""} export no_proxy=$no_proxy,$OVERCLOUD_IP NEW_JSON=$(jq '.overcloud.password="'${OVERCLOUD_ADMIN_PASSWORD}'" | .overcloud.endpoint="'${OVERCLOUD_ENDPOINT}'" | .overcloud.endpointhost="'${OVERCLOUD_IP}'"' $NODES_JSON) echo $NEW_JSON > $NODES_JSON export TE_DATAFILE=$NODES_JSON source tripleo-incubator/overcloudrc
Installing from UI and testing Overcloud from CLI
# after you deploy and initialize overcloud from UI OVERCLOUD_ADMIN_PASSWORD=<the one from UI overview page> export NODES_JSON=${NODES_JSON:-"instackenv.json"}
source stackrc OVERCLOUD_ENDPOINT=$(heat output-show overcloud KeystoneURL|sed 's/^"\(.*\)"$/\1/') export OVERCLOUD_IP=$(echo $OVERCLOUD_ENDPOINT | awk -F '[/:]' '{print $4}')
touch ~/.ssh/known_hosts chmod 600 ~/.ssh/known_hosts ssh-keygen -R $OVERCLOUD_IP
export no_proxy=${no_proxy:-""} export no_proxy=$no_proxy,$OVERCLOUD_IP
NEW_JSON=$(jq '.overcloud.password="'${OVERCLOUD_ADMIN_PASSWORD}'" | .overcloud.endpoint="'${OVERCLOUD_ENDPOINT}'" | .overcloud.endpointhost="'${OVERCLOUD_IP}'"' $NODES_JSON)
echo $NEW_JSON > $NODES_JSON
export TE_DATAFILE=$NODES_JSON source /home/stack/tripleo-incubator/overcloudrc nova flavor-create m1.demo auto 512 10 1 # TODO(lsmola) are those passwords used anywhere tripleo setup-overcloud-passwords -o tripleo-overcloud-passwords instack-test-overcloud
Running TuskaUI in development mode
For development it's better to install Horizon and Tuskar-UI on your lab, so you don't have to reinstall it every time you reinstall Instack.
# Install Tuskar-UI and Horizon on your lab, follow: http://tuskar-ui.readthedocs.org/en/latest/install.html
# Set routes, rerun this every-time Undercloud IP changes BM_NETWORK_CIDR=192.0.2.0/24 ROUTE_DEV=virbr0 SEED_IP=libvirt default network ip of instack vm (undercloud VM) ip route replace $BM_NETWORK_CIDR dev $ROUTE_DEV via $SEED_IP
# In horizon local_settings set: OPENSTACK_HOST="192.0.2.1" OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_" IRONIC_DISCOVERD_URL = "http://%s:5050" % OPENSTACK_HOST UNDERCLOUD_ADMIN_PASSWORD = "yourOS_PASSWORDfromstackrc"
# Run horizon manually tools/with_venv.sh ./manage.py runserver 0.0.0.0:8320
# Either allow the Horizon port in firewall or setup ssh tunnel ssh -L 8330:localhost:8320 root@ibm-x3550m4-07.lab.eng.brq.redhat.com
# Go to browser on localhost:8330
Connecting to Undercloud from external place (e.g. your laptop)
# Run this on your LAB MACHINE. # Set routes on your lab machine, rerun this every-time Undercloud IP changes BM_NETWORK_CIDR=192.0.2.0/24 ROUTE_DEV=virbr0 SEED_IP=libvirt default network ip of instack vm (undercloud VM) ip route replace $BM_NETWORK_CIDR dev $ROUTE_DEV via $SEED_IP
# Run all below on your LAPTOP. # Address of your lab machine or VM that holds undercloud VM inside export VIRT_IP=192.168.1.113 # IP that is listed in keystone endpoint-list for all your endpoints export UNDERCLOUD_IP=192.168.122.194
# Routing IP address from keystone to localhost iptables -t nat -A OUTPUT -d $UNDERCLOUD_IP -j DNAT --to-destination 127.0.0.1
# Create ssh tunnels ssh stack@$VIRT_IP -L 8774:$UNDERCLOUD_IP:8774 -L 9292:$UNDERCLOUD_IP:9292 -L 8777:$UNDERCLOUD_IP:8777 -L 9696:$UNDERCLOUD_IP:9696 -L 6385:$UNDERCLOUD_IP:6385 -L 8004:$UNDERCLOUD_IP:8004 -L 5000:$UNDERCLOUD_IP:5000 -L 8585:$UNDERCLOUD_IP:8585 -L 35357:$UNDERCLOUD_IP:35357
# Test you can connect to the following locally
curl http://127.0.0.1:8774/v2/ curl http://127.0.0.1:9292/ curl http://127.0.0.1:8777/ curl http://127.0.0.1:9696/ curl http://127.0.0.1:6385/ curl http://127.0.0.1:8004/v1/ curl http://127.0.0.1:5000/v2.0 curl http://127.0.0.1:8774/v3
# You may see authentication errors for some of them. As long as they are reachable that's ok.
# try it if NAT works, e.g: curl http://192.0.2.1:5000/
# try it with python client locally pip install python-glanceclient # copy your stackrc from server source stackrc glance image-list