From Grid5000
Deploy OpenStack Cloud on grid5000, tests differents networks methods.
For a fully automated deployment see OpenStack deployment.
Documentation
Deploy OpenStack Cloud on Grid'5000
- Make a reservation (kavlan-local).
| frontend:
| oarsub -t deploy -l {"type='kavlan-local'"}/vlan=1+/nodes=3,walltime=09:10:00 -I
|
- Copy your private ssh keys.
| frontend:
| scp .ssh/id_dsa* root@graphene-74-kavlan-2:~/.ssh/
|
- Create a ssh tunnel for installation of nova packages, tunnel is created to
kavlan-{1,2,3} gateway.
| node:
| ssh -NL 8080:proxy:3128 sbadia@192.168.223.254
|
- Install packages (use tunnel).
| node:
| apt-get -o 'Acquire::http::Proxy="http://localhost:8080"' dist-upgrade
|
Fully automatic deployment
| Note
|
A script to deploy fully automatically is being written. (User:Sbadia git.sebian.fr:openstack.git).
|
Semi-Automatic deployment
| frontend:
|
|
Deploy cloud controller
| Note
|
Network remember for this documentation
- Cloud controller+Compute: 192.168.210.74/20, gw 192.168.223.254
- Compute: 192.168.210.75/20, gw 192.168.223.254
- OpenStack net: 10.0.0.0/12
- g5k net: 10.0.0.0/24
|
| cloud-ctrl:
| bash nova-install-kavlan -t cloud
|
Questions
- Cloud Controller host IP address
192.168.210.74
- S3 host IP address
192.168.210.74
- RabbitMQ host IP address
192.168.210.74
- MySQL host IP address
192.168.210.74
- Enter this machine's IP address :
192.168.210.74
- Enter this machine's broadcast address :
192.168.223.255
- Enter this machine's netmask :
255.255.240.0
- Enter this machine's gateway :
192.168.223.254
- Enter this machine's DNS nameserver address :
192.168.223.254
- Network range for ALL projects (normally x.x.x.x/12):
10.0.0.0/12
- Total amount of usable IPs for ALL projects:
1048574
- User name for the project administrator:
seb
- Name for the project:
g5k
- Desired network range for the 'g5k' project (normally x.x.x.x/24):
10.0.0.0/24
- How many networks for the 'g5k' project:
1
- How many available IPs per 'g5k' project network:
254
Configurations
| cloud-ctrl:
| cat /etc/nova/nova.conf
|
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--force_dhcp_release=True
--use_deprecated_auth
--iscsi_helper=tgtadm
--verbose
--s3_host=192.168.210.74
--rabbit_host=192.168.210.74
--cc_host=192.168.210.74
--ec2_url=http://192.168.210.74:8773/services/Cloud
--fixed_range=10.0.0.0/12
--network_size=1048574
--FAKE_subdomain=ec2
--routing_source_ip=192.168.210.74
--verbose
--sql_connection=mysql://root:nova@192.168.210.74/nova
--network_manager=nova.network.manager.FlatDHCPManager
--flat_network_dhcp_start=10.0.0.2
| Warning
|
Change FlatManager to FlatDHCPManager
|
| cloud-ctrl:
| cat /etc/nova/nova-compute.conf
|
--libvirt_type=kvm
| cloud-ctrl:
| cat /etc/network/interfaces
|
# The loopback network interface
auto lo
iface lo inet loopback
auto br100
iface br100 inet static
bridge_ports eth0
bridge_stp off
bridge_maxwait 0
bridge_fd 0
address 192.168.210.74
netmask 255.255.240.0
broadcast 192.168.223.255
gateway 192.168.223.254
dns-nameservers 192.168.223.254
Deploy compute node
Questions
- Use ip address of controller node (installed before).
- Use mysql passwd of controler node.
Configurations
Network configuration
| compute:
| cat /etc/network/interfaces
|
# The loopback network interface
auto lo
iface lo inet loopback
auto br100
iface br100 inet static
bridge_ports eth0
bridge_stp off
bridge_maxwait 0
bridge_fd 0
address 192.168.210.75
netmask 255.255.240.0
broadcast 192.168.223.255
gateway 192.168.223.254
dns-nameservers 192.168.223.254
Nova compute config
| Warning
|
Change FlatManager to FlatDHCPManager
|
| compute:
| cat /etc/nova/nova.conf
|
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--force_dhcp_release=True
--use_deprecated_auth
--iscsi_helper=tgtadm
--verbose
--s3_host=192.168.210.74
--rabbit_host=192.168.210.74
--cc_host=192.168.210.74
--ec2_url=http://192.168.210.74:8773/services/Cloud
--sql_connection=mysql://root:nova@192.168.210.74/nova
--network_manager=nova.network.manager.FlatDHCPManager
--flat_network_dhcp_start=10.0.0.2
Virtualisation
| compute:
| cat /etc/nova/nova-compute.conf
|
--libvirt_type=kvm
Play with your new deployed cloud
| cloud-ctrl:
| for i in nova-api nova-compute nova-network nova-objectstore nova-scheduler;do service $i restart;done
|
| Note
|
Glance test an request to ip "169.254.169.254" just redirect all this requests to your controller ;)
| cloud-ctrl:
| iptables -t nat -A PREROUTING -d 169.254.169.254/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.210.74:8773
|
|
Security
Credentials
| cloud-ctrl:
| cp creds/novacreds.zip . && unzip novacreds.zip && . novarc
|
Keypairs
| cloud-ctrl:
| cp cert.pem seb
|
| cloud-ctrl:
| euca-add-keypair seb
|
| cloud-ctrl:
| euca-describe-keypairs
|
KEYPAIR seb a3:db:45:73:d9:fa:f3:e2:2a:0f:0f:1e:f8:b3:b6:9d
Publish tarball/images
| cloud-ctrl:
| scp ~/sbadia/public/ubuntu1010-UEC-localuser-image.tar.gz root@graphene-27-kavlan-1:/tmp
|
| cloud-ctrl:
| uec-publish-tarball /tmp/ubuntu1010-UEC-localuser-image.tar.gz ubuntu x86_64
|
| cloud-ctrl:
| euca-describe-images
|
IMAGE ami-00000002 ubuntu/maverick-server-uec-amd64.img.manifest.xml available private x86_64 machine aki-00000001 instance-store
IMAGE aki-00000001 ubuntu/maverick-server-uec-amd64-vmlinuz-virtual.manifest.xml available private x86_64 kernel instance-store
Run an instance
| cloud-ctrl:
| euca-run-instances ami-00000002 -k seb -t m1.tiny
|
Test your running instance
- Get the output (boot steps)
| cloud-ctrl:
| euca-get-console-output i-00000001
|
- Euca-run-instances give an ip address, so tests it ;)
| cloud-ctrl:
| ping 10.0.0.2
|
| cloud-ctrl:
|
|
Starting Nmap 5.21 ( http://nmap.org ) at 2011-11-21 17:55 CET
Nmap scan report for 10.0.0.2
Host is up (0.0012s latency).
Not shown: 999 closed ports
PORT STATE SERVICE
22/tcp open ssh
MAC Address: 02:16:3E:0A:D2:E3 (Unknown)
| cloud-ctrl:
| ssh ubuntu@10.0.0.2 (pass: ubuntu)
|
| server-1:
| uname -a
|
Linux server-1 2.6.35-24-virtual #42-Ubuntu SMP Thu Dec 2 05:15:26 UTC 2010 x86_64 GNU/Linux
| server-1:
| route -n
|
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 10.0.0.1 0.0.0.0 UG 100 0 0 eth0
| server-1:
| ifconfig
|
eth0 Link encap:Ethernet HWaddr 02:16:3e:5d:1b:5d
inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::16:3eff:fe5d:1b5d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:476 errors:0 dropped:0 overruns:0 frame:0
TX packets:422 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:59626 (59.6 KB) TX bytes:61460 (61.4 KB)
Interrupt:11 Base address:0x8000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
| server-1:
| ping 10.0.0.1
|
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_req=1 ttl=64 time=0.342 ms
64 bytes from 10.0.0.1: icmp_req=2 ttl=64 time=0.332 ms
^C
--- 10.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.332/0.337/0.342/0.005 ms
Display instances
| cloud-ctrl:
| euca-describe-instances
|
RESERVATION r-a1wir1cy g5k default
INSTANCE i-00000003 ami-00000002 10.0.0.4 10.0.0.4 running seb (g5k, graphene-75-kavlan-2.nancy.grid5000.fr) 0 m1.tiny 2011-11-21T16:23:32Z nova aki-00000001 ami-00000000
RESERVATION r-h110503j g5k default
INSTANCE i-00000002 ami-00000002 10.0.0.3 10.0.0.3 running seb (g5k, graphene-74-kavlan-2.nancy.grid5000.fr) 0 m1.tiny 2011-11-21T16:12:12Z nova aki-00000001 ami-00000000
RESERVATION r-jxlgjlx4 g5k default
INSTANCE i-00000001 ami-00000002 10.0.0.2 10.0.0.2 running seb (g5k, graphene-74-kavlan-2.nancy.grid5000.fr) 0 m1.tiny 2011-11-21T16:11:02Z nova aki-00000001 ami-00000000
| Note
|
For decode ;)
- Reservation:
- Id: r-a1wir1cy
- Project: g5k
- Zone: default
- Instance:
- Id: i-00000003
- Image: ami-00000002
- Ip address: 10.0.0.4
- State: running
- Owner: seb
- Project, compute node (running on): g5k, graphene-75-kavlan-2.nancy.grid5000.fr
- Type and date: m1.tiny 2011-11-21T16:23:32Z
- Kernel and intrd: aki-00000001, ami-00000000
|
Stop instance
| cloud-ctrl:
| euca-stop-instances i-00000005
|