Question
Phil Burkhalter · Mar 16, 2021

How to create a custom deployment package

I have a need to create a custom deployment package for our production. I can't do a full deployment of the production so I need to create a custom deployment package that will add our new classes, business processes, rest end points and transforms. I would like for the production to add and configure the business services, process and operations as well.

Does anyone have an example for doing this? 

 

Thanks,

Phil

$ZV: 2018.1.2
Product version:
Caché 2018.1
10
2 0 11 108
Log in or sign up to continue

Replies

You could add the specific pieces you wish to deploy to a Project in Studio and export that project and then import it where you need it.  

Hi Phil,

If you haven't seen it already, the Ens.Deployment.Utils class reference documents and provides examples for production export methods.

Thanks Vic and Ben. it looks like what you and Ben Spead are saying is to build a new project that contains just my code to be deployed and then use the Ens.Deployment.Utils class to deploy that project. But does it set up the business operations, services and processes in the production so that they don't have to be set up and configured manually to use the classes? Trying to make it as simple and automated as possible. 

Sorry Phil, I didn't address that part of your question.

The standard Ensemble deployment can either export a full production or update an existing production's components. Since the production class contains the details of what components are in a production, I wasn't able to find a built-in way to create/import a partial production. In the normal use cases you export the production class if you need everything or otherwise just the components that you need to update.

You might be able to tweak the production class export to fit what you want, but you should test carefully. This is kind of a hack so probably not a process you would want to rely on. This wouldn't be easy to automate either.

Another possibility would be to perform the full export/deployment, and then you could programmatically remove the items that you don't want (Ens.Config.Production). If that is going to be a lot of items, this could be a pain.

What's the reason behind your inability to export the full production, size?

If this is a functionality you really need, if nobody else in the community has a suggestion, you could try reaching out to your ISC account team rep / WRC so they can look into whether there is a way to perform a partial deployment or if this feature could be added in the future.

Thanks Vic, the problem is we are one of two teams updating the production. Fortunately, both teams are working in separate efforts and are not working in the same classes in the production. The work our team is doing is creating new business services, process and operations and message classes. but the deployment happens by another team so I am looking to create a simple deployment package they would run to add our new components to the production. I am trying not to have to write a step by step deployment guide that tells them to create this business service with this class, this business process with this bpl, etc.

In that case (and unless I'm missing something), it seems possible that you could export the updated production class alongside the new classes, and you could apply that deployment to an existing production. If you wanted to do a quick test you could use the portal's deployment features to see if this will work for your use case, and if it does then you can implement a programmatic version.

If this doesn't work, then I definitely think a more in-depth conversation with your ISC contacts would be warranted. 

Phil - I wasn't suggesting that you use the Ens.Deployment.Utils but rather the Studio.Project utilities.  This will allow you to put in any specific classes that you wish to include (including the Production definition which should include all the pointers to the new BOs, BPs, and BSs) so that you can cherry pick what goes into your next environment.  I am not familiar with the Ens.Deployment.Utils so I can't compare the approproaches

Hi Phil!

I see you are on Caché, but in the case of IRIS, you could consider using ZPM Package manager. It can help to make a package that could be installed on a target IRIS machine with one command, like

zpm "install yourproductionpackage"

that will install classes and dependent packages if needed and you can run post-install scripts.

Thanks Evgeny,

Not sure if that ZPM Package Manager is available on the version of Ensemble our client is running. They are not ready to upgrade to IRIS on this project yet. But I will take a look at it. Never know when I might need it in the future.

Thanks for the help Vic, Ben and Evgeny,

You have provide some good information and I am going to try both the Project in Studio deployment and also try the Ens.Deployment,Utils to see which one works best for our needs.

great!  please report back what worked for you and why