Monday, September 16, 2013

Quantum basic RDO setup (grizzly) to have original LAN as external on Fedora 19

Follow as normal http://openstack.redhat.com/Neutron-Quickstart
When done switch to eth0 per
http://unix.stackexchange.com/questions/81834/how-can-i-change-the-default-ens33-network-device-to-old-eth0-on-fedora-19

  1. Remove biosdevname if it is installed. (yum remove biosdevname)
  2. Disable the udev rule: ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
  3. Reboot
and  create under /etc/sysconfig/network-scripts
[root@localhost network-scripts]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="static"
IPADDR="192.168.1.52"
NETMASK="255.255.255.0"
DNS1="83.221.202.254"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no
ONBOOT="yes"
TYPE="OVSBridge"
DEVICETYPE="ovs"

[root@localhost network-scripts]# cat ifcfg-eth0
NAME="eth0"
HWADDR=90:E6:BA:2D:11:EB
ONBOOT="no"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no

Enable network service
REBOOT

Turn off interface eth0 , update ONBOOT="no" to ONBOOT="yes"
in ifcfg-eth0, then  restart network service





In dashboard environment delete router1 and public network.
Create router2 and internal interface to private network.

#   source keystonerc_admin
#   nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
#   nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
#   quantum net-create public --router:external=True
#   quantum subnet-create public 192.168.1.0/24 --name vlan \
     --enable_dhcp False --allocation_pool  \
     start=192.168.1.57, end=192.168.1.62  \
     --gateway 192.168.1.1
#  quantum floatingip-create public


Next step
# EXTERNAL_NETWORK_ID=`quantum net-list | grep public | awk '{ print $2 }'`
# quantum router-gateway-set router2  $EXTERNAL_NETWORK_ID
# INT_SUBNET_ID=`quantum subnet-list | grep private_subnet | awk '{ print $2}'`
# quantum subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# quantum subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1

 Router2 and internal interface to private network may be also created via CLI:

# EXTERNAL_NETWORK_ID=`quantum net-list | grep public | awk '{ print $2 }'`
# INT_SUBNET_ID=`quantum subnet-list | grep private_subnet | awk '{ print $2}'`
# SERVICE_TENANT_ID=`keystone tenant-list | grep service | awk '{ print $2}'`
# quantum router-create --name router2 --tenant-id $SERVICE_TENANT_ID router2
# quantum router-gateway-set router2  $EXTERNAL_NETWORK_ID
# quantum router-interface-add router2  $INT_SUBNET_ID
# quantum subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# quantum subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1

View  http://openstack.redhat.com/forum/discussion/196/quantum-basic-setup/p1



To make configuration persistent between reboots due to known bugs

Bug 981583 - Openstack firewall rules are not enabled after reboot
  https://bugzilla.redhat.com/show_bug.cgi?id=981583

Bug 981652 - firewalld does not cover openstack/packstack use case.     
  https://bugzilla.redhat.com/show_bug.cgi?id=981652

Run:-
 
# yum -y install iptables-services
# systemctl disable firewalld
# systemctl enable iptables








Cloud instance of Ubuntu 13.10 Server running Gnome 3.8.1 installed via  PPA    ppa:gnome3-team/gnome3 :
  1. $ sudo add-apt-repository ppa:gnome3-team/gnome3
  2. $ sudo apt-get update
  3. $sudo apt-get install gnome-shell ubuntu-gnome-desktop
View http://www.techrepublic.com/blog/linux-and-open-source/how-to-install-gnome-38-on-ubuntu/ regarding setup Gnome 3.8 on Ubuntu 13.04 (10)





Setup Windows Server 2012 evaluation cloud instance

# gunzip -cd windows_server_2012_standard_eval_kvm_20130510.qcow2.gz |
 glance image-create --property hypervisor_type=kvm --name "Windos Server2012 Std Eval"  --container-format bare --disk-format vhd


+--------------------------------------------+----------------------------------------+
| Property                              | Value                                |
+--------------------------------------------+----------------------------------------+
| Property 'hypervisor_type' | kvm                                  |
| checksum                            | 801d232ea89f74810284c88b1512a32a   
| container_format                | bare                                 |
| created_at                           | 2013-09-23T13:05:44       |
| deleted                                | False                                |
| deleted_at                           | None                                |
| disk_format                         | vhd                                   |
| id                                          | 32ae031d-3bc0-4a38-a355-f9a8fa8be6e6
| is_public                              | False                                |
| min_disk                              | 0                                       |
| min_ram                              | 0                                       |
| name                                   |  Windos Server 2012 Std Eval       

