Saturday, September 24, 2016

TripleO Master Branch Overcloud deployment via QuickStart

Following bellow is set of instructions required to perform TripleoO QuickStart
deployment  for release "master"  It differs a bit from testing default release
"mitaka" . First on  F24(23)  workstation.

Git clone repo bellow :-
[jon@fedora24wks release]$   git clone https://github.com/openstack/tripleo-quickstart
[jon@fedora24wks release]$  cd tripleo* ; cd ./config/release

**********************************************
Now verify that master.yml is here.
**********************************************
[jon@fedora24wks release]$ cat master.yml
release: master
undercloud_image_url: http://buildlogs.centos.org/centos/7/cloud/x86_64/tripleo_images/master/delorean/undercloud.qcow2
overcloud_image_url: http://buildlogs.centos.org/centos/7/cloud/x86_64/tripleo_images/master/delorean/overcloud-full.tar
ipa_image_url: http://buildlogs.centos.org/centos/7/cloud/x86_64/tripleo_images/master/delorean/ironic-python-agent.tar

Launch browser to mentioned above location


Now proceed as follows :-

# put your own IP here
[jon@fedora24wks tripleo-quickstart]$ export VIRTHOST=192.168.1.74 
[jon@fedora24wks tripleo-quickstart]$ ssh-copy-id root@$VIRTHOST
[jon@fedora24wks tripleo-quickstart]$ ssh root@$VIRTHOST uname -a
[jon@fedora24wks tripleo-quickstart]$ bash quickstart.sh \
   -R master $VIRTHOST
[jon@fedora24wks tripleo-quickstart]$ ssh -F \
     /home/jon/.quickstart/ssh.config.ansible \
     undercloud

******************************************************************************** 
Now you are logged into undecloud VM running on VIRTHOST as stack
Building overcloud images is skipped due to QuickStart CI. There is no harm in attempt of building them. It will take a second, they are already there.
********************************************************************************
# Upload per-built overcloud images 
[stack@undercloud ~]$ source stackrc 
[stack@undercloud ~]$ openstack overcloud image upload
[stack@undercloud ~]$ openstack baremetal import instackenv.json
[stack@undercloud ~]$ openstack baremetal configure boot
[stack@undercloud ~]$ openstack baremetal introspection bulk start
[stack@undercloud ~]$ ironic node-list
[stack@undercloud ~]$ neutron subnet-list 
[stack@undercloud ~]$ neutron subnet-update 1b7d82e5-0bf1-4ba5-8008-4aa402598065 \
                         --dns-nameserver 8.8.8.8
 *************************************
 Create external interface vlan10
 *************************************

 [stack@undercloud ~]$  sudo vi /etc/sysconfig/network-scripts/ifcfg-vlan10
  DEVICE=vlan10
  ONBOOT=yes
  DEVICETYPE=ovs
  TYPE=OVSIntPort
  BOOTPROTO=static
   IPADDR=10.0.0.1
   NETMASK=255.255.255.0
   OVS_BRIDGE=br-ctlplane
   OVS_OPTIONS="tag=10"

 [stack@undercloud ~]$ sudo ifup vlan10

 [stack@undercloud ~]$ sudo ovs-vsctl show
 7011423b-55c8-4943-9d7d-94f052a4b6f1
    Manager "ptcp:6640:127.0.0.1"
        is_connected: true
    Bridge br-int
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port "tapb54de3dd-24"
            tag: 1
            Interface "tapb54de3dd-24"
                type: internal
        Port int-br-ctlplane
            Interface int-br-ctlplane
                type: patch
                options: {peer=phy-br-ctlplane}
        Port br-int
            Interface br-int
                type: internal
    Bridge br-ctlplane
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port br-ctlplane
            Interface br-ctlplane
                type: internal
        Port "vlan10"
            tag: 10
            Interface "vlan10"
                type: internal
        Port phy-br-ctlplane
            Interface phy-br-ctlplane
                type: patch
                options: {peer=int-br-ctlplane}
        Port "eth1"
            Interface "eth1"
    ovs_version: "2.5.0"

