Platform v7.6-Post Deployment Process

An Installation Engineer is required to perform a few steps after SmartOps deployment is completed.

The steps and related to core-platform are: 

Contents

  1. Generate Offline Token 
  2. Clear Keycloak Cache 
  3. PWF/Product/Component Association and De-association with Organization
  4. iHub – Configuration 
  5. Release 7.3: ENV variables for Reliable Execution of Queued requests
  6. Release 7.5: Adding system_flow_executor role for sense_master user in Existing Organizations
  7. PwF Flavour Integration doc (Required only if any PwF teams plan an Integration with Flavours) 
    1. Creating Organizations and adding Users
    2. Create realm for a new organization
    3. Defining Web Redirect URI for the Organisation
    4. Add Users and Assign Roles
  8. New Roles and Permissions for Core Platform
  9. Outlook Integration
  10. Update Workflow shared Variables and reload Cache
  11. Environment Variables for Archival Container
  12. Archival API Details
  13. Organization Admin Console UI change (Applicable from R7.3)

Generate Offline Token 

To generate an offline token for an organization, login to Master Organization and follow the steps below: 

  1. Click on Manage Tokens corresponding to the organization as shown below:

Picture 29 

This displays the token window as shown below 

Picture 28 

2. Click on the Picture 27 icon to copy the offline token. 

 

Clear Keycloak Cache 

This step needs to be done only if clones-upgrade container was run for the deployment. To clear the Keycloak cache, follow the steps mentioned below: 

1. Login to Keycloak Master Admin console. 

2. Select any of the Realms and in Realm Settings and go to Cache tab. 

3. Click on all the three Clear buttons (Realm Cache, User Cache and Keys Cache) to clear cache in all realms. 

Picture 24 

Note:  

  1. This process is required only if the clones-upgrade program was run as part of deployment.  

  2. In case the person who is doing the post-deployment steps are not aware of the deployment procedures completed, this can be executed. 

PWF/Product/Component Association and De-association with Organization

(mandatory step if any of the PWF/Product/Component needs to be de-associated in an organization) 

For each environment, the de-association/association of PWFs, products, components in respective environments/instances (namely, core platform, ITOps, Invoice PWF) can be done. This will include the de-association of monitoring/support PWFs after data migration, as well as the association of new ITOps PWF and these steps are done via API.  

Postman Collection contains sample request/response samples for the various APIs for association and de-association. It is on need basis that these need to get executed. For actual usage, these should be replaced with appropriate values for host, headers and request body. PFB the details of each of these APIs: 

 

  1. Invoke the SmartOps Login API for the applicable Organization. 
    URL: POST https://<host_name>/pwf/api/smartops/login Body: {"realm":"<orgname>","userName":"<user_name>","password":"<password>"} 

  2. Invoke the Get all PWFS, Products and Components (stacks) API with the following parameters to fetch all available PWFS, products and components:
    URL: GET https://<host_name>/pwf/api/smartops/pwf/fetch-smartops-capabilities 
    Headers:  
    Organization-name–Unique identifier for the organization. 
    Authorization –Access token generated after invoking SmartOps login API (offline token can also be used) 
    user –User Id 
    Note: This API response provides the details of the PWFs, products and components available and it is based on these values the input for the rest of the APIs given below can be derived.  

  3.  Invoke the Add Product and PWF association API to add or associate applicable PWFs and Products in the required Organization.
    URL: PUT https://<host_name>/pwf/api/smartops/pwf/create-pwf-or-product-association 
    Headers: 
    Organization-name – Unique identifier for the organisation. 
    Authorization – Access token generated after invoking SmartOps login API (offline token can also be used) 
    user – User Id Body: {"componentId": <component_id>,"componentType":"<component_type>"} 
    Component ID –Unique identifier of the package workflow or product (copied from previous step) 
    Component Type –pwf / product 
    Note: Repeat this step for every PWF / product to be associated to the organization. 

  4. Invoke Disable PWF Association API if you need to de-associate any PWF from an organization. URL: PUT https://<host_name>/pwf/api/smartops/pwf/disable-pwf-association?pwfId=<pwf_id > 
    Headers: Authorization, user and Organization-key 
    Param: <pwf_id> 
    Note: Disabling PWF association will only disable the association of PWF with that organization. If there are any active projects associated wit that PWF, these projects should be de-activated or deleted to avoid further executions of these projects. 

  5. Invoke Remove Product Association API if you need to de-associate any Product from an organization.
    URL: DELETE https://<host_name>/pwf/api/smartops/pwf/remove-product-association/<product_id> 
    Headers: Authorization, user and Organization-key 
    Param: <product_id> 

  6. Associate/De-Associate components/stack to a Product or a PWF 
    The details are as follows:

    1. API details to Associate Stacks with PWF/Product: 
      URL: PUT https://<hostname>/pwf/api/smartops/pwf/add-component-association
      Headers: Authorization, user and Organization-key.
      Body: {"componentId":<component_id>,"componentType":"<component_type>","stacks":[<list_of_stacks>]} 

    2. API details to De-associate Stacks from PWF/Product: 
      URL: DELETE https://<hostname>/pwf/api/smartops/pwf/remove-component-association 
      Headers: Authorization, user and Organization-key 
      Body{"componentId":<component_id>,"componentType":"<component_type>","stacks":[<list_of_stacks>]} 

