Release Automation

 View Only
  • 1.  Can I use Artifact Retrieval Agent Groups to ensure artifact package availability across data centers?

    Posted Nov 29, 2016 03:46 PM

    Initial Problem

    When I to run a Deployment Plan to deploy to agents in a different data center from the one I used to create the artifact package attached to the Deployment Plan, I get the following error in the execution log of the execution server (/opt/ReleaseAutomationServer/logs/execution.log) at artifact distribution time:

     

    2016-11-28 18:05:44,510 [http-nio-8080-exec-6] INFO (com.nolio.platform.server.execution.ExecutionEngineImpl:818) - Distributing artifacts to NES. Artifacts:[[NesDistributedArtifact{artifact_store/releaseId_219/DeploymentsZip/helloworld
    /2.0.2./helloworld_2.0.2.zip retriever:DC1_cara_execution_srvr}]]
    2016-11-28 18:05:44,516 [http-nio-8080-exec-6] ERROR (com.nolio.platform.server.execution.ExecutionEngineImpl:846) - Error while distributing artifact [artifact_store/releaseId_219/DeploymentsZip/helloworld/2.0.2./helloworld_2.0.2.zip]
    com.nolio.platform.shared.communication.postoffice.FileDownloadException: Can not download file to [artifact_store/releaseId_219/DeploymentsZip/helloworld/2.0.2./helloworld_2.0.2.zip]. could not get file [fid:FC4D36B6D3AD8EE4CB439D0F921B
    7571] : Did not find any source.
    at com.nolio.nimi.NimiPostOffice.downloadFile(NimiPostOffice.java:118)
    at com.nolio.platform.shared.communication.CommunicationNetwork.downloadFile(CommunicationNetwork.java:452)
    at com.nolio.platform.server.execution.ExecutionEngineImpl.distributeArtifactsToExecutionServer(ExecutionEngineImpl.java:829)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:78)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
    at com.sun.proxy.$Proxy29.distributeArtifactsToExecutionServer(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)…

    Similar behavior was reported in 

    https://communities.ca.com/thread/241732726#comment-241798205


    Details

    • I have CARA set up in an High Availability configuration.
    • I have a master Management Server (NAC) and 2 execution servers (NES) per data center.
    • I use a single CARA Application to perform deployment of multiple real applications that share the same deployment architecture, in this case, a single tier/server application deployment.
    • I have a process that's executed at Deployment Plan creation time to create an artifact package and add it to the deployment plan.
      • To do this, I use a special CARA environment dedicated for use in artifact packaging.
    • I have 1 agent assigned to that special artifact packaging environment, that currently happens to be an execution server - DC1_cara_execution_srvr. (That's an HA problem but not the one I'm trying to solve right now)
    • In the Deployment Plan creation process I use the "ROC - Add Version to Artifact Package" action with "Create Package If Not Exist" set to True to create new packages.
      • By default, this results in the execution server that is assigned to the artifact packaging environment being assigned to the package as the "Retrieval Agent."

     

    The Problem Elaborated

    When I try to deploy to an agent that is connected to an execution server other than the one assigned to the artifact packaging environment, the attempt to use the packages "Retrieval Agent" fails unless the current execution agent is configured to connect to the "Retrieval Agent" / "artifact packaging environment" / DC1_cara_execution_srvr.

     

    This is a problem across data centers. Within a data center, I am okay with having the execution servers talk to each other. I don't want execution servers in different data centers to be required to talk to each other though. Ideally, the data centers should be capable of operating independent of each other.

     

    So how do I accomplish that?

    I was given the idea that setting up an Artifact Retrieval Agent Group might help solve this problem if such groups take nimi routing into account. Does anybody know if that is the case?

     

    If they do take nimi routing into account, to take advantage of that, it looks like I would need to do the following:

    1. Create an Artifact Retrieval Agent Group.
    2. Rework my artifact processing to create artifacts in a way that allows me to specify the Artifact Retrieval Group at creation time.
      • There does not appear to be an action to update the Artifact Retrieval Identifier once the artifact has already been created.


  • 2.  Re: Can I use Artifact Retrieval Agent Groups to ensure artifact package availability across data centers?
    Best Answer

    Broadcom Employee
    Posted Dec 07, 2016 04:21 PM

    Hi Mark,

     

    That's a tough one. Generally speaking if you want an agent to pull an artifact from another agent (assuming I understand what you're trying to do correctly), and that other agent is behind a different execution server, then the two agents' execution servers must be configured to talk to each other, else you'll hit the "could not find any source" error that you noted.

     

    I don't know of any way around that required configuration offhand. Keith-Puzey-CA, this sounds like something you might have insight on -- do you know of any possible tricks to get around this?



  • 3.  Re: Can I use Artifact Retrieval Agent Groups to ensure artifact package availability across data centers?

    Broadcom Employee
    Posted Dec 29, 2016 09:11 AM

    Hi  Mark , 

     

    As James already mentioned if you try to retrieve the artifact from another agent the executing agent is connecting

    directly to the agent , it needs to be able to make this connection otherwise it fail to copy the file.

    I don;t think the Artifact Retrieval Agent Group will make a difference as this is intended to specify a group off agents

    which can be used to retrieve the artifact instead of one agent . And allow you to easy add or delete agents for artifact 

    retrieval.

    It does not do anything for the nimi routing as far as i know .

    Please let me know if you have additional questions on this topic ?

     

    Dirk 

     



  • 4.  Re: Can I use Artifact Retrieval Agent Groups to ensure artifact package availability across data centers?

    Broadcom Employee
    Posted Jan 17, 2017 07:50 AM

    Hi Mark
    I believe your questions has been answered, I will mark this as the correct answer.
    When your question is not answered or you still have additional questions please let us know.
    With Kind Regards

    Dirk