Remove App Settings During Azure App Service Deployment - azure-pipelines-release-pipeline

Deploying via Azure Release Pipeline - and in our Deploy Azure App Service step, we set App Service's Application Settings via the
.
Our contingency if the deployment fails, is redeploy an old release (months old) to the same app-service.
However, we need to delete some of the App Service's Application Settings that were set. Just removing these in the old release pipeline does not remove them from the App Service Configuration App Settings section.
Now we don't have the luxury of deleting these app-settings manually on the App Service Configuration.
So what is the recommended way to achieve this through the pipeline?

Remove App Settings During Azure App Service Deployment
You could use the Azure CLI task in the pipeline to delete appsettings, like:
az webapp config appsettings delete --name MyWebApp --resource-group MyResourceGroup --setting-names {setting-names}
Check the az webapp config appsettings delete for some more details.
On the other hard, you also could use API Web Apps - Update Application Settings to delete application settings.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings?api-version=2016-08-01
You can check the answer here.
Hope this helps.

Related

Is there a way to programmatically configure azure EasyAuth for AAD for an Azure Function App?

I am writing Azure CLI scripts to automate creating cloud-side components in Microsoft Azure. In particular, I am using the CLI to create Azure Function Apps. However, while I am able to create a Function App using the CLI, I have not been able to identify a way to configure authentication against Azure Active Directory, other than by using the Azure Portal user interface (see https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad for a description of the interactive process).
It's clear that the interactive process performs several steps behind the scenes, including creating an AAD Application registration and associating the registration with the Function App. My questions are:
What are details of the steps performed?
Is there a programmatic way, either with the CLI or some other interface, to perform the same set of steps?
Easy Auth is actually a module on IIS. You can enable it using Azure CLI:
az webapp auth update -g myResourceGroup -n myUniqueApp --enabled true \
--action LoginWithAzureActiveDirectory \
--aad-allowed-token-audiences https://webapp_name.azurewebsites.net/.auth/login/aad/callback \
--aad-client-id ecbacb08-df8b-450d-82b3-3fced03f2b27 --aad-client-secret very_secret_password \
--aad-token-issuer-url https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7983a3e9c5a/
https://learn.microsoft.com/en-us/cli/azure/webapp/auth?view=azure-cli-latest#az_webapp_auth

Application pod deployment across different openshift clusters

I have openshift 3.9 installed in one AWS region ohio. I have jenkins installed in it. I have a pipeline code in where it will take Java code from GitHub bind with jboss and deployed it in project test within the same cluster. It works fine and I'm able to access the app as pod is creating and app is also binding with jboss. Now I want to deploy this application across different clusters either within the same region or across different regions. Is there a way to achieve this?
You can use the oc command line tool in your Jenkins pipeline to deploy it to a different cluster. For a related example, check the Gitlab review apps example using an OpenShift cluster. It does something similar, where the CI pipeline deploys the required artifacts to an OpenShift cluster using oc and appropriate credentials.

Can i add publish setting file from VSTS to deploy project on Microsoft azure

i am trying to deploy the project from VSTS to azure i have publish setting file i need to know how to use publish setting file in pipeline to deploy the project on azure. or any other solution to deploy on azure.
Yes, you can store the plain password in the secret variable of build/release, then specify the password through MSBuild argument (/p:Password={variable}).
After that you can specify the public profile (.pubxml file instead of .publishsettings file) in Visual Studio Build task (e.g. /p:SkipInvalidConfigurations=true /p:DeployOnBuild=true /p:PublishProfile="{profile name}")
Alternately you can write a script and add a Batch Script task to run the script to deploy on Azure. Please refer to Deploying to Azure from VSTS using publish profiles and msdeploy for details.
You can also use the Azure App Service Deploy task to deploy the Azure Web App. Please refer to How to deploy to Azure using Team Services Release Management for details.

How to add BlueMix Monitoring and Analytics to a docker-hosted app?

Our app (Meteor/NodeJS) is deployed in a docker container in Bluemix, and I'd like to add the Monitoring and Analytics service to the app. The documentation lists how to integrate it with a NodeJS app deployed directly to Bluemix, and also mentions how to integrate with a Ruby-based app. Seems like there should just be an npm package to install, but I see nothing in the docs on how to do this.
The Monitoring and Analytics Service is only for Cloud Foundry based Application in IBM Bluemix based on Java Liberty, Node.js SDK or Ruby. The buildpacks have additional configuration and components inside to enable integration with the M&A Service.
https://console.ng.bluemix.net/docs/services/monana/index.html#monana_oview
For IBM Bluemix Container Service with Docker you need to use the built-in Monitoring and Logging for Containers
https://www.ibm.com/blogs/bluemix/2015/11/built-in-monitoring-and-logging-for-bluemix-containers/

Deploy meteor to bluemix with --settings?

I have a JSON file with initial admin user information in it. My startup.js uses that user data to create the first admin user on startup.
When I deploy to meteor, I use meteor deploy --settings settings.json
How can I perform this similarly when deploying to bluemix so I can access my application with my user credentials?
From the Bluemix documentation:
You can specify meteor settings by setting the METEOR_SETTINGS
environment variable:
cf set-env [APP_NAME] METEOR_SETTINGS '{"herp":"derp"}'