Provisioning and Consuming Add-Ons

Depending on settings configured by the Platform Operator, your Platform may offer extended functionality through Platform Add-Ons.  If this is the case, you will be able to provision, de-provision, and consume individual instances of any Add-On that has been made available to your Development Team.

Provisioning and Managing Add-On Instances

You can provision and manage individual Add-On instances (which can be consumed by your guest applications) through the following:

Consuming Add-On Instances through Guest Applications

Once you have provisioned an instance of an Add-On, it is very simple to consume it in your application. A provisioned Add-On instance gets a conditional app configuration token similar to the application configuration tokens available on the Platform. This token can be referenced within an application to consume the corresponding Add-On instance. The token’s format is $#ADDON-{INSTANCE-ALIAS}#$, where {INSTANCE-ALIAS} is the alias of the Add-On instance you wish to consume.

For example, let’s assume that you have provisioned an instance of the MongoDB Add-On using the Apprenda Cloud Shell:

>.\acs.exe ProvisionAddOn -Alias mongodb -InstanceAlias taskrmongodb -Options "username=taskradmin,password=password"
Provisioning a new instance of the add-on 'mongodb'...
Add-on provisioned successfully. Result:

Add the following to your application’s configuration file:

    <add key="TaskrMongoDbConnectionString" value="$#ADDON-taskrmongodb#$"/>

To connect and application to your MongoDB instance, configure your application to consume the value of TaskrMongoDbConnectionString. The Platform will switch $#ADDON-taskrmongodb#$ with the value of the real connection string when your application is promoted and deployed.