ibm-datapower / datapower-configuration-manager

IBM DataPower Configuration Manager and IBM UrbanCode plugin
https://developer.ibm.com/urbancode/plugin/websphere-datapower-configuration-manager/
46 stars 51 forks source link

DataPower Plugin and Deployment Policy with Deployment-Policy-variables #102

Open ahung04 opened 4 years ago

ahung04 commented 4 years ago

Import (Deployment Policy Object) - How to import deployment-policy and with deployment-policy-variables?

DataPower Import module contains both deployment-policy and deployment-policy-variables such that you could apply policy and its variables for different envirnoment,

But within UrbanCode DataPower plug-in "Import (Deployment Policy Object)" it missing deployment-policy-variables, how could I apply deployment-policy with deployment-policy-variables?

Jyoti-Prakash01 commented 4 years ago

We have implemented this feature, will be releasing it in next plugin version this week.

Implementation detail :

We have added one more field for "deployment-policy-variables" to plugin step "Import (Deployment Policy Object)". For applying "deployment-policy-variables", you just need to fill in required "deployment-policy-variables" to pass and run the process, it will apply those referred variables.

nhmathis commented 4 years ago

Hi,

Directions on creating a deployment and it's variables can be found in this wiki: https://github.com/ibm-datapower/datapower-configuration-manager/wiki/dcm:deployment-policy-element

nhmathis commented 4 years ago

Reviewing this request further...

@ahung04, I believe what you are trying to achieve already exists within the capabilities of DCM and the associated plugin. Please follow the "Example #2: Deployment Policy Setup" directions here: https://www.urbancode.com/2017/08/04/datapower-plugin-definition-file-walkthrough/

It will guide you through how to create a deployment policy, modifying a property, and deleting a property through the UCD plugin. There are a few other property manipulation capabilities outlined here: https://github.com/ibm-datapower/datapower-configuration-manager/wiki/dcm:deployment-policy-element All of this is specified through the same definition file.

If you are looking to make environment specific policy changes, about half way through this Wiki page, it shows a few examples of making environment specific entries: https://github.com/ibm-datapower/datapower-configuration-manager/wiki/Easy-On-Ramp

Here's some other documentation in the context of UrbanCode Deploy and DataPower that you might find beneficial: https://www.urbancode.com/plugindoc/ibm-datapower-configuration-manager/

nhmathis commented 4 years ago

We did make a change to the DCM and plugin to possibly address this, but I believe it can already by handled by the existing functionality explained above. Please let us know the result!

ahung04 commented 4 years ago

@Jyoti-Prakash01 thanks for adding deployment-policy-variables field.

@nhmathis much appreciated your help. it seems helpful and would spend sometime further study the information.

kgund002 commented 3 years ago

@nhmathis How can we refer deployment-policy-variables in the service properties file? Does the below properties file looks good?

#

Properties for the ucdDemo service.

#

import-from-def target

import.file=${user.dir}/services/${service}/${service}.zip

Deployment Policy Object for import-dpo

deployment.policy.object=deppol${service}

Deployment Policy Object Variable for import-dpo

deployment.policy.object.variables=dep-pol_variables

kgund002 commented 3 years ago

@Jyoti-Prakash01 - What are your thoughts on my above question?