Friday, February 19, 2016

openstack in cirros with devstack

Openstack Single Node Deployment with Devstack

Devstack allows to deploy OpenStack infrastructure on a single VM or physical machine to test some hacks before facing the beast.
To summarize what you'll be going through, four main steps are needed:

1-Clone the Devstack Git repository
2-Configure local.conf (Optional)
3-Install with ./script.sh
4-Launch a Cirros instance
5-Access the launched instance
6-Launch Devstack after rebooting
tl;dr: at the end of this tutorial, you'll be able to access a Cirros instance launched on devstack, the whole environment being deployed on a VMware Workstation 10 VM. The Networking is based on nova-network (flat networking as opposed to VLAN networking). The configuration is done via Horizon Dashboard.

Cirros Instance on Devstack
 Hark!


VMware Workstation virtual machine configuration:

Update and upgrade the freshly installed Ubuntu 12.04 system:

Install Git:

Clone the Devstack repo:

Move into the devstack directory:

Check the host IP:


Create a local.conf file:
Launch stack.sh:
 
If the installation fails, re-run ./stack.sh script. If you receive the following message, run ./unstack.sh then ./stack.sh:
Check the network interfaces:
Launch the Horizon dashboard and login as admin/devstack:
 Display Access&Security tab and create a new Security group:
 This new group will allow ping and ssh to the instance: 
 Select Manage Rules:
 Add the adequate rules:
 Add the ICMP rule:
 Add the SSH rule:
 Check the rules:
Access the Access&Security tab again to create a key pair:
Generate a new key pair to use when you ssh to the instance:
Save the key pair:
Check the newly created key pair:
Manage floating IPs:
Allocate floating IP to project:
Check the allocated public pool:
Access the instances tab to create a new VM:
Configure the instance details:
Configure the security group and key pair associated with the VM the click launch:
Check the newly launched instance:
Let's take a look at the networking at this point (see Understanding FlatNetworking for more details):
 
Let's check the br001 interface details:
The eth0 IP address belongs to the local network IP address space:
Associate a floating IP:
The instance have now the IP associated:
Access the VM console:
SSH into the VM with cirros username and cubswin:) password:
First attempt to SSH with the key pair fails due to permissions 0644 being "too open":
 Second attempt with different permissions:
Let's ping the outside world from the Cirros instance:
The ping journey (see Network Troubleshooting for more details):
The vnet interface details:
The virbr0 interface (See Network Management Architecture for more details)
Compute resources overview tab:
After a reboot, move into the devstack directory and launch ./rejoin_stack.sh script

No comments:

Post a Comment

AI & M L Lab - 18CSL76

  Lab programmes: View