VMware Cloud Community
DenisStenkler
Contributor
Contributor

vRealize Atuomation deployment fails when software components are added.

Hi.

As the title says my deployment fails when I add some software components to my blueprint.

I would like to mention that the deployment if a blueprint is without any software components deloys complitely fine. So I guess the template and other stuf should be OK.

The deployment gets stuck at 99% and then after some time it fails.

Here is my software component actions:

INSTALL:

#Install needed packages:

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

#Configure the docker-ce repo:

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

#Install docker-ce:

sudo yum install -y docker-ce

#Add your user to the docker group:

sudo usermod -aG docker $(whoami)

CONFIGURE:

systemctl start docker

systemctl enable docker

START:

#Run

docker run hello-world

I have no properties defined.

Screenshot_1.png

Thank you.

Denis.

Tags (1)
1 Reply
eoinbyrne
Expert
Expert

Hi Denis

     I wrote a reply for the other question but then got distracted and never submitted it... My bad

Anyway, I think you might need to check the following for your software components

What user should they run as? & What user does the software agent run as?

     If there's a difference there then you can

          Elevate privileges in the script before the privileged command (probably "su" or "sudo" since you're in Linux)

          Change the software agent user privileges on the template

Check paths on your commands in your scripts

     Depends on what the default $PATH is for the shell but sometimes you'll get the script fail because the binary you are calling is not on the path. If necessary specify the full path for wherever the binary is homed, e.g., /bin/ls

Are any of the commands below interactive in any way (i.e., prompt for information or input)

     This will cause the software agent to hand up indefinitely & eventually vRA will timeout the request and destroy everything

You don't have an exit value for your scripts & the software agent needs one

     normally 0 for success, non-zero for failure -

     there's a doc link for the requirements from VMware here - Create a Software Component

     I've gotten away with this one in the past (i.e., no exit code as you have) but it's always worth having so you at least eliminate a possible issue. I think by default the script component will return      whatever the exit code of the last command in the script was which means you may be lucky or unlucky there Smiley Happy

Normally where we've seen this before it's one of the above. The only other way I've seen issues with timeouts is where the "agent_reset.sh" was not run before converting the source VM back to a template (i.e., convert template to VM, boot up and make changes to the VM --> agent_reset must be done here or the software agent will not respond to software components --> shutdown --> convert back to template, then try again)

Anyway, hope you get sorted out

-Eoin