Odin APS Package

IONOS (former Profitbricks) is a cloud based IaaS company providing configurable hosting solutions to clients across the world. We operate on the basis of providing metered server and networking infrastructure to clients. This process is simplified with the use of a web-UI, the Data Center Designer (DCD). It allows users to easily create, configure, start and stop servers as needed, as well as linking them together via their networking infrastructure.

Odin (formerly Parallels) provides cloud based managed hosting configuration solutions for web hosts and internet service providers. This makes it easier to manage complex dedicated and shared hosting solutions.

The APS packaging system allows service providers to sell their services to users via resellers who are using Odin's infrastructure. A service provider creates a package which acts as the middleman between resellers and users. This package facilitates communication between the two, where end user actions are communicated to the service provider.

The ProfitBricks Odin APS package is such a package, allowing users to add and configure servers - choosing an operating system, the amount of RAM needed, the number of CPU cores etc. This package provides a simple to use interface to allow resellers to configure server offers, while allowing end users to provision servers. It also communicates with the ProfitBricks Cloud API to provision resources, edit them, and remove them.

This documentation describes deploying the ProfitBricks APS package and integrating it with Parallels Automation. The ProfitBricks APS package is intended for resellers who are using Odin Automation to resell cloud computing services provided by ProfitBricks.

The ProfitBricks APS package allows resellers to provide cloud hosting services to their users through ProfitBricks. Users create and consume the services provided by ProfitBricks through the user interface for this APS package.

This APS package provides service users with an overall view of their resource consumption from the beginning of the month to the present time, along with a cost breakdown of the products they have been using with a total cost for each. For more information on pricing please refer to https://www.ionos.com/pro/enterprise-cloud/features-and-prices/.

A recorded webinar is available on the ProfitBricks YouTube channel that covers the setup and usage of this package.

ProfitBricks Cloud Resources

Virtual Data Center

A Virtual Data Center is a representation of a group of servers and the infrastructure that supports them. A Virtual Data Center could contain load balancers, one or more servers, and one or more public or private LANs to connect them all.

Location

Virtual Data Centers can be added to locations. ProfitBricks currently has four locations: Las Vegas (US), Newark (US), Karlsruhe (EU) and Frankfurt (EU).

Server

Within ProfitBricks, a server is a standalone unit that consists of a number of CPU cores, CPU architecture and an allocation of RAM. It represents the basics of the hardware. Items like network cards and disk volumes are treated as separate entities that can be connected to it.

Servers are stand alone items that are billable depending on their configuration and the location of the Virtual Data Center they reside in. A server with a CPU type of Intel Xeon location in Frankfurt will incur a higher hourly charge than a server with a CPU family of AMD Opteron located in Las Vegas. The servers license type and amount of RAM also comes into play. A server provisioned with the Windows Server OS will incur a higher running cost than a server with Linux installed.

Volume

A volume represents a disk attached to a server. Its typical properties are the volume size and type (SSD or HDD). A volume can also have an image associated with it, representing the operating system installed on it. A server can have zero or more volumes attached to it.

A provisioned volume also incurs a running cost over a time, dependent on its disk type. An SSD based volume will incur a higher running cost compared to an HDD volume. The size of a volume also affects costs incurred.

Image

An image, linked to a volume, is the flavour of operating system that is to be installed on an operating system. ProfitBricks provides an array of public operating system images, typically Linux or Windows based.

LAN

A LAN is an entity that can be attached to a Data Center to provide internet access for servers, or local firewalled access between servers. A LAN connects to the network interface card (NIC) for a server and if configured with internet access, will connect the server to the outside internet.

Servers within the ProfitBricks DCD environment

Servers within the ProfitBricks DCD environment

It is possible to provision and connect servers to multiple networks inside a Virtual Data Center. Local Area Networks that connect to the public internet will be billed according to their bandwidth consumption.

Installation via Command Line

The basic installation of this package comes in two steps. The first step that needs to be completed is the installation via the command line to set up the package endpoints. This will allow the POA UI to communicate with the Odin APS infrastructure. To get started with this, please complete the following steps.

You will need the following:

  • Package installation file (ProfitBricks_Cloud_Infrastructure-1.x-x.app.zip).

  • Access to an on-site installation of the Odin Provider Operations Automation control panel (poa-6.0.9-086) or a sandbox of the same version.

  • An SSH client capable of accessing a CentOS Linux box and the credentials to access that box with root privileges.

    • Note: The root password for the management and endpoint node of your sandbox is the same as the sandbox password that is set when (re)deploying.
  • The username and the password for the ProfitBricks master reseller account.

