Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.




Installing HostBill


HostBill installation is fully automated and takes just seconds, more info at Installation

Download & install


  • After module purchase visit hostbillapp.com/ log-in and proceed to "Services->Provisioning Modules for HostBill->OpenStack" and from left-hand menu choose Download This Product
  • After downloading, unzip archive contents in your main HostBill directory
  • Log-in into your HostBill adminarea, proceed to Settings->Modules, locate your newly uploaded module and choose"Activate"

Connecting to OpenStack


  1. Under settings->modules find and activate "Openstack" module
  2. You'll be redirected to Settings->Apps, provide your main Openstack hostname(ip), username and password for your admin tenant 
    - If you have valid SSL certificate installed on Openstack, tick "Use https"
  3. If for some reason you've changed your Enter admin tenant name (default to "admin"), set it in Admin tenant
  4. Make sure to provide valid port your Openstack Keystone operates on - its often changed from default 5000. If its not changed, enter 5000
  5. Use Test configuration to make sure that HostBill can connect to Openstack, if it can't, try: 
    - Make sure your HostBill IP is whitelisted in Openstack 
    - Make sure that no firewall is blocking connection between HostBill <-> Openstack over ports 80, 443
  6. Save changes

Setting Cloud Package


  1. Proceed to Settings->Products & Services, 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 his VMs
    • Provide vCPU count that customer can assign to his 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 his 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


Widget Connector
width600
urlhttp//www.vimeo.com/89527054
height400

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


Widget Connector
width600
urlhttp//www.vimeo.com/89532699
height400

How to access instances trough ssh using root password?


This module support two ways of settings up ssh access with password authentication, trough 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 smarty templates for user data script, you can access $service, $client, $forms and $password variables to customise your script.

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

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


Code Block
titlecloud-config
#cloud-config
hostname: {$service.domain}
users:
  - name: {$forms.username.value}
	gecos: {$client.firstname} {$client.lastname}
	passwd: {$password|md5}   
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    groups: sudo
    shell: /bin/bash
runcmd:
  - {$forms.recipe.variable_id}
  - restart ssh


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.