Set up Instance Packages for Cloud

To enable your users to create virtual servers using instance packages, you need to perform the following configurations:

Enable the instance packages permission

In OnApp, there are two permissions that control how resources are selected during virtual server creation: Select resources manually on virtual server creation and Select instance package on virtual server creation. You can enable one or both of these permissions for your users. By default, users with the role User have the Select resources manually on virtual server creation enabled. If you want your users to be able to select instance packages during virtual server creation, you need to enable the Select instance package on virtual server creation permission. Depending on the permissions, the Resources step of the virtual server creation wizard can be different:

  • If both the Select resources manually on virtual server creation and Select instance package on virtual server creation permissions are enabled, the user will be able to choose whether to create a VS using an instance package or by setting resources manually.
  • If you disable the Select resources manually on virtual server permission and enable the Select instance package on virtual server creation permission, the user will be able to select VS resources only from the instance package(s) available to that user.
  • If you disable the Select instance package on virtual server creation permission and enable the Select resources manually on virtual server permission, the user will only be able to select resources manually.

If you are adding a custom role, make sure to enable either the Select resources manually on virtual server creation or the Select instance package on virtual server creation permission, or both if required. If the user does not have any of these permissions enabled, they will not be able to create virtual servers.

For the list of OnApp permissions, refer to the Permissions List section.

Add instance packages to your cloud

After you enable the necessary permissions for your user(s), you need to add instance packages to your cloud. When you add a new instance package, you set CPU/RAM/Disk/Bandwidth. You can add multiple instance packages to provide your customers with a number of predefined packages to choose from. Resources that are not set when creating an instance package are calculated automatically.

To create an instance package:

  1. Go to your Control Panel's Instance packages menu.
  2. The screen that appears, shows the list of all instance packages. Click the "+" button at the top of the screen.
  3. Complete the form on the screen that follows:
    • Label - fill in the name of the instance package.
    • CPUs - move the slider to set the number of CPU cores available in the instance package. The maximum CPUs value is 8.

    • Memory - move the slider to set the RAM size available in the instance package. The maximum value is 16384 MB by default.

    • Disk Size - move the slider to set the Disk size available in the instance package. The maximum value is 100 GB by default. The maximum disk size cannot be larger than the largest data store size in your cloud.
    • Bandwidth - move the slider to set the bandwidth available in the instance package, the maximum value is 450 GB by default. Otherwise, tick the check box to set bandwidth to unlimited.

      If the user exhausts the bandwidth limit, the resources they overuse will be calculated according to the billing plan's Overused Bandwidth price in the Limits for Instance packages section.

      You can change the default minimum and/or maximum values for memory, disk size and bandwidth by adding the following parameters to the config/on_app.yml file and restarting OnApp services:

      • instance_package_min_disk_size (GB)
      • instance_package_max_disk_size (GB)
      • instance_package_max_memory (MB)
      • instance_package_min_bandwidth (GB)
  4. Click Save to finish.

How are other VS resources calculated?

The following resources are set automatically for instance packages:

  • CPU Priority - CPU priority is automatically set to 100
  • Swap disk size - swap disk size can have the size of 1/2/3 GB. Its size is calculated by multiplying the RAM by two. If the calculated value is larger than three, the swap disk size is set to 3. If the calculated value is smaller than three, it is rounded to the closest value from the 1/2/3 range that is larger than the calculated size. If the calculated value is larger than the disk size set for the instance package, the swap disk is not added to the VS.
  • IP address - the first available IP address is selected
  • Port speed - depends on the billing plan limit. If the port speed Max limit in the billing plan is set to unlimited, the port speed in the instance package will also be set to unlimited. If the port speed Max limit in the billing plan is set to a certain value, the port speed in the instance package will be set to that same value.

Add the instance package(s) to the users' billing plan

