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:
- Create an Artifact Retrieval Agent Group.
- 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.