Versions Compared

Key

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

Overview

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

  • Under settings->modules find and activate "Openstack" module
  • 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"

  • Enter admin

    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
  • 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
  • Save changes

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

    Image Added

    Setting Cloud Package


    1. Proceed to Settings
    ->Products & Services, add
    1. → 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
    his
      • their VMs
      • Provide vCPU count that customer can assign to
    his
      • their VMs
      • Enter Maximum number of instances customer can create
      • From Available flavors pick what VM sizes customer can create under this plan
    1. 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
    2. Setup package Storage limits:
      • Set Storage size [GB] that client can use by all
    his
      • their VMs
      • Provide Max volumes count that client can create in total
      • Provide Max snapshots count that client can take in total
    1. Setup package Network limits:
      • Enter Total Number of Floating IPs that client can use
      • Select which Floating IPs pool to use
    2. Save changes


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

    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


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

    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 apart from the 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

    you can enable the following client functions:

    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.

    Image Added

    How to access instances

    trough ssh

    through SSH using root password?


    This module support supports two ways of settings up ssh SSH access with password authentication, trough root : 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

    smarty

    smart templates for user data script, you can access $service, $client, $forms and $password variables to

    customise

    customize your script.

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

    You can access form components values

    trough 

    through $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 HostBill server is able to connect to your openstack Openstack server. 
    After authentication openstack Openstack returns with list of available api endpoints, hostbill HostBill will test those endpoints using admin api interface (adminURL). make 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 → System Logs > Error → Error logs for more information.