Launch an Instance from OpenStack (Liberty) Dashboard

To Launch an instance from OpenStack dashboard, first we need to finish following steps :
  • Create a Project and add a member to the Project.
  • Create a Image and Flavor
  • Create a Network and Router for a Project.
In my Case i will use Project Name as “Innovation” and linuxtechi as Project Member of Innovation.
  • Internal Network = 10.10.10.0/24
  • External Network or Floating IP Network = 192.168.1.0/24
  • Gateway of External Network = 192.168.1.1

Create a Project and add a member to the Project.

Login to the dashboard using Admin credentials and Go to Identity Tab –> Projects and Click on Create Project.
Create-Projects-OpenStack-Dashboard
Click on “Create Project” , We can also set the Quota for the project from Quota Tab.
To create Users , Go to Identify Tab–> Users–> Click on ‘Create User’
In my case i have specify the followings :
  • User Name = linuxtechi
  • email = linuxtechi@example.com
  • password = xxxxxx
  • Primary Project = innovation
  • Role = member
Create-Users-OpenStack-Dashboard

Create a flavor and image :

To create a flavor login in dashboard using admin credentials , Go to Admin Tab –> Flavors –> Click on create Flavor.
Flavors-OpenStack-Dashboard
Specify the Flavor Name (fedora.small) , VCPU , Root Disk , Ephemeral Disk & Swap disk.
Create-Flavors-OpenStack-Dashboard
To Create Image , Go to Admin Tab –> Images—> Click on Create Image.
Specify the Image Name , Description, Image Soure ( in my case i am using Image File as i have already downloaded the Fedora 23 Cloud Image ) , Format QCOW2
Create-Images-OpenStack Dashboard

Create Network and Router for Project Innovation.

To create Network and router for Innovation project sign out of admin user and login as “linuxtechi” user in dashboard.
Go to the Network Tab —> Click on Networks —> then Click on Create Network
Specify the Network Name as Internal
internal-network-name-openstack
click on Next..
Specify the Subnet name (sub-internal) and Network Address (10.10.0.0/24)
internal-subnet-name-openstack
Click on Next..
click-create-internal-network-openstack
VMs will be getting internal ip from DHCP Server because we enable DHCP option for internal network.
Now Create External Network . Click on “Create Network” again , Specify Network Name as “external
external-network-openstack-dashboard
Click on Next…
Specify subnet Name as “sub-external” & Network Address as “192.168.1.0/24
subnet-name-external-name-openstack
Click on Next
Untick  “Enable DHCP” option and Specify the ip address pool for external network.
ipaddress-pool-external-network-openstack
Click on Create.
Now time to create a Router.
Go To Network Tab –> Routers –> Click on ‘+ Create Router’
create-router-openstack
Now Mark External network as “External” , this task can be completed only from admin user , so logout from linuxtechi user and login as admin.
Go to Admin Tab —> Networks–> Click on Edit Network for “External”
Set-External-Networks-OpenStack-Dashboard
Click on Save Changes
Now Logout from admin user and login as linuxtechi user.
Go to Network Tab —> Routers –> for Router1 click on “Set Gateway”
Set-Gateway-Router-OpenStack-Dashboard
Click on “Set Gateway” , this will add a interface on router and will assign the first ip of external subnet (192.168.1.0/24).
Add internal interface to router as well , Click on the “router1″ and select on “interfaces” and then click on “Add interface”
Add-internal-interface-router-OpenStack-Dashboard
Click on Add interface.
Network Part is completed Now & we can view Network Topology from “Network Topology” Tab
Network-Topology-OpenStack-Dashboard
Now Create a key pair that will be used for accessing the VM and define the Security firewall rules.
For creating a key pair
Go to ‘Access & Security’  Tab —> Click on Key Pairs –> then click on ‘Create Key Pair
Access-security-OpenStack-Dashboard
It will create a Key pair with name “myssh-keys.pem
Add a new Security Group with name ‘fedora-rules’ from Access & Security Tab. Allow 22 and ICMP from Internet ( 0.0.0.0 ).
Security-Group-OpenStack-Dashboard
Once the Security Group ‘fedora-rules’ created , click on Manage Rules and allow 22 & ICMP ping.
Manage-Security-Group-Rules-OpenStack Dashboard
Click on Add , Similarly add a rule for ICMP.

Now Finally it’s time to Launch an instance.

Go to Compute Tab –> Click on Instances –> then click on ‘Launch Instance’
Instances-Details-OpenStack-Dashboard
Specify the Instance Name , Flavor that we created in above steps and ‘Boot from image’ from Instance Boot Source option and Select Image Name ‘fedora-image’.
Click on ‘Access & Security’ and Select the Security Group ‘fedora-rules’ & Key Pair ”myssh-keys
Instances-Security-group-keypair-OpenStack-Dashboard
Now Select Networking and add ‘Internal’ Network and the Click on Launch ….
Instances-Network-OpenStack-Dashboard
Once the VM is launched , Associate a floating ip so that we can access the VM.
Associate-floating-ip-Instances-OpenStack-Dashboard
Click on ‘Associate Floating IP
Allocating-floating-OpenStack Dashboard
Click on Allocate IP.
Associate-floating-ip-instance-OpenStack-Dashboard
Click on Associate
Instances-internal-floating-OpenStack-Dashboard
Now try to access the VM with floating IP ( 192.168.1.20) using keys.
Access-openstack-instance-using-keys
As we can see above that we are able to access the VM using keys. Our task of launching a VM from Dashboard is Completed Now.
Hope you like steps and do not hesitate to share this article.

No comments:

Post a Comment