• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » OpenStack Customization Script For Automation (HP Cloud)

By Abhishek Ghosh May 19, 2015 8:36 am Updated on May 19, 2015

OpenStack Customization Script For Automation (HP Cloud)

Advertisement

Placement of Cloud init Script is Present via Web GUI in Horizon. Here is the Basics of OpenStack Customization Script For Automation in HP Cloud. Possibly you have heard about Cloud Automation, OpenStack Heat Templates. If you are not understanding about which thing we are talking about – this is blank field that is given as option in the Launch Instance popup menu in Horizon. The option name “Post Creation” which sits beside – [Details] [Access & Security] [Networking] as forth option. OpenStack is written in Python. We can use the OpenStack Python Client Tools from desktop to inject our script or can use the Web GUI of Horizon. We are avoiding terminologies to make it usable to the ordinary users. We are working with Ubuntu instances for this guide.

 

Capabilities of OpenStack Customization Script For Automation (HP Cloud)

 

cloud init is very powerful. The screenshot of the thing we are talking about is this on screenshot :

OpenStack Customization Script For Automation (HP Cloud)

You can open the screenshot in full size by clicking here.

Advertisement

---

Just to make you 100% assured, the cloud init is enabled in HP Cloud. SSH to your any existing instance (do not worry, nothing will be destroyed) when you were never aware of cloud-init. Run these commands to see the output :

Vim
1
2
cat /etc/cloud/cloud.cfg
cat /var/log/cloud-init-output.log

The last one will give you the idea – cloud init is enabled. So, for the next instance, if you use a script; you can use the same script few billion times for creation of instances ready with the softwares you need, like creation of an instance running Nginx.

cloud init is the default VM bootstrapping system on Debian (and Ubuntu), Fedora and Red Hat Enterprise Linux. This guide in technical word is about using CloudInit inside OpenStack Heat.

cloud init documentation is unreadable for practical purpose. We know that the OpenStack Heat implements injection in Python for the VMs. This injection is possible by passing information to the VM. This is decoded by Cloud-Init.
It is too big matter from the point of an ordinary user to understand how it happens. HP Cloud actually has extensive docs for this part :

Vim
1
http://docs.hpcloud.com/als/v1/admin/cluster/cloud-init/ # copy to text editor first

A very basic script to run apt-get upgrade on first boot is :

Vim
1
2
#cloud-config
apt_upgrade: true

A bit complex example to install Apache2 automatically is :

Vim
1
2
3
4
5
#cloud-config
packages:
- apache2
runcmd:
- [ a2ensite, "000-default" ]

Size is the limitation from GUI. 16 KB is the limit.

 

OpenStack Customization Script For Automation (HP Cloud)

 

So, if we run this untested script, we will get a ready to use LAMP server running WordPress :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#cloud-config
 
packages:
 
- apache2
- php5
- php5-mysql
- mysql-server
 
runcmd:
 
- wget http://wordpress.org/latest.tar.gz -P /tmp/
- tar -zxf /tmp/latest.tar.gz -C /var/www/
- mysql -e "create database wordpress; create user 'wpuser'@'localhost' identified by 'changemetoo'; grant all privileges on wordpress . \* to 'wpuser'@'localhost'; flush privileges;"
- mysql -e "drop database test; drop user 'test'@'localhost'; flush privileges;"
- mysqladmin -u root password 'changeme'

The above example is by Rackspace. Practically you’ll get examples of using cloud init from Amazon’s huge number of user scripts plus there are the Heat templates from Rackspace – doing a bit reverse engineering will make them working on HP Cloud or OpenStack own installations.

Tagged With openstack scripts , openstack post-creation script , openstack post instantiation script example , openstack post creation script example , openstack post creation , openstack customization script example , openstack customization script , horizon script cloud-init , example of instance post-creation customization script source openstack , script openstack
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to OpenStack Customization Script For Automation (HP Cloud)

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

  • OpenStack Swift & HPCloud CDN PHP Bindings : Basics

    Here is the basics of OpenStack Swift & HPCloud CDN PHP Bindings for the WordPress Plugin developers and those who works with PHP based CMS.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy