Devstack with Ironic
Openstack
Openstack is a cloud operating system which manages pools of resources like storage, newtorking, computing and provisions cloud solutions which is massively scalable. Openstack is an free and open source project. Openstack's mission is to provide ubiquitous cloud computing platform which serves as Infrastructure As A Service (IAAS) to meet the needs of public, private cloud and hybrid cloud.
Devstack
Devstack is an all in one installer for Openstack. Openstack is getting bigger and bigger day by day. Many new projects have been added to it and it is getting more complicated. To make things easy, Devstack offers a way to install all components of Openstack with out much fuss. These are the key components of Openstack :
- Compute ( Code name 'Nova') : Nova is responsible for creation and management of virtual machines. It has support for different types of Hypervisors like KVM, Xen, QEMU, Vmware-vsphere, Hyper-V, Baremetal.
- Object Storage (Code name 'Swift) : Swift provides Object storage. Swift is used to store Objects and files and Openstack is responsible for data replication and ensuring integrity in cluster.
- Block Storage (Code name 'Cinder') : Cinder is used to provide storage for compute instances. It manages creation, attaching, detaching of the block storage to the servers. In addition to this, it can use many storage like Ceph, IBM Storage, NetApp etc
- Networking ( Code name ' Neutron'): Neutron is used to provide network as a service to the compute instances. It is responsible for allocating IP addresses and for managing networks inside openstack
- Dashboard (Code name 'Horizon') : Horizon is a web interface to manage all the services in openstack. It can be used to spin up a virtual machine , assign a floating IP to it, access its console.
- Identity(Code name 'Keystone') : Keystone is the identity service which provides authentication to all the services running inside openstack. It has capabilities to integrate with LDAP.
- Image service(Code name 'Glance') : Glance is used to provide images for the virtual machines. It can also be used to store backups. It has the capability to use stored images as templates.
- Telemetry(Code name 'Ceilometer') : Ceilometer provides features like Billing for customers.
- Orchestration(Code name 'Heat') : Heat is used to orchestrate different cloud applications using templates
- Database(Code name 'Trove'): Trove is relatively new project as of today. It is used to provide Database As A Service. It uses openstack as a black box to provide database as a service
Deploying Devstack with Ironic
Devstack can be used to configure all the services that we are interested in deploying in openstack. To know more about devstack, you can refer here.
Lets begin the deployment process. I would prefer trying out this deployment in virtual box which gives me the flexibility to take snapshots of working devstack, create new virtual machines to try out different configurations. You can download virtual box and follow this guide for creating a clean installation of Ubuntu 12.04 LTS 64 bit vm with atleast 2 gigs of ram. If in case you dont see 64 bit option in the second step, enable virtualization in your Bios.
Now that you have your vm with Ubuntu 12.04 LTS, its time to install Devstack. Start the virtual machine. Open a terminal (ctrl + shift + t) , run an update
sudo apt-get update
All the code of openstack is hosted on github so install git using this command,
sudo apt-get install git
Check if git has installed successfully by checking its version,
git --version
Once git has been installed, its time to clone the devstack from openstack github repository. You can have a look at the repo that we are going to clone here . Click on the branch, you will notice stable/havana and stable/icehouse . To install openstack havana clone the devstack by checking out the stable/havana branch. To install openstack icehouse (latest as of now), clone the devstack by checking out the stable/icehouse.
For devstack with Icehouse use this command
git clone https://github.com/openstack-dev/devstack.git -b stable/icehouse
For devstack with Havana use this command
git clone https://github.com/openstack-dev/devstack.git -b stable/havana
If you are facing errors with ssl certificate verification , use http instead of https. If this doesn't work , change sslVerify to false using
git config --global http.sslVerify
false
Once the download is done , change to the directory, devstack using
cd devstack
Check the contents of that folder using
ls -la
You can notice few shell scripts like stack.sh, clean.sh, unstack.sh, rejoin-stack.sh, run_tests.sh, exercise.sh. stack.sh is a shell script which downloads all the components from the respective openstack repositories and clients in /opt/stack. Besure to run this command as a normal user not root . unstack.sh is used to stop the openstack services. rejoin-stack.sh is used to join the already running openstack , it will start all the stopped services and screen logs will be appended. clean.sh does its best to remove mysql, rabbitmq and other openstack configuration files.
Important step
create a new file while you are in devstack's directory named localrc using your favorite editor. I am using vi editor so I would do something like this
vi localrc
Paste this contents to enable all the services and Ironic.
######## From here #######
RECLONE=yes
LOGFILE=/opt/stack/logs/stack.sh.log
SCREEN_LOGDIR=/opt/stack/logs/screen
# Enable Ironic API and Ironic Conductor
enable_service ironic
enable_service ir-api
enable_service ir-cond
# Enable Neutron which is required by Ironic and disable nova-network.
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service neutron
# You can replace "password" with your own one
DATABASE_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_TOKEN=password
# Create 3 virtual machines with 512M memory and 10G disk to
# pose as Ironic's baremetal nodes.
IRONIC_BAREMETAL_BASIC_OPS=True
IRONIC_VM_COUNT=3
IRONIC_VM_SPECS_RAM=512
IRONIC_VM_SPECS_DISK=10
IRONIC_VM_SSH_PORT=22
# Size of the ephemeral partition in GB. Use 0 for no ephemeral partition.
IRONIC_VM_EPHEMERAL_DISK=0
VIRT_DRIVER=ironic
# By default, DevStack creates a 10.0.0.0/24 network for instances.
# If this overlaps with the hosts network, you may adjust with the
# following.
NETWORK_GATEWAY=10.1.0.1
FIXED_RANGE=10.1.0.0/24
FIXED_NETWORK_SIZE=256
# Log all devstack output to a log file
LOGFILE=$HOME/devstack.log
######### Till here########
LOGFILE=/opt/stack/logs/stack.sh.log
SCREEN_LOGDIR=/opt/stack/logs/screen
# Enable Ironic API and Ironic Conductor
enable_service ironic
enable_service ir-api
enable_service ir-cond
# Enable Neutron which is required by Ironic and disable nova-network.
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service neutron
# You can replace "password" with your own one
DATABASE_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_TOKEN=password
# pose as Ironic's baremetal nodes.
IRONIC_BAREMETAL_BASIC_OPS=True
IRONIC_VM_COUNT=3
IRONIC_VM_SPECS_RAM=512
IRONIC_VM_SPECS_DISK=10
IRONIC_VM_SSH_PORT=22
# Size of the ephemeral partition in GB. Use 0 for no ephemeral partition.
IRONIC_VM_EPHEMERAL_DISK=0
VIRT_DRIVER=ironic
# By default, DevStack creates a 10.0.0.0/24 network for instances.
# If this overlaps with the hosts network, you may adjust with the
# following.
NETWORK_GATEWAY=10.1.0.1
FIXED_RANGE=10.1.0.0/24
FIXED_NETWORK_SIZE=256
# Log all devstack output to a log file
LOGFILE=$HOME/devstack.log
######### Till here########
Save the file.
Now run
./stack.sh
This will take around 20 minutes. I will clone all the required repositories of all the components that are enabled in the localrc file. As it takes place, let understand what this file means.
Reclone = yes makes stack.sh to clone the repo at each run. If this is set to no, stack.sh is going to clone only if its not in the $dest directory. Second line signifies to make a log of the stack.sh. Since it will run for several minutes, it would be handy to check whats going on and in case of failures to track which component has failed.Once stack.sh completes, we can see screen with terminals of all the services. Its better to log the screens for the same purpose as stated above. enable_service ironic tells stack.sh to enable ironic and download the necessary files related to it. Similarly other enable_service commands do the same. Ironic requires neutron so we have to disable the nova network.
Subsequent lines deal with the password for the database, rabbitmq server, admin password, service token password.
Lines starting with Ironic are used to create 3 vm's with ram 512 mb and with 10 gb space. These three vm's will act as fake baremetal nodes for Ironic.
In case of normal openstack installation, the harware is virtualized using different hypervisors which create virtual machines. Ironic on the other side picks the bare metal servers and PXE (Pre Execution Environment) boots them and deploys the image. Hardware is not virtualized in this case. With Ironic we get the flexibility of cloud with bare metal. Imagine you have 5 servers and you want them to spin up just like you can do spin up a vm in openstack. Ironic does that.
Rest of the file deals with the network configuration for vm's. What class of IP address will be allocated, what would be their gateway.
Once the stack.sh completes succesfully (I know it wont happen the first time, if it does, you are very lucky
:-D ), its time to login to Horizon.
check your network interface using ifconfig and note down the Ip address in eth0 interface. Open your browser and go to http://IP. My Ip adress of eth0 interface was x.x.x.x so my horizon would be http://x.x.x.x Login credentials would be admin/password . If you have changed the password for ADMIN_PASSWORD, use that password to login.
Once you login, you can see collapsible tiles on the left hand side if you have installed Icehouse. Familiarize yourself with it. We haven't created any instances yet.
Time to check the screens. use "screen -x stack" to see the screens which are consists of different parts of openstack interacting with each other with the help of API. To jump to the next screen use "ctrl +a +n" and to jump to previous screen use "ctrl + a + p". To detach from the screens use "ctrl + a +d".
To list the screens use ctrl + "
Change your working directory to devstack and source the openrc file using this command
source openrc admin admin
This helps us to use the clients python-novaclient. You can also do this using the API's. Get a token from keystone, use curl to get instances using Nova API. Lets stick to the first method.
Query the image id of the default cirros-0.3.1-x86_64-uec image using this command.
nova image-list
Cirros is the OS that we are going to boot in our baremetal instance. You should get something like this
+--------------------------------------+---------------------------------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+---------------------------------+--------+--------+
| a5627443-6d18-4719-866e-62dcde0dd2b9 | bm-deploy.initramfs | ACTIVE | |
| 38d47e4a-13cc-40d8-b16c-b52933a8558b | bm-deploy.kernel | ACTIVE | |
| 2224b2f2-8a71-4755-a90a-f2c7945a5357 | cirros-0.3.1-x86_64-uec | ACTIVE | |
| 919d95f7-8517-4759-b901-cba302d038ba | cirros-0.3.1-x86_64-uec | ACTIVE | |
| 14760c82-d960-448d-80d6-d83302f0234c | cirros-0.3.1-x86_64-uec-kernel | ACTIVE | |
| ce8b75e6-94e5-42bf-8a08-140a54468ec4 | cirros-0.3.1-x86_64-uec-kernel | ACTIVE | |
| 8df7830c-f979-4ee3-b065-f8126f69fdc1 | cirros-0.3.1-x86_64-uec-ramdisk| ACTIVE | |
| b46e49c3-7a31-4c2e-b870-7570e0dd4ba5 | cirros-0.3.1-x86_64-uec-ramdisk | ACTIVE | |
+--------------------------------------+---------------------------------+--------+--------+
Copy the ID of cirros-0.3.1-x86_64-uec . Create a keypair using ssh. Use ssh-keygen -t rsa to create ssh keys. Follow the onscreen instructions. The keys will be stored in a hidden directory starting with .ssh. It would contain the public and private keys, know hosts .
Add the keypair to nova so that we can boot the baremetal instance.
nova keypair-add default --pub-key ~/.ssh/id_rsa.pub
Lets boot the instance
The vm we are booting is of flavour baremetal with the image corresponding to the image id of cirros and the keypair corresponding to the default. You would get something like this:
+--------------------------------------+-------------+---------+------------+-------------+-------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------+---------+------------+-------------+-------------+
| 2aabb512-796b-4178-a67f-cfbdce058190 | testing | Build | Spawing | No State | |
+--------------------------------------+-------------+---------+------------+-------------+-------------+
Since we have created three vm which were acting as three fake baremetals, we have powered on one baremetal out of them. Now check the state of baremetal instances using
ironic node-list
+--------------------------------------+--------------------------------------+-------------+------------+
| UUID | Instance UUID | Power State | Provisioning State |
+--------------------------------------+--------------------------------------+-------------+------------+
| a89a107d-63b4-4412-b3f1-0241fb3b0edb | None | power off | None |
| f51ca8a4-c262-40b2-ad6c-288ec2a0b71a | None | power off | None |
| add9a19c-6991-4bc5-8744-fd43e9f0720a | 2aabb512-796b-4178-a67f-cfbdce058190 | power on |wait call-back |
+--------------------------------------+--------------------------------------+-------------+------------+
Check your baremetal instance status by
ironic node-list
+--------------------------------------+-------------+---------+------------+-------------+-------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------+---------+------------+-------------+-------------+
| 2aabb512-796b-4178-a67f-cfbdce058190 | testing | Active | - | No State | Running | private = 10.1.0.4
+--------------------------------------+-------------+---------+------------+-------------+-------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------+---------+------------+-------------+-------------+
| 2aabb512-796b-4178-a67f-cfbdce058190 | testing | Active | - | No State | Running | private = 10.1.0.4
+--------------------------------------+-------------+---------+------------+-------------+-------------+
Problem with SSH
If you are facing any problem with ssh, edit the /etc/sshd_config file and uncomment the ListenAddress. Save the file and restart the service ssh.
You have succesfully deployed Ironic with devstack :)
This comment has been removed by a blog administrator.
ReplyDeleteRequiring Help?? Get bridged with our exceptionally skilled QB experts by dialling our QuickBooks 2019 Support Phone Number 1-833-325-0220.
DeleteIt's was great information for openstack training
ReplyDelete
DeleteIf confronting any sort of technical glitch in the software. Resolve it by calling on QuickBooks Phone Number Support 1-833-780-0086. Our learned & Experienced QuickBooks professionals are always presented to offer technical help. For More Visit: https://g.page/qb-support-number-hawaii
I am glad you found this useful.
ReplyDeleteHi, Thank you very much for this guide. But I am installing openstack infras (network, compute...) on a node and ironic on another node with devsack. Could you please help to give any idea?
ReplyDeleteHey, glad you like it. I am not working on Openstack anymore and I am afraid that I cannot help you there. If you need help, please join IRC channel #openstack-101 where you can get help. Openstack-101 IRC channel is for first timers. You could also try ask.openstack.com
DeleteThanks for sharing this informative blog..
ReplyDeleteJava Web Service Training In Chennai
Haryana HSSC Steno Typist Recruitment 2016
ReplyDeleteI am actually grateful to the holder of this web page who has shared this wonderful piece of writing at here............
Naval Dockyard Visakhapatnam Tradesman Skilled Recruitment 2016
ReplyDeleteYour Website Publish very useful information...
Thank you for sharing wonderful information with us to get some idea about that content. check it once through
ReplyDeleteMachine Learning With TensorFlow Training and Course in Tel Aviv
| CPHQ Online Training in Beirut. Get Certified Online
Thanks for sharing this unique information with us. Your post is really awesome. Your blog is really helpful
ReplyDeletefor me..
organic oil
organic oil in jaipur
organic cold pressed oils
ayurvedic oil store in jaipur
Thanks for sharing this unique information with us. Your post is really awesome. Your blog is really helpful
ReplyDeletefor me..
organic oil
organic oil in jaipur
organic cold pressed oils
ayurvedic oil store in jaipur
Thanks for sharing this unique information with us. Your post is really awesome. Your blog is really helpful for me..
ReplyDeletehospital equipment
sarthak maditech
hospital equipment suppliers
hospital equipment manufacturers
medical equipment manufacturers in jaipur
operation theater lights
hospital suction machine
alcohol breath tester
hospital furniture manufacturer
So now you are becoming well tuned in to benefits of Quickbooks Support Phone Number in your company accounting but because this premium software contains advanced functions that may help you along with your accounting task to complete, so you may face some technical errors when using the QuickBooks payroll solution.
ReplyDeleteThe Quickbooks Support team at site name is held accountable for removing the errors that pop up in this desirable software. We look after not letting any issue can be found in between your work and trouble you in undergoing your tasks.
ReplyDeleteYour blog is the best blog that I have read on the internet today. QuickBooks great features are available for the users at an affordable rate. It has easy to use and interactive interface, which can be used by users with no accounting history. To get support for the software, call us on tollfree Quickbooks Customer Care Number +1-800-329-0391
ReplyDeleteHey! Amazing content. I love your blog. Recently I have started using QuickBooks software for my business. I love the ease and different tools provided by this software. I highly recommend others to use QuickBooks software for their business. You can get instant help and support at QuickBooks Support Phone Number Florida 1-833-401-0204. Read more: https://tinyurl.com/vz56e5v OR visit: https://www.qb-dataservices.com/quickbooks-in-florida/
ReplyDeleteHey! Outstanding post. Keep writing such appealing blogs. With QuickBooks, you can easily manage all your accounting process in one place. In case you find any inconvenience in QuickBooks software, then reach our experts via QuickBooks ProAdvisor Support Phone Number 1-833-401-0204. These experts are available 24/7 around the clock for you. Read more: https://tinyurl.com/vskk254 or visit us: https://www.mildaccounting.com/quickbooks-proadvisor-support-phone-number/
ReplyDeleteWell explained and knowledgeable blog click here for QuickBooks support number for more detail dial on our QuickBooks Support phone number 844-908-0801
ReplyDeleteNice Blog ! Stop your search here if you are looking for help to get your QuickBooks issues resolved. Our QuickBooks Support Phone Number 1-855-9O7-O4O6 is meant to help customers with reliable solutions.
ReplyDeleteFind an easy & effective way to get rid of complex issues from our QuickBooks Customer Support Number. Need is to just ask! For More Visit: https://g.page/quickbookssupporttexas
ReplyDeleteBeing a user to these products, if facing trouble, call Phone Number For QuickBooks 1-833-325-0220.
ReplyDeleteI have read your blog its very attractive and impressive. Nice information. It helped me alot.
ReplyDeleteGovernment vacancy
govt jobs in
govt jobs
govt jobs
best government jobs in india
latest job in govt
latest govt jobs
govt job adda
Very informative!
ReplyDeleteFacing QuickBooks error 6000 83? if you hang up with QuickBooks error 6000 83 Get live support 24*7 from QuickBooks expert on tool-free Number.
Click here to know How to fix QuickBooks error 6000 83
Dial for any tech support: 1-844-908-0801
Vidyasthali Law College is a self-financing Institution affiliated to the University of Rajasthan to impart qualitative instructions for the degree of LL.B. (Three-year) course.
ReplyDeletelaw college jaipur
llb college in jaipur
best law college in jaipur
law college rajasthan
rajasthan law college
colleges in jaipur for ba
ba llb colleges in jaipur
best law college in rajasthan
top law colleges in jaipur
private law colleges in jaipur
law colleges in jaipur rajasthan
5 year law colleges in jaipur
list of best college in jaipur
Great, thanks for sharing this blog.Really looking forward to read more. Keep writing
ReplyDeleteaws training
r programming training