Note: 

iHub – Configuration 

For details on iHub, refer 

Introduction to IHub

Introduction to IHub Lite

 

Release 7.3: ENV variables for Reliable Execution of Queued requests

With respect to the retry mechanism followed for reprocessing requests which have remained in Queued status in Clones Engine, there are a few ENV variables which can be configured based on user requirements. Following are the environment variables, which, if needed, should be changed in Clones Engine ENV file. Default values given are specified here:

  1. Requeue schedule frequency (time in milliseconds) based on which queued up requests will be processed again:

    1. CLONES_REQUEUE_INTERVAL=1800000
      With the above value (1800000 milliseconds), scheduler will run every 30 minutes to take up requests which have not been processed by engine and thus remained in ‘Queued’ state.

  2. Time variables for Requeue flow. Requests created before CLONES_REQUEUE_START_TIME_IN_MINUTES but not before CLONES_REQUEUE_END_TIME_IN_MINUTES from scheduler run time will be taken up for reprocessing.

    1. CLONES_REQUEUE_START_TIME_IN_MINUTES=5

    2. CLONES_REQUEUE_END_TIME_IN_MINUTES=120

 

Release 7.5: Adding system_flow_executor role for sense_master user in Existing Organizations

For Existing Organizations in existing environments, sense_master needs to be mapped with the new role system_flow_executor. user

After mapping the sense_master user with new role system_flow_executor offline_token needs to be regenerated for that organization.

Note:

For newly created organizations the system_flow_executor role will be automatically mapped with the sense_master user.

PwF Flavour Integration doc (Required only if any PwF teams plan an Integration with Flavours) 

 

Creating Organizations and adding Users

Create realm for a new organization

To create a new organization in SmartOps, follow the steps mentioned below:

  1. Access the Master User Interface. The Master UI login page is displayed as shown in FigureFigure.

    Picture 1753666617

  2. Enter the user credentials (Master Admin) in the Username and Password field.

  3. Click Sign in. SmartOps Master UI home page is displayed as shown in FigureFigure.

    Picture 653533137

  4. Click Organizations tab. By default, Organization is displayed.

  5. Click on the Picture 690548184 icon near Organizations. The window for creating a new organization is displayed as shown in FigureFigure.

    Picture 1307015390

  6. Enter the name of the organization in the Organization Name field.

  7. Click Add. The SmartOps Master UI home page is refreshed with the new organization as shown in FigureFigure.

    Picture 1082715580

Defining Web Redirect URI for the Organisation

To define the web redirect URI for the new organization, follow the steps mentioned below:

  1. Click on Edit Organisation corresponding to the organisation in FigureFigure

    Picture 2146521433
    This will open the Keycloak Administration UI where you can create an Organization Administrator user and do other configurations.

  2. Click on Clients tab from the menu options available on the left-hand side of the screen and select smartops-frontend from the Clients as shown in FigureFigure.

    Picture 1867205476

  3. Enter the URI in Valid Redirect URIs and Web Origins field as shown in FigureFigure.

  4. Click Save. The success message is displayed as shown in FigureFigure.

    Picture 29091237

Add Users and Assign Roles

Master Administrator can add users such as Admin, Installation Engineer, and Skills Designer through Master UI. The Roles and Permissions corresponding to each Package Workflow is detailed in the section Appendix: PWF Roles and Permissions To add users and assign corresponding roles, follow the steps mentioned below:

  1. Click on Edit Organisation corresponding to the organisation as shown in FigureFigure.

    Picture 1521035244
    This will open the Keycloak Administration UI where you can create an Organization Administrator user and do other configurations.

  2. Click on Users tab from the menu options available on the left-hand side of the screen and click Add User as shown in FigureFigure.

    Picture 1611911245

    The Add User screen is displayed as shown below.

    Picture 2126124510

  3. Enter the username in the User Name field. You may also enter all other optional fields. Click Save.

  4. Select the user from the list. You may search from the Search field.

  5. Navigate to Role Mappings tab and add the required roles from the Available Roles block.

  6. To add a role, select the required role from the Available Roles block and click on Add selected icon as shown in FigureFigure.

    Picture 250398114

    You may assign roles as per requirement of the Package Workflow required as shown below. For example: Admin, Installation Engineer and Skills Designer Roles.

    Picture 87998495

  7. You may also assign password for the user. To assign password:

 

New Roles and Permissions for Core Platform

New roles have been added for iHub and these can be added to applicable users based on the requirement: 

Following permissions have been newly introduced (this is just for understanding purpose and there is no action required as part of post deployment): 

Permissions 

Description 

Associated Roles 

ihub_channel_listing 

List iHub channels 

Ihub Administrator, Ihub User 

ihub_channel_edit_conf 

