Difference between revisions of "Fully Automatic OpenStack Cloud Installation on Bare Metal with openQRM"

From openQRM
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
[[Category:Cloud]]
 
[[Category:Cloud]]
 
[[Category:Bare Metal]]
 
[[Category:Bare Metal]]
 +
This How-To is about how to fully automate provisioning of OpenStack Cloud(s) to bare-metal systems (physical server) with openQRM.
 +
 +
=== '''Why do we integrate with e.g. Amazon EC2, Eucalyptus and OpenStack (and some more in the pipeline)?''' ===
 +
Pure Cloud projects normally only care for virtual machine deployment. That means the Cloud is actually something within your datacentre so it needs management and administration in the same way as regular IT.
 +
 +
Since openQRM Enterprise works on a much lower level of your IT, we see other Cloud providers as tools. Because of this, those tools need a comprehensive management platform to automate them to 100%. Therefore, in openQRM, public and private Cloud providers are basically just another resource type and we are happy to integrate with them.
 +
===Requirements===
 +
* One (or more) physical Server
 +
*at least 1 GB of Memory
 +
*at least 100 GB of Diskspace
 +
*VT (Virtualization Technology) enabled in the Systems BIOS so that the openQRM Server can run Virtual Machines later
 +
*Debian Installation on a physical Server
 +
'''Note:'''
 +
 +
OpenStack installation to bare-metal is only available in the openQRM Enterprise Edition >= 5.1.3.
 +
 +
For this How-To, we assume you have successfully [https://wiki.openqrm-enterprise.com/index.php%3Ftitle=Install_openQRM_on_Debian installed openQRM] and have at least referenced our [https://wiki.openqrm-enterprise.com/index.php%3Ftitle=Cloud_Computing_with_openQRM Cloud Computing with openQRM on Debian How-To] before. If not, it is highly suggested to complete both before continuing.
 +
 +
For demonstration, we are going ot be using the openQRM server used for the '[[Virtualisation with KVM and openQRM on Debian|Virtualisation with KVM and openQRM on Debian']] and '[[Automated Amazon EC2 Cloud deployments with openQRM on Debian]]' How-Tos.
 +
=== 1. Enable plugins ===
 +
In the openQRM Plugin Manager please enable and start the following plugins in the sequence below:
 +
 +
* dns plugin ''- type Networking''
 +
* dhcpd plugin - ''type Networking''
 +
* tftpd plugin - ''type Networking''
 +
* network-manager plugin - ''type Networking''
 +
* local-server plugin - ''type Misc''
 +
* device-manager plugin - ''type Management''
 +
* novnc plugin - ''type Management''
 +
* sshterm plugin - ''type Management''
 +
* linuxcoe plugin - ''type Deployment''
 +
* puppet plugin - ''type Deployment''
 +
 +
'''Hint''': You can use the filter in the plugin list to find plugins by their type easily!
 +
 +
=== 2. Enable PXE boot on the second system dedicated for OpenStack ===
 +
Set the second system dedicated for OpenStack to the following boot-sequence in the system bios:
 +
 +
# network-boot (PXE)
 +
# boot from first hard drive
 +
# disabled
 +
[[File:Csm 03-openqrm-openstack 6b777d47a9.jpg|none|thumb|390x390px|OpenStack Boot sequence]]
 +
 +
=== 3. Save the bios settings and reboot ===
 +
After the reboot the system now boots directly from the network-boot environment (dhcpd/tftp/pxe) by openQRM and integrates itself as new, "idle" (not in used) resource.
 +
[[File:Csm 04-openqrm-openstack ff6edf584b.jpg|none|thumb|390x390px|New Idle resource]]
 +
Here the new resource in "idle" state. Idle means that the system is integrated and ready to be automatically managed by openQRM.
 +
[[File:Csm 05-openqrm-openstack a24adf036b.png|none|thumb|390x390px|New resource in "idle" state]]
 +
 +
=== 4. Setup an automatic-installation profile with LinuxCOE ===
 +
