OpenStack

Overview


OpenStack is a software for creating and managing cloud computing platforms for public and private clouds. OpenStack’s modular architecture allows to deploy different projects, depending on types of resources you’re virtualizing and types of cloud services you need. With multiple provisioning methods you can use OpenStack module to sell and provision automatically VPS Hosting, Cloud hosting (virtual Datacenters) or DIY Cloud and VPS packages.

Activating the module


  1. If the module is included in your HostBill edition you can download it from your client portal.
  2. If the module is not included in your HostBill edition you can purchase it from our marketplace and then download it from the client area.
  3. Once you download the module extract it in the main HostBill directory.
  4. Go to Settings → Modules → Hosting Modules, find and activate OpenStack module.

Connecting HostBill with OpenStack


  1. Proceed to Settings → Apps → Add new App
  2. From Applications list select OpenStack
  3. Enter:
    • Name - Name of this connection
    • Hostname
    • IP Address
    • Username
    • Password
    • Admin tenant name (default to "admin"), set it in Admin tenant
    • Make sure to provide valid port your Openstack Keystone operates on - its often changed from default 5000. If its not changed, enter 5000

      4. Verify entered credentials by clicking Test Connection to check if HostBill can connect
      5. Save Changes

Setting Cloud Package


  1. Proceed to Settings → Products & Services and Add new Orderpage
  2. From "Order Type" Select Openstack
  3. Pick orderpage, save changes. Add new product
  4. Under Connect with App Select Openstack Module
  5. Select app connection configured in previous steps
  6. Select Cloud Hosting from Provisioning Tab
  7. Setup package Resource limits:
    • Provide total amout of Memory [MB] client can assign to their VMs
    • Provide vCPU count that customer can assign to their VMs
    • Enter Maximum number of instances customer can create
    • From Available flavors pick what VM sizes customer can create under this plan
  8. Setup package Images / Snapshots limits:
    • To limit use and set prices of templates tick Set template pricing - you can then edit list of templates under related forms element
  9. Setup package Storage limits:
    • Set Storage size [GB] that client can use by all their VMs
    • Provide Max volumes count that client can create in total
    • Provide Max snapshots count that client can take in total
  10. Setup package Network limits:
    • Enter Total Number of Floating IPs that client can use
    • Select which Floating IPs pool to use
  11. Save changes

For more generic product configuration details including price, automation, emails settings refer to Product Configuration article.

Setting VPS Hosting Package


  1. Setup new orderpage as described above, add new product
  2. Under Connect with App Select Openstack Module
  3. Select app connection configured in previous steps
  4. Select Single VPS from Provisioning Tab
  5. Setup package Resource limits:
    • From Flavor pick what VM size customer machine should be crated with
    • From Projects pick project that client VM will be created under
  6. Setup package Images / Snapshots limits:
    • From OS Template list pick what template customer VM should be created with. OPtionally you can load tempaltes into dropdown available from orderpage, so client can choose it during singup
  7. Setup package Network limits:
    • Enter Total Number of Floating IPs that client can use
    • Select which Floating IPs pool to use
  8. Save changes

Storage Limit



Configuring Client Functions   


In Products & Services → Your Order Page → Your Product → Client Functions you can control what features customer will have access to in client portal, by clicking Enable/Disable next to the given option.
Use Edit button to adjust function appearance in the client portal.

For OpenStack you can enable the following client functions dedicated to this module:

  1. API Access - show OpenStack API access credentials - for cloud packages only.
  2. Adding interfaces - allow ability to add new network interfaces.
  3. Allow VM revuild - allow rebuilding Virtual Machines.
  4. Allow hard rebooting VMs - allow hard rebooting VMs.
  5. Allow rebooting VMs - allow rebooting VMs.
  6. Allow rescue mode - allow entering and disabling Rescue mode for VM.
  7. HTML Console - allow acces to html console.
  8. Image based volumes - allow creating volumes from Images.
  9. Network configuration - allow access to network configuration section.
  10. SSH Keys management - allow SSK Key management.
  11. Security groups - allow access to security groups configuration section - cloud packages only.
  12. Servers resize - allow for resizing instances.
  13. VM Power Control - allow VM start/stop.
  14. Virtual Machine logs - allow access to virtual machine logs.

As well as number of standard client functions, such as 

  1. Change Billing Cycle
  2. Change Label
  3. Change Ownership
  4. Edit Forms
  5. Graphs
  6. Login Details
  7. Manual Service Renew
  8. New Direct Link
  9. Related Services
  10. Service Auto Renewal

How to access instances through SSH using root password?


This module supports two ways of settings up SSH access with password authentication: through root password injection and cloud-init scripts.

You can read more on how to enable password injection for different hypervisors here: http://docs.openstack.org/admin-guide/compute-admin-password-injection.html

To use cloud-init script, you will need to enter it in your product configuration, under "Misc" tab.

It allows you to use "$password" variable that will be replaced with actual root password when new VM is created.


User Data Scripts


It is possible to use smart templates for user data script, you can access $service, $client, $forms and $password variables to customize your script.

Please refer to this list to find out proper variable names - Available Email / Mobile Notifications Variables

You can access form components values through $forms variable, this guide illustrates how to find proper variable names - Forms: Accessing Forms elements in email templates

Solving connection problems


Problem: Connection timed out 

Solution: Make sure that HostBill server is able to connect to your Openstack server.  After authentication Openstack returns with list of available api endpoints, HostBill will test those endpoints using admin api interface (adminURL). Make sure that url provided in error message is accessible from your server.

Problem:  Admin API interface is not available for some services (eg. compute, network)

Solution: Rename includes/modules/Hosting/openstack/endpoints.php.example to endpoints.php, you can edit that file to select which url type will be used for each service.

Problem: Test connection returns: 500 Internal Server Error. Test did not completed, check your error logs for more information.

Solution: There was an error while testing connection status, check Extras → System Logs → Error logs for more information.