You will need to run the following via the command line on your local machine:

  • $ cd <path-to-package-file>/
  • $ scp ProfitBricks_Cloud_Infrastructure-1.0-1.app.zip root@endpoint.a.apsdemo.org:~
    • Note: You will need to substitute the sandbox URL for your own sandbox URL

You will then need to connect to your sandbox:

  • $ ssh root@endpoint.a.apsdemo.org

You will then need to run the following to install the APS package:

  • $ endpoint.sh profitbricks ProfitBricks_Cloud_Infrastructure-1.0-1.app.zip

While this is running, you may be prompted for some Y or N answers. Say yes to these. You will see an output indicating the operation was successful. You need to copy the HTTPS endpoint URL from the following output near the bottom. You will need this for the next step. It will look something like the following.

[root@endpoint ~]# endpoint.sh profitbricks ProfitBricks_Cloud_Infrastructure-1.0-1.app.zip
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").


CONGRATULATIONS! Endpoint configured SUCCESSFULLY
http endpoint url: http://endpoint.a.apsdemo.org/profitbricks
https endpoint url: https://endpoint.a.apsdemo.org/profitbricks

Installation via the POA UI

With the endpoint installation carried out in the first step of installation above, it is now time to complete the installation of the package via the command line. The following instructions illustrated with screenshots will help you with this.

You will need to sign into the Odin POA control panel. When signed in, click on Applications which should be listed under Services.

Applications view under the Odin Provider Control Panel

Applications view under the Odin Provider Control Panel

On the Applications page, you will need to click on the Import Package button. You will then be presented with the following screen on the next page.

Package Import View

Package Import View

On this screen, choose the local file radio option and then click on Choose file, selecting the APS module installation file downloaded earlier (ProfitBricks_Cloud_Infrastructure-1.0-1.app.zip). Click on the Submit button, and you will be presented with the following screen.

Package import in progress

Package import in progress

To check the progress of the package import, click on the green refresh icon on the top right hand side of the page. You will know the import process was successful when you see something like the following screen, with the ProfitBricks logo displayed along with the name of the package.

Package import complete

Package import complete

Note: If the package did not install correctly, click on the Tasks item under Operations on the left hand side menu to see what happened. You may need to consult your system administrator or Odin support team if there was a problem at this stage of the installation process.

Now that the package has been imported, the next step is to install a running instance of it. Click on the application name as listed under Package and you will see the following screen.

Package overview screen

Package overview screen

You will need to click on the Instances tab and then click on the Install button.

Installing an instance

Installing an instance

On this next screen, you will need to grab the endpoint URL that was saved earlier and paste it in here. It should look something like https://endpoint.a.apsdemo.org/profitbricks

Specifying the application endpoint

Specifying the application endpoint

Once the application endpoint URL has been entered, you will be presented with the following screen. Most of the details have been pre-filled. All you need to do here is fill in your reseller credentials given to you by ProfitBricks in the username and password fields. The other values should be left alone.

Filling in your reseller details

Filling in your reseller details

You will then be presented with a confirmation screen like this one below. Scroll to the bottom and click on the Submit button.

Reseller details confirmation

Reseller details confirmation

You will be taken to the next screen like the one below, which shows the provisioning status of the app as it is bring installed.

Instance installation in progress

Instance installation in progress

This installation process should take around fifteen seconds. Click on the green refresh icon at the top right of the screen to check progress. When the installation has succeeded, you will see a green tick under the status column like below.

Activity Summary

At this stage, we need to fetch some information from the ProfitBricks reseller and cloud APIs to allow us to continue setting up the application further. These API calls are as follows:

  • A call is made to the ProfitBricks reseller API to fetch the Contract ID for the reseller. This will be used to make further API calls below.

  • Another API call is made to fetch a list of locations from the ProfitBricks cloud API. These will be added as Application Service References later on.

  • A final API call is made to the ProfitBricks reseller API to fetch a list of existing contracts that have been created, if any.

Instance installation completed

Instance installation completed

Figure: Instance installation completed.

Next, we will take a look at the Provider Control Panel for the running instance of this app.

Examining the Provider Control Panel

We will take a quick tour of each of the screens that are shown under the Provider Control Panel for the running instance of the app. Start by clicking on the name of the running instance, under the Application column. You will see a screen like the following.

Provider Control Panel

Provider Control Panel

Reseller Configuration

