Hi everyone,
We previously explained how the Thinkwise Platform version 2021.3 revised the way creation and automation works.
In the Thinkwise Platform version 2022.1, we also revised the way the Synchronization to IAM (Intelligent Application Manager) and Deployment package screens work, allowing for seamless integration in CI/CD tools that many have been waiting for.
The Synchronization and Deployment processes are the final two processes that now have been made to fully run via Indicium and therefore can be initialized via Indicium's API. More on that later in this blog.
In the previous version, the steps in these screens were bound to a specific client. A developer would start to Synchronize to IAM and the synchronization would be orchestrated start-to-end by the user’s client. This also applies for the Deployment package process. This has served us well for many years, but there are some drawbacks that we’ve addressed in this release.
The new approach
All ‘jobs’ are no longer performed by a client but are instead performed by Indicium. This means that the Synchronization to IAM, Synchronization to Disk, and Deployment package process will continue even if the developer closes the screen or even the Software Factory GUI.
Furthermore, all developers will be able to track the progress of a job. If a developer starts to synchronize to IAM, a different developer will also see this in their Synchronization to IAM screen.
What has changed for the developer?
A couple of changes have been made to make these processes as convenient as possible to use. Let's start with IAM configurations.
IAM configurations
One change that has been made is that it no longer is necessary to re-enter the credentials when synchronizing. A new screen has been implemented that holds all IAM configurations. Here we can see the screen:
Within the IAM configuration screen, it is also possible to select the default target IAM. This target will then automatically be defaulted to when Synchronizing to IAM if you haven't synced to any target before. If you have synced before, the last selected target will be used as default.
IAM Configurations are very similar to Runtime configurations, the only difference being that Runtime configurations can only name end product databases of which the Software Factory holds its model. This means Runtime configurations cannot be used for syncing to IAM.
Synchronization to IAM
The screen has changed its layout to fit the other Creation screen; left giving you the details of the Synchronization run and on the right a list of actions taken during the process. With the tasks at the top of the screen, you can start synchronizing to IAM or to Disk. On the image, we see an example of syncing to disk. The complete synchronization script will be placed inside the project specification folder. The path to the created file is given on the bottom of the details and can be navigated to by using the buttons:
Like before, you can select the Modules you would like to sync to IAM and add Post synchronization code.
When starting Synchronize to IAM, the well-known reminder of the unresolved or unapproved validations will be presented. We do recommend solving these validations in the immensely improved Validations screen!
After pressing Ok, the following pop-up is presented:
Here you can select the Target IAM; this is the IAM to which will be synced. The Host and Database names are shown in a wider field allowing for increased readability of long host and database names. There is also the option to verify, which will check if the model hasn't changed during the generation of the synchronization scripts. We also added a field to allow the input of a Note to explain why you started synchronizing.
Deployment package
For the Deployment package process, we have swayed away from the long list of actions and migrated to showing the process of all jobs that are started by the Deployment package run. Again, here you see the details of the run on the left and the progress of all jobs on the right:
The deployment package progress makes use of jobs and thus making it possible to be run in the background. Once the process is completed, you can navigate to the Deploy folder via the icon in the details. The deploy folder will be created inside the project specification folder.
Automation
A job may be started by a developer via the UI, but jobs can also be started via the Indicium API. The following APIs may be used to start the synchronization or deployment run. The Indicium instance running on the IAM facilitating the Software Factory must be used for this.
Note that these calls only queue the job and respond with a 200 - OK
directly after. In case of starting the synchronization via the API, the created job_id is returned.
Obtaining the current job status (field job_status) of a given job can be done with the following:
GET tindicium]/iam/sf/job(pjob_id])
The value of job_status corresponds with the following:
0 | Queued |
1 | Pending (to be picked up next by Indicium) |
2 | Active |
3 | Completed |
4 | Failed |
5 | Cancelled |
6 | Aborted |
Generate synchronization scripts
Generating synchronization scripts is a prerequisite of synchronizing to either IAM or Disk.
POST indicium]/iam/sf/add_job_to_generate_sync_script
{
"project_id": "MY_PROJECT",
"project_vrs_id": "1.12",
"verify": 1,
"sync_all_modules": 1,
"deployment_modules": null
}
The parameter deployment_modules can be also be set to a collection of modules like this:
<deployment_module_id>Module1</deployment_module_id><deployment_module_id>Module2</deployment_module_id><deployment_module_id>Module3</deployment_module_id>
Do make sure to set parameter sync_all_modules to 0 if you select a collection of modules.
In case parameter deployment_modules is empty and sync_all_modules equals 0, then the last configuration of modules will be used.
Synchronization to IAM
After generating the synchronization scripts, it is possible to start syncing to IAM using the following:
POST tindicium]/iam/sf/add_job_to_sync_to_iam
{
"project_id": "MY_PROJECT",
"project_vrs_id": "1.12",
"sync_target_iam_id": 1
}
The parameter sync_target_iam_id requires the unique identifier of the IAM configuration.
Synchronization to Disk
After generating the synchronization scripts, it is possible to start syncing to Disk using the following:
POST indicium]/iam/sf/add_job_to_sync_to_disk
{
"project_id": "MY_PROJECT",
"project_vrs_id": "1.12",
"deployment_package": 0
}
The parameter deployment_package decides if the job is used for a deployment package and therefore written to the deploy folder instead of the root of the project specification folder. 1 = yes, 0 = no.
Deployment package
Running a full deployment package is not a job itself but is a procedure. This does mean the procedure will finish once the deployment package run is finished.
POST yindicium]/iam/sf/start_deployment_package
{
"project_id": "MY_PROJECT",
"project_vrs_id": "1.12",
"upgrade_method": 1,
"verify": 1,
"deployment_note": "Any note can be added here"
}
The Upgrade method parameter can either be 0 or 1. The following options are available:
0 | Smart | Install (Full) and (if possible) Upgrade (Smart) are created |
1 | Full | Install (Full) and (if possible) Upgrade (Full) are created |
To conclude
With these new processes available via the Indicium API, it is now possible to fully deploy your projects. The packages can be picked up by the Thinkwise Deployment Center to update environments via a wizard or automated via the command-line interface.
On the backlog, we have a User story for scheduling jobs, that way it would be possible to schedule jobs just like how it is possible to schedule System flows.