Platform v7.2-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. Hostnames to be updated for configurations related to internal service invocation 
  3. Update Workflow shared Variables and reload cache
    1. API to edit variables: 
    2. API to fetch all variables
  4. Remove Portfolio manager persona 
  5. Clear Keycloak Cache 
  6. Upload Micro actions to Organization/Master during Upgrade 
  7. 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) 
  8. iHub – Configuration 
  9. Archiva setup  
    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
  10. New Roles and Permissions for Core Platform
  11. Outlook Integration
  12. Environment Variables for Archival Container
  13. Archival API Details
    1. API to save/update Data:
    2. API to delete Data:
    3. API to Retrieve Data:
  14. Master Configurations
  15. UI Setup 
  16. Organization Admin Console UI change (no action to be done as part of post deployment activity).  
  17. ENV variables for Reliable Execution of Queued requests

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. 

Hostnames to be updated for configurations related to internal service invocation 

In Kubernetes environment, the internal service names have changed when compared to Swarm environment. So, for internal service communications, all the hostnames of the services are now prefixed based on the domain. That is, based on the domain and region, the hostname will differ.  This is applicable for areas where service URLS and configurable. 

Example Scenarios: 

 

  1. Clones Engine can now be accessed in SmartOps DI Platform internally as "http://smartops-dev-clones-engine:9090" (earlier this used to  http://clones-engine:9090). In QA, the prefix will change to smartops-qa. In PaaS ITOps DI, this will become http://itops-dev-clones-engine:9090  and so on. 

  2. In micro actions, if you need to call any other service through micro action, you can follow this pattern. 

  3. Another example is the case with elastic search Sense Channel where elastic search URL is configurable through UI. There, Elastic Search URL becomes http://smartops-dev-elasticsearch:9200  for Platform DI environment  

Note: 

It is to be noted that nothing has changed in the service side. Only the name of the service has been changed as part of Kubernetes implementation. Users can get the full list of applicable service names from Dev- Enablement team. 

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: 

Method: PUT 

URLhttps://<hostname>/designer/api/clones/dashboard/orgnworkflows/updateSharedVariable/{variableId}  

Headers: offline-token or Authorization, user and Organization-key 

RequestBody :  

  "sensitiveFlag": 0, 

  "variableName": "string", 

  "variableValue": "string" 

PathVariable: variableId 

Note: 

 

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 fetch all variables

Method: GET 

URLhttps://<hostname>/designer/api/clones/dashboard/orgnworkflows/fetchSharedVariable 

Headers: offline-token or Authorization, Organization-key 

 

API to reload cache for workflow shared variables: 

Method: POST 

URLhttps://<hostname>/clonesengine/api/clones/engine/core/executions/reloadWorkflowSharedVariables 

Headers : offline-token or Authorization, Organization-key 

Remove Portfolio manager persona 

Portfolio manager persona is no longer required as the corresponding widgets have been removed from dashboard. To remove portfolio manager role, follow the steps mentioned below: 

1. Login to Keycloak Master Admin console. 

2. Select each Realms and click on Roles tab 

3. Click on Delete button against portfolio_manager role and confirm to delete the role from the realm. 

Picture 26 

Picture 25 

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. 

Upload Micro actions to Organization/Master during Upgrade 

During upgrade, please upload required micro actions to applicable Organizations and Master Org. 

Microactions are available at Microactions

Following are the new/updated Micro Actions for Core-Platform: - 

MA Name 

Display Name 

Category 

Release 

outboundmq_publish 

outboundmq_publish 

Others 

7.1 

queue_publish_vhost 

Queue.Publish.Vhost 

Service 

7.1 

 

 

Release-7.2 

MA Name 

Display Name 

 

Category 

 

Release 

 

mongodb_deletemany_documents_java 

Mongodb.Deletemany.Documents.Java 

Storage 

7.2 

mongodb_deleteone_document_java 

Mongodb.Deleteone.Document.Java 

Storage 

7.2 

mongodb_findmany_java 

Mongodb.Findmany.Java 

Storage 

 

7.2 

 

mongodb_findone_java 

Mongodb.FindOne.Java 

Storage 

 

7.2 

 

mongodb_insertmany_java 

Mongodb.Insertmany.Java 

Storage 

 

7.2 

 

mongodb_insertone_java 

Mongodb.Insertone.Java 

 

Storage 

 

7.2 

 

mongodb_updatemany_java 

Mongodb.Updatemany.Java 

Storage 

 

7.2 

 

mongodb_updateone_java 

Mongodb.Updateone.Java 

 

Storage 

 

7.2 

 

 

Microactions for v7.2 is available at Microactions 

 

Note: 

  1. During fresh installation, these MAs will already be part of the dump and so these steps can be ignored. 

  2. There might be other MAs specific to individual PWFs, these can be uploaded based on need. For details regarding MAs specific to PWFs, respective teams need to be checked with. 

  3. There might be skills also which needs to be imported for specific PWF and details can be checked with respective teams. 

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

 

Archiva setup  

Use below configurations to setup Archiva for proxy environments where network accessibility is not there: 

 

Picture 18 

For more on Archiva please refer here :  

http://clones-dev.southindia.cloudapp.azure.com:8080/smartops-dev-guide/archiva/ 

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.

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_STEP_RUN_ENABLE_ALL_DATABASES: "true"

ARCHIVAL_STEP_RUN_ENABLED_DATABASES: "null"

Note: Currently available database names are clones_core, clones_engine and smartops.

Note:

Based on testing done in DI, it is identified that FinOps mostly has lesser data when compared to Platform and ITOps. So, it is assumed that FinOps can be run based on daily run. ITOps and Platform would mostly require hourly run because of the huge volume of data expected. However, for the very first run, it is advisable to run all environments based on hourly run.

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:

Method: POST

URL:

Headers: Authorization, user and Organization-key

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 Retrieve Data:

1.Method: GET

2.URL:

3.Headers: Authorization, user and Organization-key

4.RequestParam: dbConfigId (required = false)

Master Configurations

APIs for managing master configurations are now accessible only for master admin user. These APIs are authorized with the Organization, ‘master’ and a valid Bearer token of master admin.

Master Configuration API Details

APIs are available for save/update, fetch and delete master configurations. Organization-key value should be ‘master’ for all the below APIs.

1). API to save/update

Method: POST

URL:

Headers: Authorization, user, Organization-key

RequestBody Sample:

{

"componentType": "string",

"defaultValue": "string",

"description": "string",

"displayName": "string",

"displayOrder": 0,

"dynamic": true,

"groupName": "string",

"installationProperty": true,

"key": "string",

"mandatory": true,

"options": [

{

"key": "string",

"value": "string"

}

],

"pwfName": "string",

"readOnly": true,

"sensitive": true,

"serviceType": "string",

"unique": true

}

 

2). API to Delete

Method: DELETE

URL: }

Headers: Authorization, user, Organization-key

Path variable: mcId (Required = true)

 

3). API to fetch by PWF Id

Method: GET

URL: }

Headers: Authorization, user, Organization-key

Path variable: pwfId (Required = true)

RequestParam: pageNumber (required = false)

RequestParam: pageSize(required = false)

 

4). API to fetch by McId

Method: GET

URL: }

Headers: Authorization, user, Organization-key

Path variable: mcId (Required = true)

 

UI Setup 

Project code base setup 

Clone from smartops-ui-mux repo 

npm install 

run the platform application 

npm run base 

Browser address  

Organization Admin Console UI change (no action to be done as part of post deployment activity).  

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 1

ENV variables for Reliable Execution of Queued requests

Release 7.3.1 

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: 

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

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. 

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.