The reseller configuration view (pictured above) is where each of the ProfitBricks APIs can be set (cloud, billing, reseller) along with the reseller username and password. A test call is also made to each of these endpoints to aid in troubleshooting API calls.

Server Offers

This is where the provider can manage a list of configurable server offers for Tenant customers. This will be discussed in more detail later on in this document.

ProfitBricks Reseller Contracts

This view lists all contracts provisioned by the current reseller. This will also be discussed in more detail later on in this document.

General

This gives an overview of the running instance of this app, including the name, description, status, and version number. This is standard for all Odin APS modules.

Adding Resources

The next step of setting this app up involves creating a Service Template. A service template defines the services and resources that will be made available to the users of the app, also known as its Tenants.

Pay attention to the following resource model that we will use for creating our resources for our service template. An explanation of each resource property is below this list.

Application Service References

  • ProfitBricks: ASR: Application Instance
    • APS type: ProfitBricks Application
  • ProfitBricks: ASR: Location: Las Vegas
    • APS type: Locations
  • ProfitBricks: ASR: Location: Newark
    • APS type: Locations
  • ProfitBricks: ASR: Location: Frankfurt
    • APS type: Locations
  • ProfitBricks: ASR: Location: Karlsruhe
    • APS type: Locations
  • ProfitBricks: Offer:
    • APS type: Offers

A note regarding offers

While the first five items in the above list are immediately available to be provisioned as Application Service Reference resources, Offers are created by the reseller inside their Provider Control Panel.

Offers can be added at any time and included in the list of resources for the Service Template for the subscription to ProfitBricks. For adding offers, please refer to provisioning some offers.

When some offers can be added, they can then be included in the Service Template for the subscription.

Application Services

  • ProfitBricks: AS: Tenant
    • APS type: Tenant
  • ProfitBricks: AS: Datacenter
    • APS type: Datacenter

Before we create a service template, we need to create resources to be added to it. Resources are classified under the following:

Resource Class

For the purpose of this APS module, we will be dealing with two resource classes, Application Service and Application Service Reference.

An Application Service represents a resource that can be provisioned by a tenant an infinite number of times and is a resource that belongs only to that tenant. Examples in this case could include servers and data centers. By adding an Application Service to a resource template, we are saying that a tenant is allowed to create one of these resources and these are the properties and behaviors of that resource.

An Application Service Reference, on the other hand, is a resource that is added to the service template and made available to tenants as a reference, so they can use as the basis for creating their own resources. Examples in this case could include Server Offers and Locations. The tenant can reference these to use them to provision their own resources, like a new server, but they don't necessarily own them.

Name

The name of a resource is something given by the provider when it is created. It is always a good idea to keep the names of resources consistent for the same service template, so they are easier to locate when creating a service template.

APS Type

The APS type of a resource is defined on its creation and it is used to match the resource to the types defined in the APP-META.xml file. In this application, we have types such as server offers, tenants, data centers and locations. Each of these have their own behaviors and properties defined in the source code for this app, in each of their corresponding .php files.

Adding Resources

We will now start adding the resources needed for the service template. On the left hand side navigation menu, click on Applications under Services.

Applications

Applications

Click on ProfitBricks Cloud Infrastructure, then on the following screen click on the Resource Types tab.

Application Settings Screen

Application Settings Screen

We will start adding Resource Types with the Resource Class of Application Service Reference. Click on the Create button with the plus icon to see the following screen.

Selecting a Resource Class

Selecting a Resource Class

Note: Repeat these instructions for each of the Application Service References listed above.

Since we will be adding resources with a resource class of Application Service Reference, choose Application Service Reference from the list below.

On the next screen, fill in the name as you see it from the list above, then click next. The description can be left blank.

Naming the Resource

Naming the Resource

You will be presented with a list of APS Types like the ones below. Choose the correct APS type that corresponds to the resource you are creating. In this case, it will be ProfitBricks Application.

Choosing the resource type

Choosing the resource type

On the next screen, click on the link under the Resource column in the table. This is where we choose the actual resource.

Choosing the resource

Choosing the resource

On the next confirmation screen, just click Finish.

Confirmation screen

Confirmation screen

Once you have completed these steps, you should have something like the following:

Confirmation screen

Confirmation screen

Now that we have added the Application Service Reference resources, we need to start adding our Application Service resources.

Follow the same process as above, by clicking on Create, but this time choose Application Service.

On the following screen, put in the name for the resource (it is a good idea to start with ProfitBricks: AS: Tenant), then click next.

On the following screen, choose Tenant, then on the following screen, tick the box that says 'Automatically provision service'. The Priority field should always be left blank.