|owner                                   | f0001a9a94f741dfa1545f2682d01fde  
| protected                            | False                                 |
| size                                      | 16337731584                    |
| status                                  | active                                |
| updated_at                         | 2013-09-23T13:10:29        |
+-------------------------------------------+-----------------------------------------+

Getting password for Admin :

# nova list
+--------------------------------------+----------------+-----------+--------------------------------------------+
| ID                                    | Name      | Status  | Networks                            |
+--------------------------------------+----------------+-----------+--------------------------------------------+
| c0b65e09-7195-4c10-bce3-2c4c7aca7cea | UbuntuSRV13.10 | SUSPENDED | InternalNetwork=192.168.12.2, 192.168.1.62 |
| 019ce45c-5586-4e46-8db0-68cfc9777049 | VF19BD         | SUSPENDED | private=10.0.0.3, 192.168.1.58             |
| 59070632-c37d-4a60-8ee7-9bc4db3960ed | WinSRV2012     | SUSPENDED | private=10.0.0.4, 192.168.1.59             |
+--------------------------------------+----------------+-----------+--------------------------------------------+

# nova get-password   WinSRV2012 /home/boris/Downloads/key2.pem



Remote noVNC access to cloud instances

[root@localhost ~(keystone_admin)]# nova list
+--------------------------------------+------------+-----------+--------------------------------+
| ID                                   | Name       | Status    | Networks                       |
+--------------------------------------+------------+-----------+--------------------------------+
| 27616e5c-a08d-4c18-8366-038a03dec77c | Ubuntu1310 | ACTIVE    | private=10.0.0.6, 192.168.1.63 |
| ca57df26-ae59-4ea0-a9c3-b21b1e862947 | VF19BD     | SUSPENDED | private=10.0.0.3, 192.168.1.59 |
| d37ccd48-0ba4-4e28-aa0b-eb43deb8b948 | WinSRV2012 | ACTIVE    | private=10.0.0.5, 192.168.1.61 |
+--------------------------------------+------------+-----------+--------------------------------+
[root@localhost ~(keystone_admin)]# nova get-vnc-console 27616e5c-a08d-4c18-8366-038a03dec77c novnc
+-------+------------------------------------------------------------------------------------+
| Type  | Url                                                                                |
+-------+------------------------------------------------------------------------------------+
| novnc | http://192.168.1.145:6080/vnc_auto.html?token=8a6dbade-e4f0-4c6d-8ee7-dab8bb34fa32 |
+-------+------------------------------------------------------------------------------------+
[root@localhost ~(keystone_admin)]# nova get-vnc-console d37ccd48-0ba4-4e28-aa0b-eb43deb8b948 novnc
+-------+------------------------------------------------------------------------------------+
| Type  | Url                                                                                |
+-------+------------------------------------------------------------------------------------+
| novnc | http://192.168.1.145:6080/vnc_auto.html?token=796ef47d-ecb7-40c2-be0f-032f85afe445 |
+-------+------------------------------------------------------------------------------------+







Sunday, September 15, 2013

Quantum basic RDO setup (grizzly) to have original LAN as external on CentOS 6.4

Attempting to follow http://allthingsopen.com/2013/08/23/openstack-packstack-installation-with-external-connectivity/I've got an error after starting :-
# packstack --allinone --quantum-l3-ext-bridge=eth0
It reports that ovs port eth0 already exists. Approach bellow in general follows RDO's  discussion
at http://openstack.redhat.com/forum/discussion/196/quantum-basic-setup/p1
Follow as normal http://openstack.redhat.com/Neutron-Quickstart
When done create under /etc/sysconfig/network-scripts


[root@Server64 network-scripts]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="none"
IPADDR="192.168.1.42"
NETMASK="255.255.255.0"
DNS1="83.221.202.254"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no
ONBOOT="yes"
TYPE="OVSBridge"
DEVICETYPE="ovs"

