MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.26k stars 21.43k forks source link

War deployment scenario, How to package the agent jar to land it in wwwroot? #47297

Closed abymsft closed 4 years ago

abymsft commented 4 years ago

We are expected to create a file named AI-Agent.xml place it in resources folder along with agent jar. War packaging scenario these files end up in WEB-INF/classes/) . How can we deploy the agent jar (applicationinsights-agent-2.5.0.jar) to the wwwroot directory ?

end goal: get log4j to work with Azure Linux WebApp (via JAVA_OPTS Value: -javaagent:D:/home/site/wwwroot/applicationinsights-agent-2.5.0.jar)


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

abymsft commented 4 years ago

I understand we can manually place the agen jar in the wwwroot folder (via ftp) . what is the best practice to automate it ? or am I missing something here?

Mike-Ubezzi-MSFT commented 4 years ago

@abymsft Thank you for your inquiry. This issue is being investigated by a service area engineer and will update you when accurate information is available.

BhargaviAnnadevara commented 4 years ago

@abymsft Here is a solution using Visual Studio:

When you now build your application, you should be able to find the jar file in the wwwroot directory. Hope this helps.

BhargaviAnnadevara commented 4 years ago

@abymsft Any update here?

abymsft commented 4 years ago

@abymsft Any update here?

The solution in question is a java spring boot mvc solution. Being used in IDEs like eclipse and VsCode. The agent jat cannot be a part pf the application jar. It has to sit outside the application jar. Since the ask is it automate it. I was thinking more towards azuredevops/github.

BhargaviAnnadevara commented 4 years ago

Ok. My comment above addresses it using Visual Studio, but if the ask is to automate it, using Azure DevOps Services will be the right way to go. You might want to check the Java with Azure DevOps Services docs to explore the available options.

On a side note, I'd like to let you know that this channel (the Azure Docs repository) is only for driving improvements related to the Azure documentation. At this point, it appears that there are no edits or updates needed to the document in question. Hence closing this issue for now. If there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.