Important note: We need to tick Automatically provision service. when adding the Tenant Application Service. We only need to do this for the Tenant and not for the other Application Service resources being added.

Adding an Application Service

Adding an Application Service

Click Next, and on the following screen, click Finish. Repeat this process to add the Data Center Application Service.

We have now added all the resources we need to create the Service Template. You should have something that looks like the following below.

All resources

All resources

Setting Up a Service Template

Finally, we will need to set up a Service Template and add all the resources we have just created. Click on Service Templates under Products on the left hand side navigation menu.

Service Templates

Service Templates

You will need to click on the Add New Service Template button where you will be taken to the following screen.

Adding a new Service Template

Adding a new Service Template

Give the Service Template the name of ProfitBricks Service Template and leave the rest of the fields as they are, clicking on Next.

Selecting resources for the new Service Template

Selecting resources for the new Service Template

On this screen, scroll down and find the resources we created earlier, placing a tick beside each of them. You should have six ticked in total. Scroll to the bottom of the view and click on Next.

Resource selection confirmation

Resource selection confirmation

On this screen, just click Next. You don't need to change any of these values. On the confirmation screen, just click Finish. We have now created a Service Template.

Provisioning Offers

Now that we have created our Service Template, it's time to start adding some offers for users, who can then use them as the basis for creating their own servers.

Click on Applications under Services on the left hand side navigation menu and then click on the APS Instances tab.

APS Instances

APS Instances

Click on ProfitBricks Cloud Infrastructure, and you will be taken to the control panel for the installed instance of the app.

Instance control panel

Instance control panel

On the following screen, you will see where server offers are listed. Click on the New offer button.

Offer Listing

Offer Listing

On the following view, fill in some basic offer details like below.

Basic offer details

Basic offer details

Click on next, and then you will be taken to another screen where you can set the hardware parameters for the server and choose an Operating System image to go with it.

Offer Hardware

Offer Hardware

Note: The list of images that appear on the above view were fetched from ProfitBricks earlier on as part of the application instance installation process.

Repeat the same steps above to create new server offers for users. You should have something that looks like the following:

Offers

Offers

Offers can be added, edited, and deleted. We now need to add new resources with the resource class of Application Service Reference to the resources for our installed instance of this app.

Click on Applications under Services, then click on the APS Packages tab, then click on ProfitBricks Cloud Infrastructure.

On the next screen, click on the Resource Types tab, then click on the Create button.

At this point, we can follow the steps outlined in chapter six for adding Resource Types. An offer should be added as an Application Service Reference.

Give the name of the resource as something like ProfitBricks: Offer: Linux Basic to maintain consistency, then on the next screen choose Server Configuration Offers as the APS Type.

You will be presented with a list of offers. Find the corresponding offer name (Linux Basic) and click on that.

On the next screen click on the Finish button. Repeat these steps for the other three offers. When you are finished, you will have something like the following:

Offers as resources

Offers as resources

To update the Service Template, click on Service Templates under Products on the left hand side navigation menu, then click on ProfitBricks Service Template.

ProfitBricks Service Template

ProfitBricks Service Template

Click on Resources, then click on Add Resources. Scroll down to find the resources we have just created for the four offers and tick each of them.

Updating the Service Template

Updating the Service Template

Scroll to the bottom of the page and click the Submit button. On the following confirmation screen, just click the blue Submit button.

Your Service Template should look like the following.

Updated Service Template

Updated Service Template

Click on the General tab, then click on the button labelled Apply Template Limits and Parameters. This will update the Service Template for all new and existing subscriptions.

Usage Examples

Create a Subscription

Before we subscribe a user to the Service Template for this app, we need to create one.

Create the New User

Follow these steps to create a new user.

  • To do this, navigate to Customers under Operations using the left hand menu, then click on the Add New Customer button.

  • The process of doing this is quite simple and will not be documented here - it is fairly self explanatory.

Create the Subscription

  • Next, we need to navigate to Subscriptions under Operations using the left hand menu.

  • Click the button labelled Create New Subscription.

  • Choose the customer user we have just created.

  • On the next screen, choose ProfitBricks Service Template.

Service Template Selection

Service Template Selection

  • On the following screen, leave everything as it is and click the Next button.
Service Template Resources

Service Template Resources

  • On this screen, just click Finish.
Complete subscription

Complete subscription

The user has now been subscribed to the Service Template associated with this application.

