Publish APIM Developer portal through terraform - azure

Hi I have searched through docs on and can't quite find how to publish the developer portal through terraform. My terraform does spool a resource group with an API Management service resource but I want it to also publish the developer portal and enable CORS. Is this possible through terraform or has to be done manually after I have the rg spooled?
Updated terraform looking at the documentation here: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management#host_name
There is a block for developer portal but I am not sure if this actually publishes it and also not sure what to put in the host_name. Please assist.

You can completely configure the APIM and its portal from an ARM template but you can't publish the content. There are scripts in the Github repo to do this using the rest API.
Publishing content using those scripts will work for the managed portal. If you're hosting your own version of the portal you'll have to take some additional steps, according to the migration script.
If you can get Terraform to execute NodeJs scripts, you should be able to use these to push content to the portal and publish it.
Please also check the docs that were recently added about the migration script.

I have never used terraform but I believe what you highlighted would only create a custom domain for your developer portal.
Hostname would be a custom domain, or you can use the default {apimname}.developer.azure-api.net. If you provide a custom domain for your developer portal you would have to provide a SSL certificate and also you have to have a CName for this custom domain.
I do no think the developer portal would be published Can I deploy everything through ARM templates now? The only thing that's not available is developer portal content. Everything else is available through ARM. link

Try creating an APIM manually and see what settings is it using for the developer portal in Azure Resource Explorer. Try to replicate those settings in your code.

Related

Jenkins hosted on VM, not able to fetch Azure resource group names, for a free style project

I don't know why this issue is happening, but I am confident that the configuration was done properly.
I created an Azure VM, installed Jenkins in that, and created a freestyle project. And Then I added the git and Azure Service Principle credentials to the global unrestricted access to Jenkins credentials (system). When I try to add a post-build setup of publishing to an azure web app, I get the following errors.
I have added images, please open the links and look into them, and help me out.
As you can see, the service principle has been successfully verified.
But in the second picture, when I try to access the resource group, it says none, even though I have created a resource group, app service plan, app services etc.
I tested in my enviroment and facing the same Issue,Even after Succefully verified the service principle.
Did few reaseach and found that Azure App Service Plugin is up for adoption and under maintaiance and few of them as been deprecated and also they are looking for new maintainer. The Same issue is happing with other Azure plugin as well like Azure Storage,Azure Cosmos and many more...
Even though in the document its stated you can install the Azure App Service plugin manually before officially release but when i tried to install the maven repro its prompting for enter the credential to download the repro. Seems its private repro we can't access.
For Workaround for this issue or for more information you can reach out to Jenkins Community Team or Support.

Deploy Azure AppService to Url: 404 + no worker is assigned to the app service plan. The site cannot serve any requests

I'm getting a 404 trying to access my azurewebsite.net
My Resource group contains an AppServicePlan, an AppService, SQL Server & SQL Database, a KeyVault & SignalR.
Locally everything works, the AppService is running, AppServicePlan is Ready (1App/0Slots),
Connected Services for SignalR & SQL are configured (in the menu you get when right-clicking WebProject > Publish). KeyVault is configured & accessible. Not sure if these are problem free though, as I keep getting NuGet Errors, stating unable to update NuGet Package.
When I right-click my WebProject & Publish, I get Message Publish has been succeeded. But when I click on the link, I get a 404.
I'm working with two pipelines in AzureDevops
Seeing as official documentation is always lagging behind and showing older interfaces, it has not been much of a help.
I followed https://learn.microsoft.com/en-us/learn/modules/create-release-pipeline/5-deploy-to-appservice this tutorial, did everything stated, but the last step, I didn't get the desired result (an accessible website through azurewebsites.net).
I have a Export template with all connected services configured (I guess generated by azure?) but don't really know what to do with it.
Can anybody pinpoint what I am missing or doing wrong? Or tell me what else I would be needing, apart from the services I mentioned (like Certificates, Active Directory?)
Do I need a gitHub repo next to AzureDevOps Repo & Azure Resources?
Does publishing via VS interfere with my automated pipelinebuilds?
Thanks!
You can try to deploy to Azure App Service in Azure DevOps directly. I used the sample you shared and worked well on my side. Here are my steps:
1.Create the App Service instance in Azure and make sure the default home page is correct.
2.Clone the sample from GitHub to Azure DevOps Repo.
3.Change the deploy stage in the azure-pipelines.yml file on release branch and run pipeline. I removed variable groups and changed the configuration of AzureWebApp task:
4.Browse the page in Azure. I can get the same page as in the tutorial.

Azure management API nodejs sdk for managing web apps

I am trying to provision a web app through Azure nodejs SDK
Are there any examples or repos that help in doing this?
Create a new web app.
set up the deployment source to bitbucket
sync with deployment source.
setup the environment variables
restart the app.
All of this done through management API...
Any inputs or guidance?
You can check out the official code sample for managing your web apps here.
This code sample includes the following:
create a resource group
create a hosting plan
create a website
list websites in a resource group
get details for a given website
update site config for a website
For other operations please refer to the SDK documentation for WebApps.

Is it possible to configure custom config section in ARM template

I have created a custom configuration section for a service that is to be deployed to Azure in an app service. I know how to add app settings to the app service configuration. However, I can't find information about how to handle custom configuration sections. Is this something that is supported in Azure ARM templates?
There is no way to override custom section via the Azure App Service ARM API. Instead, this is something you do by simply deploying the right web.config file to your Web App.
via ARM template NO.
where as one cam make use of FTP and add the required changes on post Deploy or make all the required changes on pre deploy. :)

Azure VSO Continuous Delivery: Deploy specific site in multi-site solution

We have a VSO repository with multiple sites in the same solution. We want to be able to deploy our sites independently of each other to Azure with continuous delivery. Right now the first site alphabetically is deployed to all our sites which of course is not desirable.
Is this possible to achieve?
I have tried to set the Project key to the correct csproj in App Settings like suggested here: https://github.com/projectkudu/kudu/wiki/Customizing-deployments without any success. Maybe Kudu is not used for VSO?
Any help would be greatly appreciated!
You should move away from trying to do this in a build, especially if you want that level of control.
You have Release Management Online provided with your VSO account and can use the Release Management client to configure your releases.
I believe that you can right-click on your Build and have an appropriate starter release template created when configured.
http://nakedalm.com/create-release-management-pipeline-professional-developers/
Here is an example of and end to end deployment with a web app. Deploying to Azure with RM is Childs play...

Resources