Go to '''Plugins -> Deployment -> LinuxCOE -> Create Templates''' and select Ubuntu "Precise" (12.04 LTS) as the distribution version and X86_64 as the architecture. Then click on "continue".
 +
[[File:Csm 06-openqrm-openstack f47a13bb6a.png|none|thumb|390x390px|LinuxCOE Templates]]
 +
on the next page, leave settings on default and simply click on "continue"
 +
[[File:Csm 07-openqrm-openstack 58029ab818.png|none|thumb|390x390px|Click 'Continue']]
 +
On the following page select the mirror from where you would like to install.
 +
 +
 +
Please notice that you can add your own custom mirror entries in the LinuxCOE configuration easily at ''/usr/share/openqrm/plugins/linuxcoe/linuxcoe-sd/depots/apt-Ubuntu-Precise''
 +
[[File:Csm 08-openqrm-openstack a12ddcdde3.png|none|thumb|390x390px|Select Mirror]]
 +
In the package selection please select only "openssh-server"
 +
[[File:Csm 09-openqrm-openstack 51bb759a1b.png|none|thumb|390x390px|Select only 'openssh-server']]
 +
In the disk-layout screen please select /dev/sda
 +
[[File:Csm 10-openqrm-openstack 268fe02175.png|none|thumb|390x390px|Select /dev/sda]]
 +
In the user configuration section please specify a username and password
 +
[[File:Csm 11-openqrm-openstack 892193aa3a.png|none|thumb|390x390px|Specify username and password]]
 +
The final LinuxCOE page presents the ready-baked iso image containing the automatic installation. No need to download it as openQRM is going to apply this automatic-installation profile by PXE/network-boot!
 +
 +
Instead, go to ''Plugins -> Deployment -> LinuxCOE -> Template Manager''
 +
 +
which will automatically unpack the iso and its configuration items.
 +
[[File:Csm 12-openqrm-openstack 99105ffdff.png|none|thumb|390x390px|Template Manager]]
 +
Please click on the "edit" action of the installation-template
 +
[[File:Csm 13-openqrm-openstack 8598583f9d.png|none|thumb|390x390px|Click on 'edit']]
 +
Now insert "Ubuntu 1204" as the installation-template name and click on "submit".
 +
[[File:Csm 14-openqrm-openstack 27caa9717e.png|none|thumb|390x390px|Insert 'Ubuntu 1204']]
 +
Next please go to '''Datacentre -> Components -> Storage -> Add Storage''' and add a new storage from the type "linuxcoe-deployment". Use the openQRM server resource for this new storage object.
 +
[[File:Csm 16-openqrm-openstack bb0c4eb887.png|none|thumb|390x390px|Use the openQRM server resource]]
 +
Switch back to '''Plugins -> Deployment -> LinuxCOE -> Image Manager''' and select the just created new LinuxCOE Storage.
 +
[[File:Csm 17-openqrm-openstack 0532925649.png|none|thumb|390x390px|Select the just created LinuxCOE Storage]]
 +
Click on "Add new Volume"
 +
 +
Name the new volume "ubuntuinstall", select /dev/sda and add "Ubuntu 1204" as the description. This will create the Image pointing to the target harddisk on the system which is going to be auto-installed.
 +
[[File:Csm 19-openqrm-openstack 59a650fdd9.png|none|thumb|390x390px|Name it "ubuntuinstall"]]
 +
Adding the volume automatically adds a new Image object in openQRM.
 +
 +
=== 5. Creating a new server with an attached automatic installation-template ===
 +
We now have all configuration items ready for the deployment.
 +
 +
Please go to '''Datacentre -> Server''' and click on "Add new server"
 +
[[File:Csm 21-openqrm-openstack dee3a64a1f.png|none|thumb|390x390px|Click 'Add new server']]
 +
Enter "openstack" as the name and "Ubuntu 1204" as the description. Then click on "submit".
 +
[[File:Csm 22-openqrm-openstack 250244d283.png|none|thumb|390x390px|Enter details and click 'enter'.]]
 +