Activity Summary

  • A new contract is created on ProfitBricks for the user, who is now a Tenant.

  • Their details are posted to the ProfitBricks reseller API to create a contract and the Tenant is assigned a Contract ID.

  • This Contract ID will be used to identify the user when calls are made to modify resources, such as editing a server.

  • When a new contract is created for a Tenant, some resource limits are allocated on a contract and server basis.

  • These limits mean that when adding a new server, a maximum number of cores can be specified along with RAM, SSD, HDD space etc.

  • Four new Data Centers are created for the user, one for each of the locations Frankfurt, Karlsruhe, Newark, and Las Vegas.

Note: When calls are made to the ProfitBricks API, the credentials used are the resellers credentials and this is the case for all Tenants, who are identified by their Contract IDs.

Customer Control Panel

Now, we will sign in to the users Customer Control Panel and carry out some basic operations.

This is what we see when we look at a list of users and their subscriptions.

Subscriptions

Subscriptions

To sign in as the user we have just subscribed, tap on the icon underneath Actions on the far right hand side.

On the next screen, tap on the ProfitBricks Cloud Infrastructure tab.

Customer Control Panel

Customer Control Panel

Adding a Server

The Process of adding a server is quite simple. As above, you will see that there are no servers provisioned yet, nor are we using any of our allocated resources.

Click on the Create Server button and you will be taken to the following screen.

Add a new server

Add a new server

At this point, you have two options. One is to create a custom server, the other is to choose an offer and use that as the basis for configuring our new server.

Choose one of the pre-configured offers. At this point you will be presented with a series of provisioning screens so you can customize your server.

New server step 1

New server step 1

Figure: First step of adding a new server.

New server step 2

New server step 2

Figure: Second step of adding a new server.

New server step 3

New server step 3

Figure: Final step of adding a new server.

New server provisioning

New server provisioning

Figure: Server provisioning.

New server completed

New server completed

Figure: Server completed.

Server as it is listed

Server as it is listed

Figure: Server as it is listed.

Billing

Customers can also view a cost breakdown of their resource usage on a month by month basis.

A combination of billing products and metered usage produces a list of associated items and their costs, with a grand total calculated for any given month.

A user can choose any month from the date their subscription was created to the present month.

Note: New users will not see any billing data for at least a couple of days.

Usage for a given month

Usage for a given month

Provider Control Panel

As part of this APS application, some views have been added to assist the reseller in curating offers, managing tenants and checking the status of the ProfitBricks API. These are as follows:

Reseller Confguration

Reseller configuration.

Reseller configuration.

The reseller configuration tab allows resellers to update their ProfitBricks reseller credentials in order to make calls to the APIs on behalf of themselves and their tenants. When this tab is loaded, a check takes place with a dummy call to each of the three ProfitBricks APIs (billing, cloud, reseller) and checks to see if a connection can be made to them given the currently saved credentials. This is usually a good place to help troubleshoot connection issues.

Server Offers

Server Offers.

Server Offers.

The Server Offers tab is where curated offers for tenants are added, edited, and deleted.

ProfitBricks Reseller Contracts

ProfitBricks Reseller Contracts

ProfitBricks Reseller Contracts

The Reseller Contracts view displays a list of all contracts that have been created by the resellers master contract, along with their Contract IDs, company names, and whether or not they are subscribed as a Tenant in the current APS system.

Using this list, it is also possible to select a tenant and remove all their resources on the ProfitBricks side. It is also possible to access a detail view for a tenant, where a breakdown of their resource usage, list of Data Centers and servers are presented.

Contract details

Contract details

Note: When removing all the resources belonging to a contract on the ProfitBricks side, a call is made to delete all the Data Centers associated with that contract. This cascades down and deletes all billable resources belonging to that contract and is an irreversible process. A contract that has a tenant associated with it in the current control panel cannot have all their resources deleted. They must first be unsubscribed from the Service Template(s) associated with this application.

Note: When an instance of this application is installed, all provisioned contracts are fetched from the ProfitBricks side. Any new contracts added in the current APS sandbox/PCP are added here also. This means that contracts can still be viewed and managed more easily.

Important Notes

  • When unsubscribing a Tenant user from a Service Template, you will need to return to the ProfitBricks Reseller Contracts view, select the Tenant associated with the contract, and click the button labelled Remotely Delete Resources at the top of the page. This will complete the unsubscription process and ensure their billable resources have been removed completely.

  • When disabling a user who has a subscription to the Service Template associated with this application, a call is made to the ProfitBricks cloud API to disable each one of their running servers in turn. When the tenant has been re-enabled, another call is made to start each one of their servers.

References