VMware Cloud Community
StefanxNil
Contributor
Contributor
Jump to solution

Python script dependencies (vRA 8.1)

Hi,

I am trying out different runtimes for actions (node.js, Python). I have successfully created and executed and action based on this tutorial:

Create a Python Script That Calls the vRealize Automation Project API

In case I have many actions that for example use requests library, each action is basically imported with zip containing all the dependencies).

If I export these actions to a package, each action will be exported with it's own copy of dependencies, making the resulting file quite large in case there are a lot of actions.

The question is: Is it possible to centralize/import dependencies shared by all actions? So the action will simply specify dependencies it uses instead of containing it's own copy?

3 Solutions

Accepted Solutions
maverix7
VMware Employee
VMware Employee
Jump to solution

Currently it is not possible, the idea is that each action is independent isolated runnable. The drawback of bundling the dependencies is smaller compared to the potential problem of having to deal with dependency versions incompatibility when different actions require different versions of the same dependency, which sooner or later appears in environments.

View solution in original post

johnbowdre
Enthusiast
Enthusiast
Jump to solution


@StefanxNil wrote:

Just found this, it seems this will become possible (at least in vRA cloud) with: https://vmwarecode.com/2022/04/25/vra-cloud-april-release-brings-very-good-features-environment-for-...

Any insight on how soon this might become part of non-cloud vRA 8.x?


I didn't see it called out in the release notes, but I've got the Environments option after upgrading my on-prem vRA/vRO instance to 8.8:

johnbowdre_0-1651611667541.png

Very cool!

View solution in original post

Ankush11s
VMware Employee
VMware Employee
Jump to solution

It is possible now with vRA 8.8

View solution in original post

5 Replies
maverix7
VMware Employee
VMware Employee
Jump to solution

Currently it is not possible, the idea is that each action is independent isolated runnable. The drawback of bundling the dependencies is smaller compared to the potential problem of having to deal with dependency versions incompatibility when different actions require different versions of the same dependency, which sooner or later appears in environments.

StefanxNil
Contributor
Contributor
Jump to solution

maverix7​ Thank you for the reply. Our CI/CD process involves deploying the actions via API and if the number of actions grows big, so will the size of the payload which affects the deploy speed. I was hoping that we could for example utilize requirements.txt in order to setup dependencies and versions and then vRA server could use local package mirror to pull the correct package versions upon installing the action. We will probably have to change our process to bundle actions into single package file.

Thanks again for your reply.

StefanxNil
Contributor
Contributor
Jump to solution

Just found this, it seems this will become possible (at least in vRA cloud) with: https://vmwarecode.com/2022/04/25/vra-cloud-april-release-brings-very-good-features-environment-for-...

Any insight on how soon this might become part of non-cloud vRA 8.x?

 

 

 

johnbowdre
Enthusiast
Enthusiast
Jump to solution


@StefanxNil wrote:

Just found this, it seems this will become possible (at least in vRA cloud) with: https://vmwarecode.com/2022/04/25/vra-cloud-april-release-brings-very-good-features-environment-for-...

Any insight on how soon this might become part of non-cloud vRA 8.x?


I didn't see it called out in the release notes, but I've got the Environments option after upgrading my on-prem vRA/vRO instance to 8.8:

johnbowdre_0-1651611667541.png

Very cool!

Ankush11s
VMware Employee
VMware Employee
Jump to solution

It is possible now with vRA 8.8