********************************************* 
Create manually network_env.yaml
*********************************************
    [stack@instack ~]$vi network_env.yaml
   {
    "parameter_defaults": {
        "ControlPlaneDefaultRoute": "192.0.2.1",
        "ControlPlaneSubnetCidr": "24",
        "DnsServers": [
            "192.168.122.1"
        ],
        "EC2MetadataIp": "192.0.2.1",
        "ExternalAllocationPools": [
            {
                "end": "10.0.0.250",
                "start": "10.0.0.4"
            }
        ],
        "ExternalNetCidr": "10.0.0.1/24",
        "NeutronExternalNetworkBridge": ""
    }
   }

$ sudo iptables -A BOOTSTACK_MASQ -s 10.0.0.0/24 ! -d 10.0.0.0/24 -j MASQUERADE -t nat

[stack@undercloud ~]$ sudo touch -f \
     /usr/share/openstack-tripleo-heat-templates/puppet/post.yaml
[stack@undercloud ~]$ cat overcloud-deploy.sh
#!/bin/bash -x
source /home/stack/stackrc
openstack overcloud deploy \
 --libvirt-type qemu \
 --ntp-server pool.ntp.org \
 --templates /usr/share/openstack-tripleo-heat-templates \
 -e  /usr/share/openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml \
 -e  /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
 -e /usr/share/openstack-tripleo-heat-templates/environments/net-single-nic-with-vlans.yaml \
 -e  $HOME/network_env.yaml \
 --control-scale 1 --compute-scale 1 
[stack@undercloud ~]$ ./overcloud-deploy.sh
[stack@undercloud ~]$ sudo route add -net 192.0.2.0/24 gw 192.0.2.1
[stack@undercloud ~]$ sudo ip route
 default via 192.168.23.1 dev eth0 
 10.0.0.0/24 dev vlan10  proto kernel  scope link  src 10.0.0.1 
 192.0.2.0/24 via 192.0.2.1 dev br-ctlplane  scope link 
 192.0.2.0/24 dev br-ctlplane  proto kernel  scope link  src 192.0.2.1 
 192.168.23.0/24 dev eth0  proto kernel  scope link  src 192.168.23.28 
 192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1 
   
[stack@undercloud ~]$ source stackrc
[stack@undercloud ~]$ nova list
+--------------------------------------+-------------------------+--------+------------+-------------+---------------------+
| ID                                   | Name                    | Status | Task State | Power State | Networks            |
+--------------------------------------+-------------------------+--------+------------+-------------+---------------------+
| 607034d9-22c5-4f8f-a192-487b732f80aa | overcloud-controller-0  | ACTIVE | -          | Running     | ctlplane=192.0.2.16 |
| 15ddf8be-e9c0-4ea8-9a2f-52eb98663669 | overcloud-novacompute-0 | ACTIVE | -          | Running     | ctlplane=192.0.2.11 |
+--------------------------------------+-------------------------+--------+------------+-------------+---------------------+
[stack@undercloud ~]$ openstack stack list
WARNING: openstackclient.common.utils is deprecated and will be removed after Jun 2017. Please use osc_lib.utils
+------------------------+------------+-----------------+----------------------+--------------+
| ID                     | Stack Name | Stack Status    | Creation Time        | Updated Time |
+------------------------+------------+-----------------+----------------------+--------------+
| a2193f65-bac7-458f-    | overcloud  | CREATE_COMPLETE | 2016-09-24T10:49:16Z | None         |
| 8eef-8daf909fa41f      |            |                 |                      |              |
+------------------------+------------+-----------------+----------------------+--------------+ 

Now connect to overcloud via sshuttle running on F24 WKS , starting in separate
terminal on WKS :-
$ sshuttle -e "ssh -F $HOME/.quickstart/ssh.config.ansible" -r undercloud  -v 10.0.0.0/24