[root@Server64 network-scripts]# cat ifcfg-eth0
DEVICE="eth0"
ONBOOT="yes"
# HWADDR="1C:C1:DE:76:19:70"
HWADDR="00:22:15:63:E4:E2"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no

Run script as root :-

for i in /etc/quantum/*.ini
do
    sed -i "s/^[# ]*ovs_use_veth.*$/ovs_use_veth = True/g" $i
done

sed -i \
    -e "s/^[# ]*enable_isolated_metadata.*$/enable_isolated_metadata = True/g" \
    -e "s/^[# ]*enable_metadata_network.*$/enable_metadata_network = True/g"  \
    /etc/quantum/dhcp_agent.ini


# chkconfig network on

REBOOT
Disable autoconnect eth0.
REBOOT

Remove old puplic (external network) and create new one as required.
Recreate router in dashboard environment and add internal interface to
private network

#   source keystonerc_admin
#   nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
#   nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
#   quantum net-create public --router:external=True
#   quantum subnet-create public 192.168.1.0/24 --name vlan --enable_dhcp False --allocation_pool start=192.168.1.57,end=192.168.1.62 \
    --  gateway 192.168.1.1
#   quantum floatingip-create public

#   quantum net-list
[root@Server64 ~(keystone_admin)]# quantum router-list
+--------------------------------------+---------+--------------------------------------------------------+
| id                                   | name    | external_gateway_info                   |
+--------------------------------------+---------+--------------------------------------------------------+
| c56c1cc1-a11b-454c-9ccb-17dc7e62f475 | router1 |
+--------------------------------------+---------+--------------------------------------------------------+

[root@Server64 ~(keystone_admin)]# quantum net-list
+--------------------------------------+---------+-----------------------------------------------------+
| id                                   | name    | subnets                                       |
+--------------------------------------+---------+-----------------------------------------------------+
| 6823b670-231c-4b31-9325-12dc098087b2 | private | 203320cc-cd60-486d-b092-eec99740c4cc 10.0.0.0/24    |
| c9615975-beb4-461a-9aad-b740a3350bf5 | public  | 40568df0-9bae-4578-8ae9-56d0ae7d4a2e 192.168.1.0/24 |
+--------------------------------------+---------+-----------------------------------------------------+

#   quantum router-gateway-set c56c1cc1-a11b-454c-9ccb-17dc7e62f475 c9615975-beb4-461a-9aad-b740a3350bf5

[root@Server64 ~(keystone_admin)]# quantum subnet-list
+--------------------------------------+----------------+----------------+--------------------------------------------------+
| id                                   | name           | cidr           | allocation_pools                                 |
+--------------------------------------+----------------+----------------+--------------------------------------------------+
| 203320cc-cd60-486d-b092-eec99740c4cc | private_subnet | 10.0.0.0/24    | {"start": "10.0.0.2", "end": "10.0.0.254"}       |
| 40568df0-9bae-4578-8ae9-56d0ae7d4a2e | vlan           | 192.168.1.0/24 | {"start": "192.168.1.57", "end": "192.168.1.62"} |
+--------------------------------------+----------------+----------------+--------------------------------------------------+

[root@Server64 ~(keystone_admin)]#  quantum subnet-update 203320cc-
cd60-486d-b092-eec99740c4cc  --dns_nameservers list=true 83.221.202.254
Updated subnet: 203320cc-cd60-486d-b092-eec99740c4cc

[root@RServer64 ~(keystone_admin)]#  quantum subnet-update 203320cc-cd60-486d-b092-eec99740c4cc  --gateway_ip 10.0.0.1
Updated subnet: 203320cc-cd60-486d-b092-eec99740c4cc


 In other way it may look like :-

# EXTERNAL_NETWORK_ID=`quantum net-list | grep public | awk '{ print $2 }'`
# quantum router-gateway-set router1 $EXTERNAL_NETWORK_ID
# INT_SUBNET_ID=`quantum subnet-list | grep private_subnet | awk '{ print $2}'`
# quantum subnet-update $INT_SUBNET_ID --dns_nameservers list=true 83.221.202.254
# quantum subnet-update $INT_SUBNET_ID --gateway_ip 10.0.0.1














References
1.http://openstack.redhat.com/forum/discussion/196/quantum-basic-setup