cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Azure ARM template to configure app dynamics during deployment

Scott.McIntosh
Producer

I have figured out how we can use the ARM template to install site extensions into an App Service in Azure but now I am trying to ensure that we can automatically configure the extension to communicate to our SaaS controller. I have scoured this site as well as Stack Exchange and have not been able to find an answer that doesn't involve using a browser. We are going for a fully Agile solution that would automatically add microservices to the monitoring layer in our Enterprise. Adding the site extension is easy enough, the json file for the deployment is attached but here is the excerpt of the ARM code for adding the site extension to the App Service:

 

"resources": [
{
"apiVersion": "2015-08-01",
"name": "AppDynamics.WindowsAzure.SiteExtension.4.4.Release",
"type": "siteextensions",
"dependsOn": [
"[variables('contactServiceName')]"
]

 

I am of the opinion that the page referenced below should be updated to reflect this way of deploying App Dynamics to Azure environments.

 

https://docs.appdynamics.com/display/PRO44/Install+the+AppDynamics+Azure+Site+Extension

 

Following the referenced instructions above, I was able to create a switch in the ARM template that would control the setting of the required AppSettings for AppD.

 

The switch is a parameter:

 

"enableAPM": {
"type": "string",
"defaultValue": "No",
"allowedValues": [
"No",
"Yes"
]
}

 

And then in the appsettings section the parameters are set as:

 

"appdynamics.controller.hostName": "[if(equals(parameters('enableAPM'), 'Yes'), 'myController', '')]",
"appdynamics.controller.port": "[if(equals(parameters('enableAPM'), 'Yes'), '443', '')]",
"appdynamics.controller.ssl.enabled": "[if(equals(parameters('enableAPM'), 'Yes'), 'True', '')]",
"appdynamics.agent.accountName": "[if(equals(parameters('enableAPM'), 'Yes'), 'myCompany', '')]",
"appdynamics.agent.accountAccessKey": "[if(equals(parameters('enableAPM'), 'Yes'), 'myKey', '')]",
"appdynamics.agent.applicationName": "[variables('contactServiceName')]"

 

I was assuming that after the deployment of the ARM Template and the application were complete that as soon as I restarted the service the agent would be configured and start communicating with the controller. However, even though I am seeing the correct app settings when I browse the extension in Azure I am  seeing blank values.

 

Does anyone know of a PowerShell command or API that I can use to cause the extension to be initialized without having to browse to the Azure App Service?

 

11 REPLIES 11

Scott.McIntosh
Producer

If you have an answer to my question great but I realized that I wanted to submit a ticket on the Support site not publish an article! If support solves my issue then I will happily update this article.

There is a powershell extension built in-house that is available here:

https://github.com/Appdynamics/azure-site-extension-manager

 

The extension helps automate variable creation across several websites without having to browse to the web application on the Azure portal.

Markus.Hraba
Voyager

I can only second your request for the update of the Docs. At least a reference example for a "how to use AppDynamics with Azure ARM" including an example ARM template for Java & .NET would be really helpfull.

Cody.Naumann
AppDynamics Team (Retired)

Hey there, happy Friday from California.

 

I will be updating the docs next week with the ARM template information, expect an upate by next Wedneday, May 2nd.

 

Have a great weekend.

 

Cody

Cody.Naumann
AppDynamics Team (Retired)

Hi there,

 

I have documented the use of the ARM template but I'm waiting on a review of the information. As soon as I get sign off I'll update the thread here.

 

Thanks,

 

Cody

Sounds great! Thanks for the quick response Cody!

Cody.Naumann
AppDynamics Team (Retired)

Hi all,

 

I've updated the documentation with instructions for using an ARM template. Please let me know if you have any feedback or run into any issues.

 

https://docs.appdynamics.com/display/AZURE/Install+the+AppDynamics+Azure+Site+Extension+for+.NET

 

Regards,

 

Cody

Hi Cody,

 

I'm aware that this is the .NET "section" , but is there a reason why the documenation of the Java agent's deployment via ARM was not updated in the same go?

 

cheers

Cody.Naumann
AppDynamics Team (Retired)
Not sure if we have the details on that, let me look into it.