Deployment

This step helps you install and prepare the demo application on your test system for providing the application services to customers.

../../../../_images/event-step-model.png ../../../../_images/event-step-meta.png ../../../../_images/event-step-provision.png ../../../../_images/event-step-presentation.png ../../../../_images/event-step-deploy-b.png ../../../../_images/event-step-provisioning.png

Continue the demo project from the previous step.

Prepare Product Deployment Configuration

As explained in the Product Initialization concepts and implemented in the Product Deployment Assistance step of the Offer Management demo project, to simplify creation of the products for sale you should prepare the product deployment configuration inside the APS package.

If you cloned the package from the User Management demo package following the Start Your Demo Project instructions, you already have the product deployment configuration.

Extend this configuration by adding the event resource type and including the latter to a service template. For this purpose, open the scripts/wizard_data.json file and follow these steps.

  1. In the resourceTypes array, add the following section to create the Event Manager resource type:

    {
       "name": "Event Processing demo - Event Manager",
       "id": -500007,
       "resClass": "rc.saas.service",
       "required": false,
       "actParams": {
          "service_id": "events",
          "autoprovide_service": 1
       }
    }
    
  2. Use the above id to add the required resource to the serviceTemplate/resources array as in the following example:

    {
       "limit": 1,
       "unlimited": false,
       "rtID": -500007
    }
    
  3. In the context resource type, change the autoprovide_service property from 1 to 0:

    {
       "name": "Event Processing demo - Management Environment",
       "id": -500004,
       "resClass": "rc.saas.service",
       "required": true,
       "actParams": {
           "service_id": "contexts",
           "autoprovide_service": 0
       }
    }
    

    Note

    1. In accordance with the Resource Model, the event resource type must be auto-provisioned. So, you set the "autoprovide_service":1 property.

    2. Since the auto-provisioned event resource requires a link with a context resource, the latter will be provisioned along with the event resource. To avoid creation of two context resources in a subscription, the context resource type cannot be auto-provisioned.

  4. Optionally, change the names of product components to reflect the application name.

Prepare APS Connector Image

To create a Docker image from your package and use it later, do the following.

  1. In the deployment.xml file, enter a unique image name that will be used in the Docker image tag, for example:

    <?xml version="1.0" encoding="UTF-8"?>
    <deployment>
       <imageName>isv1/events</imageName>
       <applicationPort>1443</applicationPort>
       <applicationUrlPath>endpoint</applicationUrlPath>
    </deployment>
    

    Note

    The “isv1” prefix in the above configuration is a placeholder for your actual account in the Docker official hub. The value you assign to the <imageName> element must be used later as the prefix in the image tag when creating an image.

  2. Copy the project folder to the node where you have the Docker service for creating Docker images, for example:

    $ scp -r event-mgmt root@docker-endpoint.a.isv1.apsdemo.org:
    
  3. Build the image on that node, for example:

    $ ssh root@docker-endpoint.a.isv1.apsdemo.org
    # cd event-mgmt
    # docker build -f deploy-image/Dockerfile -t isv1/events:1.0-0 .
    

    Note

    In the above command, ensure the following:

    • Do not miss the final point (.).

    • Instead of the “isv1” placeholder, use your own login name registered at the Docker hub.

    • The tag name, for example, “isv1/events”, is the same as in the deployment.xml file.

    • The tag version is the same as the combined version and release in the APP-META.xml file. For the above example, those parameters must be:

      <version>1.0</version>
      <release>0</release>
      
  4. Log in to the Docker hub using the login name as in the image tag prefix.

    # docker login
    
  5. Push the new image to the Docker hub, for example:

    # docker push isv1/events:1.0-0
    

Build Package

Build the package from the project folder event-mgmt/ using the following command:

$ aps build event-mgmt

Import Package

Import the package to your lab platform as described in the Package Import section.

Install Application Instance

Follow the steps in the Deploy APS Application Instance section of the Get Started project to install the application instance from the Docker image you have created earlier.

Deploy Product

The goal of the product deployment step is to create a service template (for OSS) and service plan (for BSS) to provide the application services to customers. If you followed the Prepare Product Deployment Configuration step, the application allows you now to use the wizard to create the application products. In this case, start the product deployment right from the Instances tab of the imported application as explained in the Create Service Template section of the Get Started project. You can follow the wizard steps if you need to view and change the default configuration. Otherwise, you can jump to the Summary step.

The following configuration presents the final set of the resource types and the service template for deployment when the platform consists of the OSS only:

../../../../_images/event-deploy-summary.png

Conclusion

On completion of the deployment steps, your platform has an installed APS application instance and a service template to provide the application services to customers.