Once you created the instance packages, they can be added to billing plan(s). This step is required to bundle the instance packages with the specific compute/data store/network zones. To add limits for instance packages:
  1. Go to the Billing Plans list and click the label of the billing plan to which you want to add instance or create a new billing plan
  2. Click the "+" button in the upper right corner of the Limits for Instance packages box.
  3. In the window that pops up, select the target instance package and the compute zone(s), data store zone(s) and network zone(s) to which the instance package will apply. Click Add Resource.

  4. Set the price that will be charged per VS powered on/off  for each appropriate instance package. You can also set the pricing for overused bandwidth per GB/hr.

    Instance packages apply only to Xen and KVM compute zones. If you select a vCloud Director or VMware compute zone, the instance package will not be displayed in the virtual server creation wizard.

    If you do not select any compute/data store/network zones, the instance package will apply to all compute/data store/network zones available for the user.

    It is advisable that you limit the user's billing plan by the compute zones that have enough resources to support the instance package(s) you add to the user's billing plan. If the user selects a compute zone that does not have enough resources during virtual server creation, they will see all instance packages available to them, but those that have resources incompatible with the chosen compute zone will be greyed out. Greyed out instance packages cannot be selected.

    Note that Instance package VSs can only be created on compute resources within compute zones where all compute resources are assigned the same amount of CPU units. If there are compute resources with different amount of CPU units set in a zone, it will not be possible to create Instance package VSs in such zones. The reason is that CPU priority for Instance package VSs in this configuration cannot be set to 100%, which is the default value for such virtual servers.

If required, you can edit the zones to which the instance package applies:

  1. Go to the Billing Plans list and click the label of the billing plan you are interested in.
  2. Click the Actions button next to the instance package you are interested in and select Edit.
  3. In the window that pops up, edit the compute resource/data store/network zone(s) and click Update.

If there is a VS created on a compute/data store/network zone which you remove while editing the billing plan, the VS will still be billed according to the instance package.

Also, you can delete instance packages from the billing plan:

  1. Go to the Billing Plans list and click the label of the billing plan you are interested in.
  2. Click the Actions button next to the instance package you want to remove and select Delete. You will be asked for confirmation before the instance package is removed from the billing plan.

You cannot delete the Instance packages that are used for existing VSs.

After you add instance packages to the user's billing plan, they will be available in the virtual server creation wizard at the Resources step.

Interface configuration

After you add instance packages to the user's billing plan, you can configure how instance packages will be displayed in the virtual server creation wizard. This step is optional.

Instance packages can be displayed either in card or list view. Displaying instance packages in card view is convenient if there is one or several instance packages available to the user.

However, if the user can choose among a large number of instance packages, it is more convenient to view instance packages in list view.

To change the layout of instance packages in the virtual server creation wizard:

  1. Go to your Control Panel's Settings menu, and click the Configuration icon.
  2. The page that loads is the System tab. At the bottom of this page, set the Instance packages number parameter. The default value is 3.

  3. Click Save Configuration.

Build Virtual Server Using Instance packages

Once you have performed the above configurations, the instance packages can be selected during a virtual server creation.

Depending on the permissions, users will be able to select an instance package, set resources manually or choose one of these options on the Resources step.

If the user selects a compute zone that does not have enough resources during VS creation, the instance packages that have resources incompatible with the chosen compute zone will be grayed out and unavailable.
If there are no available IP addresses during VS creation, all instance packages will be grayed out in the wizard. 

Check production_allocation.log to see why some resources are not suitable for a particular virtual server while adding/editing this VS using an instance package.

From this tab, you can choose one of the predefined instance packages for your virtual server. For each of the instance packages the following details are displayed:

  • Memory - the RAM size (GB) available in the instance package
  • CPUs - the number of CPU cores available in this instance package
  • Disk Size - the disk size available in this instance package
  • Bandwidth - the bandwidth available in this instance package
  • Price per Hour:
    • Mode ON - hourly instance package price for the VS powered on
    • Mode OFF - hourly instance package price for the VS powered off
  • Price per Month:
    • Mode ON - monthly instance package price for the VS powered on
    • Mode OFF - monthly instance package price for the VS powered on

Click the instance package to select it. After that, the instance package you have chosen will be highlighted in green.

Click Next to proceed to the following step of the wizard.

You are forwarded to the next step from the tab you are currently on. If you select an instance package and then click the Create Your Own tab (where you set the resources manually) and proceed to the next step, the system will set the resources from the Create Your Own tab even if you did not configure any resources there.

Virtual servers created using instance packages do not support autoscaling.

The virtual servers you create using the Instance packages tab will be billed according to one of your preconfigured instance packages.