Tuskar/Instack

NOTE: This page is outdated. Please use [1] instead to setup instack.

[1] https://repos.fedorapeople.org/repos/openstack-m/instack-undercloud/html/

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: ssh -L 8045:192.168.122.215:80 root@ibm-x3550m4-07.lab.eng.brq.redhat.com
 * 1) 192.168.122.215 is undercloud ip
 * 2) ibm-x3550m4-07.lab.eng.brq.redhat.com is lab addr
 * 3) Tuskar-UI be accessible on localhost:8045 in your browser

Installing, Updating and testing Overcloud from CLI
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
 * 1) after you install Undercloud, deploy Overcloud using this:

export BLOCKSTORAGESCALE=1 export SWIFTSTORAGESCALE=1 instack-update-overcloud --tuskar
 * 1) And run this for stack-update:

instack-test-overcloud
 * 1) Run tests of Overcloud

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
 * 1) if you want to verify Overcloud with CLI, run this:

Installing from UI and testing Overcloud from CLI
OVERCLOUD_ADMIN_PASSWORD= export NODES_JSON=${NODES_JSON:-"instackenv.json"}
 * 1) after you deploy and initialize overcloud from UI

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 tripleo setup-overcloud-passwords -o tripleo-overcloud-passwords instack-test-overcloud
 * 1) TODO(lsmola) are those passwords used anywhere

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.

http://tuskar-ui.readthedocs.org/en/latest/install.html
 * 1) Install Tuskar-UI and Horizon on your lab, follow:

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
 * 1) Set routes, rerun this every-time Undercloud IP changes

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" DEPLOYMENT_MODE = "scale"
 * 1) In horizon local_settings set:

tools/with_venv.sh ./manage.py runserver 0.0.0.0:8320
 * 1) Run horizon manually

ssh -L 8330:localhost:8320 root@ibm-x3550m4-07.lab.eng.brq.redhat.com
 * 1) Either allow the Horizon port in firewall or setup ssh tunnel


 * 1) Go to browser on localhost:8330

Connecting to Undercloud from external place (e.g. your laptop)
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
 * 1) Run this on your LAB MACHINE.
 * 2) Set routes on your lab machine, rerun this every-time Undercloud IP changes

export VIRT_IP=192.168.1.113 export UNDERCLOUD_IP=192.168.122.194
 * 1) Run all below on your LAPTOP.
 * 2) Address of your lab machine or VM that holds undercloud VM inside
 * 1) IP that is listed in keystone endpoint-list for all your endpoints

iptables -t nat -A OUTPUT -d $UNDERCLOUD_IP -j DNAT --to-destination 127.0.0.1
 * 1) Routing IP address from keystone to localhost

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
 * 1) Create ssh tunnels

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
 * 1) Test you can connect to the following locally
 * 1) You may see authentication errors for some of them. As long as they are reachable that's ok.

curl http://192.0.2.1:5000/
 * 1) try it if NAT works, e.g:

pip install python-glanceclient source stackrc glance image-list
 * 1) try it with python client locally
 * 1) copy your stackrc from server

Connecting to Overcloud and Undercloud from external place (e.g. your laptop)
ROUTE_DEV=virbr0 VIRT_IP=192.168.122.197 #real undercloud VM IP BM_NETWORK_CIDR=192.0.2.1/32 ip route replace $BM_NETWORK_CIDR dev $ROUTE_DEV via $VIRT_IP
 * 1) UNDERCLOUD
 * 2) from lab

VIRT_IP= UNDERCLOUD_IP=192.0.2.1 sudo iptables -t nat -A OUTPUT -d $UNDERCLOUD_IP -j DNAT --to-destination 127.0.0.1 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
 * 1) from laptop

VIRT_IP=192.168.122.197 #real undercloud VM IP OVERCLOUD_IP=192.0.2.5 ssh stack@$VIRT_IP -L 8774:$OVERCLOUD_IP:8774 -L 9696:$OVERCLOUD_IP:9696 -L 9292:$OVERCLOUD_IP:9292 -L 8776:$OVERCLOUD_IP:8776 -L 8773:$OVERCLOUD_IP:8773 -L 8004:$OVERCLOUD_IP:8004 -L 5000:$OVERCLOUD_IP:5000 -L 8080:$OVERCLOUD_IP:8080 -L 35357:$OVERCLOUD_IP:35357
 * 1) OVERCLOUD
 * 2) from lab

UNDERCLOUD_IP= OVERCLOUD_IP=127.0.0.1 KEYSTONE_OVERCLOUD_IP=192.0.2.5 LOCALHOST_IP=192.168.100.1 # anything other than localhost, either create fake interface or hook it to some existing, e.g. virb0 sudo iptables -t nat -A OUTPUT -d $KEYSTONE_OVERCLOUD_IP -j DNAT --to-destination $LOCALHOST_IP ssh stack@$UNDERCLOUD_IP -L $LOCALHOST_IP:8774:$OVERCLOUD_IP:8774 -L $LOCALHOST_IP:9696:$OVERCLOUD_IP:9696 -L $LOCALHOST_IP:9292:$OVERCLOUD_IP:9292 -L $LOCALHOST_IP:8776:$OVERCLOUD_IP:8776 -L $LOCALHOST_IP:8773:$OVERCLOUD_IP:8773 -L $LOCALHOST_IP:8004:$OVERCLOUD_IP:8004 -L $LOCALHOST_IP:5000:$OVERCLOUD_IP:5000 -L $LOCALHOST_IP:8080:$OVERCLOUD_IP:8080 -L $LOCALHOST_IP:35357:$OVERCLOUD_IP:35357
 * 1) from laptop