Edit iHub channel configuration 

Ihub Administrator 

ihub_channel_enable_disable 

Enable or disable iHub channels 

Ihub Administrator 

ihub_channel_view_conf 

View iHub channel configuration 

Ihub Administrator, Ihub User 

smartops-component-access 

Access SmartOps Components 

Skill Designer, Portfolio Manager, Installation Engineer, Ihub Administrator, Ihub User 

Outlook Integration

Refer this Link for details.

Generic Notes:

  1. While adding roles to a user in Keycloak, it is enough to add roles needed for that specific user. For example, an Invex user may not need roles corresponding to ITOps. Adding all available roles to a user may result in header size issue and the application may not be accessible for that specific user.

  2. To get contents in the Clones dead letter queue (clones.dlx.queue), the following API can be saved in Service.Connect MA:

    URL: http://<hostname>:15672/api/queues/clones/clones.dlx.queue/get

    Method: POST

    body: {"vhost":"clones","name":"clones.dlx.queue","truncate":"50000","ackmode":"ack_requeue_true","encoding":"auto","count":"3"} //count can be updated based on the number of records to be fetched

    username:admin

    password:*****

  3. While installing and updating a PWF project, the status of the project will become ‘Installing’ and ‘Updating’ respectively. During this time, workflow execution of only the Installation and Update workflows will be allowed. All other workflows will be prevented from getting executed.

Update Workflow shared Variables and reload Cache

Workflow shared variables are certain variables which can be used in workflows. The default variables are saved in DB. Based on the installed environment, it is required to edit certain variables.

An installation engineer should make sure that the following variables are changed based on the environment. There is an API currently available and can be used to edit the variables. After editing the variables, invoke another API to reload the cache. The details are given below:

API to edit variables:

  1. Method: PUT
  2. URL: https://<hostname>/designer/api/clones/dashboard/orgnworkflows/updateSharedVariable/{variableId}
  3. Headers: offline-token or Authorization, user and Organization-key
  4. RequestBody :

    {

      "sensitiveFlag": 0,

      "variableName": "string",

      "variableValue": "string"

    }

  5. PathVariable : variableId

 

 

Notes:

 

Variable ID

Org ID

Variable Name

Variable Value

1

 

clones.engine.host

http://smartops-dev-clones-engine:9090

10

1

clones.dialog.host

http://smartops-dev-clones-dialog:8082

16

1

nlp.ice.url

http://smartops-dev-ice-xd-rest:8021/api/parse/predict

21

1

clones.queue.host

smartops-dev-rabbitmq

 

Variable ID

Org ID

Variable Name

17

1

nlp.ice.subscriptionId

 

 

API to reload cache for workflow shared variables:

  1. Method: POST

  2. URL: https://<hostname>/clonesengine/api/clones/engine/core/executions/reloadWorkflowSharedVariables

  3. Headers : offline-token or Authorization, Organization-key

 

Environment Variables for Archival Container

  1. For archival process, certain PWF APIs are used for fetching archival configurations and logging the archival status. These APIs are authorized with the Organization ID and Offline Token of a valid Organization. By default, the Organization ID used is 1 based on the assumption that this organization will have a valid offline token generated. But in case, Organization with ID 1 is not an active organization, the environment variable 'ARCHIVAL_ACCESS_ORG_ID' can be used to provide the ID of an active organization.

  2. Considering the need for performance optimization, archival process can be run on daily basis as well as hourly basis. This can be decided based on the volume of data expected in an environment. This can be configured based on the minimum, maximum days and run size based on days or hours

    In an environment where SmartOps application has previously been running (that is, an  upgraded environment and not a new one), data should already be available in the   transaction tables. So, in such  environments, it is advisable to run archival on an hourly basis  during the first run. Afterwards, it can be decided to keep it on hourly/daily basis. Run size  can also be decided based on the volume of data.

    Following are the environment variables available which can be used to configure the archival process with their default values:

 

Archival API Details

APIs are be available to save/update values and will be used by end users for adding organization specific data to the archival_duration table.

API to save/update Data:

    1. Method: POST

    2. URL:

    3. Headers: Authorization, user and Organization-key

    4. RequestBody :

{

"dbConfigId" : Integer,

"dbName" : "String",

"hotArchivalPriorTo" : Integer,

"coldArchivalPriorTo" : Integer,

"permanantDeletePriorTo" : Integer

}

 

API to delete Data

1.Method: DELETE

2.URL:

3.Headers: Authorization, user and Organization-key

4.RequestParam: durationId (required = true)

 

API to Rerieve Data

1.Method: GET

2.URL:

3.Headers: Authorization, user and Organization-key

4.RequestParam: dbConfigId (required = false)

 

Organization Admin Console UI change (Applicable from R7.3)

We have added a new permission realm-admin to installation_engineer role in Keyclaok. Users assigned with installation_engineer role will get access to more features in Keycloak Admin console for the corresponding realm/organization. This change was introduced as a part of staggered release support. The additional features for admin console are shown as below:

Picture 253563034