On the second page of the server wizard please select the resource of the just integrated, idle, bare-metal system dedicated for the OpenStack installation.
 +
[[File:Csm 23-openqrm-openstack b61956b172.png|none|thumb|390x390px|Select Resource]]
 +
On the third page of the server wizard, select the just created "ubuntuinstall" LinuxCOE-deployment Image, enable the "Edit Image" checkbox and click on "submit".
 +
[[File:Csm 24-openqrm-openstack 6bd54f7311.png|none|thumb|390x390px|Select image and click 'submit']]
 +
In the Image-Edit section please now attach the LinuxCOE installation-template to the Image. Optional you can reset the system password from the automatic installation by setting a custom one.
 +
[[File:Csm 25-openqrm-openstack e3b17f5bd8.png|none|thumb|390x390px|Attach LinuxCOE installation]]
 +
Now select the LinuxCOE storage
 +
[[File:Csm 26-openqrm-openstack f49b2fb699.png|none|thumb|390x390px|Select LinuxCOE storage]]
 +
On the next screen, select the "Ubuntu 1204" installation-template which is then attached to the Image. Please also make sure that the persistent installation is set to "first boot only".
 +
[[File:Csm 27-openqrm-openstack 25f387e700.png|none|thumb|390x390px|Select template]]
 +
In the server list now please choose "continue setup" for the server OpenStack.
 +
[[File:Csm 28-openqrm-openstack 71178cb2bf.png|none|thumb|390x390px|Click 'Continue Setup']]
 +
Back in the server wizard please select the "default" kernel for the server OpenStack.
 +
[[File:Csm 29-openqrm-openstack 9acce7f167.png|none|thumb|390x390px|Leave as default]]
 +
The server object is created so far. Here the Server-Edit section, the final screen of the wizard. Here we can now attach the Puppet recipe for the automated OpenStack installation on top of our automated operating system installation.
 +
[[File:Csm 30-openqrm-openstack 6a67cb490e.png|none|thumb|390x390px|Final screen of wizard]]
 +
In the Server-Edit section please set your custom parameters for the automatic OpenStack installation in the server "capabilities" field. The parameters are the same as user by [http://devstack.org/ DevStack.]
 +
 +
For example, for this How-To we have used the following server capabilities configuration (all parameter in one line):<blockquote>''HOST_IP=193.168.88.135 FLOATING_RANGE=193.168.88.0/27 FIXED_RANGE=10.20.11.0/24 FLAT_INTERFACE=eth0 ADMIN_PASSWORD=password MYSQL_PASSWORD=password RABBIT_PASSWORD=password SERVICE_PASSWORD=password SERVICE_TOKEN=password''</blockquote>After setting the OpenStack configuration parameters in the server capabilities field please click on "submit" to save your changes. The go back to the Edit-Server screen and click on the Puppet item.
 +
[[File:Csm 31-openqrm-openstack 25784b00b4.png|none|thumb|390x390px|Click 'Puppet']]
 +
In the Puppet configuration for the server OpenStack please select the "OpenStack" recipe and click on "submit".
 +
[[File:Csm 32-openqrm-openstack f392ce40aa.png|none|thumb|390x390px|Select 'openstack' recipe]]
 +
 +
=== 6. Starting the server ===
 +
Navigate to the Server-List at '''Datacenter -> Server,''' select and start the server 'openstack'.
 +
[[File:Csm 33-openqrm-openstack 8af8996fa0.png|none|thumb|390x390px|Start the server]]
 +
Starting the server object now automatically:
 +
 +
* assigns the LinuxCOE installation-template to the server on first boot
 +
* triggers all other start actions of the server
 +
* reboots the "idle" server resource
 +
* PXE boots the resource assigned to LinuxCOE
 +
* automatic installs the OS on the systems hard disk
 +
* re-assigns the system to local-boot
 +
* after the successful OS installation it reboots the system which then boots from the local disk
 +
* install and start the openQRM-Client (comparable to the "cloud-init" scripts for Amazon EC2 or OpenStack) on the installed system
 +
* by starting the openqrm-client the system automatically fetches the plugin-boot-services from the openQRM server
 +
* the Puppet-boot-service then automatically installs Puppet on the system and runs the configured OpenStack-installation recipe.
 +
 +
=== Congratulations! ===
 +
You have successfully completed this How-To!
 +
*

Latest revision as of 15:18, 6 November 2020

This How-To is about how to fully automate provisioning of OpenStack Cloud(s) to bare-metal systems (physical server) with openQRM.

Why do we integrate with e.g. Amazon EC2, Eucalyptus and OpenStack (and some more in the pipeline)?

Pure Cloud projects normally only care for virtual machine deployment. That means the Cloud is actually something within your datacentre so it needs management and administration in the same way as regular IT.

Since openQRM Enterprise works on a much lower level of your IT, we see other Cloud providers as tools. Because of this, those tools need a comprehensive management platform to automate them to 100%. Therefore, in openQRM, public and private Cloud providers are basically just another resource type and we are happy to integrate with them.

Requirements

  • One (or more) physical Server
  • at least 1 GB of Memory
  • at least 100 GB of Diskspace
  • VT (Virtualization Technology) enabled in the Systems BIOS so that the openQRM Server can run Virtual Machines later
  • Debian Installation on a physical Server

Note:

OpenStack installation to bare-metal is only available in the openQRM Enterprise Edition >= 5.1.3.

For this How-To, we assume you have successfully installed openQRM and have at least referenced our Cloud Computing with openQRM on Debian How-To before. If not, it is highly suggested to complete both before continuing.

For demonstration, we are going ot be using the openQRM server used for the 'Virtualisation with KVM and openQRM on Debian' and 'Automated Amazon EC2 Cloud deployments with openQRM on Debian' How-Tos.

1. Enable plugins

In the openQRM Plugin Manager please enable and start the following plugins in the sequence below:

  • dns plugin - type Networking
  • dhcpd plugin - type Networking
  • tftpd plugin - type Networking
  • network-manager plugin - type Networking
  • local-server plugin - type Misc
  • device-manager plugin - type Management
  • novnc plugin - type Management
  • sshterm plugin - type Management
  • linuxcoe plugin - type Deployment
  • puppet plugin - type Deployment

Hint: You can use the filter in the plugin list to find plugins by their type easily!

2. Enable PXE boot on the second system dedicated for OpenStack

Set the second system dedicated for OpenStack to the following boot-sequence in the system bios:

  1. network-boot (PXE)
  2. boot from first hard drive
  3. disabled
OpenStack Boot sequence

3. Save the bios settings and reboot

After the reboot the system now boots directly from the network-boot environment (dhcpd/tftp/pxe) by openQRM and integrates itself as new, "idle" (not in used) resource.

New Idle resource

Here the new resource in "idle" state. Idle means that the system is integrated and ready to be automatically managed by openQRM.

New resource in "idle" state

4. Setup an automatic-installation profile with LinuxCOE

Go to Plugins -> Deployment -> LinuxCOE -> Create Templates and select Ubuntu "Precise" (12.04 LTS) as the distribution version and X86_64 as the architecture. Then click on "continue".

LinuxCOE Templates

on the next page, leave settings on default and simply click on "continue"

Click 'Continue'

On the following page select the mirror from where you would like to install.


Please notice that you can add your own custom mirror entries in the LinuxCOE configuration easily at /usr/share/openqrm/plugins/linuxcoe/linuxcoe-sd/depots/apt-Ubuntu-Precise

Select Mirror

In the package selection please select only "openssh-server"

Select only 'openssh-server'

In the disk-layout screen please select /dev/sda

Select /dev/sda

In the user configuration section please specify a username and password

Specify username and password

The final LinuxCOE page presents the ready-baked iso image containing the automatic installation. No need to download it as openQRM is going to apply this automatic-installation profile by PXE/network-boot!

Instead, go to Plugins -> Deployment -> LinuxCOE -> Template Manager

which will automatically unpack the iso and its configuration items.

Template Manager

Please click on the "edit" action of the installation-template

Click on 'edit'

Now insert "Ubuntu 1204" as the installation-template name and click on "submit".

Insert 'Ubuntu 1204'

Next please go to Datacentre -> Components -> Storage -> Add Storage and add a new storage from the type "linuxcoe-deployment". Use the openQRM server resource for this new storage object.

Use the openQRM server resource

Switch back to Plugins -> Deployment -> LinuxCOE -> Image Manager and select the just created new LinuxCOE Storage.

Select the just created LinuxCOE Storage

Click on "Add new Volume"

Name the new volume "ubuntuinstall", select /dev/sda and add "Ubuntu 1204" as the description. This will create the Image pointing to the target harddisk on the system which is going to be auto-installed.

Name it "ubuntuinstall"

Adding the volume automatically adds a new Image object in openQRM.

5. Creating a new server with an attached automatic installation-template

We now have all configuration items ready for the deployment.

Please go to Datacentre -> Server and click on "Add new server"

Click 'Add new server'

Enter "openstack" as the name and "Ubuntu 1204" as the description. Then click on "submit".

Enter details and click 'enter'.

On the second page of the server wizard please select the resource of the just integrated, idle, bare-metal system dedicated for the OpenStack installation.

Select Resource

On the third page of the server wizard, select the just created "ubuntuinstall" LinuxCOE-deployment Image, enable the "Edit Image" checkbox and click on "submit".

Select image and click 'submit'

In the Image-Edit section please now attach the LinuxCOE installation-template to the Image. Optional you can reset the system password from the automatic installation by setting a custom one.

Attach LinuxCOE installation

Now select the LinuxCOE storage

Select LinuxCOE storage

On the next screen, select the "Ubuntu 1204" installation-template which is then attached to the Image. Please also make sure that the persistent installation is set to "first boot only".

Select template

In the server list now please choose "continue setup" for the server OpenStack.

Click 'Continue Setup'

Back in the server wizard please select the "default" kernel for the server OpenStack.

Leave as default

The server object is created so far. Here the Server-Edit section, the final screen of the wizard. Here we can now attach the Puppet recipe for the automated OpenStack installation on top of our automated operating system installation.

Final screen of wizard

In the Server-Edit section please set your custom parameters for the automatic OpenStack installation in the server "capabilities" field. The parameters are the same as user by DevStack.

For example, for this How-To we have used the following server capabilities configuration (all parameter in one line):

HOST_IP=193.168.88.135 FLOATING_RANGE=193.168.88.0/27 FIXED_RANGE=10.20.11.0/24 FLAT_INTERFACE=eth0 ADMIN_PASSWORD=password MYSQL_PASSWORD=password RABBIT_PASSWORD=password SERVICE_PASSWORD=password SERVICE_TOKEN=password

After setting the OpenStack configuration parameters in the server capabilities field please click on "submit" to save your changes. The go back to the Edit-Server screen and click on the Puppet item.

Click 'Puppet'

In the Puppet configuration for the server OpenStack please select the "OpenStack" recipe and click on "submit".

Select 'openstack' recipe

6. Starting the server

Navigate to the Server-List at Datacenter -> Server, select and start the server 'openstack'.

Start the server

Starting the server object now automatically:

  • assigns the LinuxCOE installation-template to the server on first boot
  • triggers all other start actions of the server
  • reboots the "idle" server resource
  • PXE boots the resource assigned to LinuxCOE
  • automatic installs the OS on the systems hard disk
  • re-assigns the system to local-boot
  • after the successful OS installation it reboots the system which then boots from the local disk
  • install and start the openQRM-Client (comparable to the "cloud-init" scripts for Amazon EC2 or OpenStack) on the installed system
  • by starting the openqrm-client the system automatically fetches the plugin-boot-services from the openQRM server
  • the Puppet-boot-service then automatically installs Puppet on the system and runs the configured OpenStack-installation recipe.

Congratulations!

You have successfully completed this How-To!