We are migrating from Jenkins to Azure and in our deployment we used Powershell scripts, for our initial move we are trying not to adjust our Powershell scripts and just change the bare minimum to get them working.
On the running of command:
az webapp deployment source config-zip --name Name --resource-group RG --src Path/To/Zip.zip
When we used this command before we got the warning:
WARNING: Getting scm site credentials for zip deployment
We now get this warning as an Error:
[error]WARNING: Getting scm site credentials for zip deployment
I have adjust the settings to try continue past errors but it falls out anyway. Anyone know how to fix this?
I am using version 2.0.60 of Azure-cli. I have tried with az webapp deployment source config-zip command, I also got the warning. But the webapp was deployed successfully.
You can also deploy the zip file via browser.
1.In the browser, navigate to https://<app_name>.scm.azurewebsites.net/ZipDeployUI.
2.Drag the zip file to the file explorer area on the web page
Related
i have problem in executing Kubectl commands, its errors out with 502 certificate error
Unable to connect to the server: x509: certificate signed by unknown authority
I can able to login to az login after that I'm connecting with my AKS cluster by using below command
az aks get-credentials --resource-group sitecore10.x-dev-k8s --name sitecore102-Dev-AKS-v1 --overwrite-existingenter code here
After that executing Kubectl get pods or Kubectl get services but it doesn't work
already tried adding environment variables
Opened .kube file and opened the same Url in browser , displayed the below error
Resolved
I got a chance to resolve this issue.
The actual issue is AKS URL (https://AKSInstance.hcp.westus.azmk8s.io:443) is blocked by Company Internet Monitoring Software (Netskope).
i raised a support ticket to whitelist the URL https://*.azmk8s.io
How to check the issue :
C:\Users[YourUserName].kube open config file to identify the AKS URL, try opening the URL directly in the browser, if your getting 401 authentication issue then your good, otherwise if your getting error message related to certificate then it should be your Internet Monitoring software is blocking the AKS URL calls.
I tried to reproduce the same in my environment to connect the AKS cluster from a windows machine:
I have created AKS cluster, like below.
Go to Azure Portal > Kubernetes Services > Create.
Download Kubectl tool here and install the same on a windows machine, like below.
open powershell in CMD and navigate to download folder and run kubectl.exe , like below.
connect your cluster using cloud shell to download .kube.config file. like below.
once connected to the cluster, download the config file to the Local windows machine.
Create a folder with .kube name in your username folder and place the downloaded config file in the same folder.
Path C:\Users\yourusername
Now run kubectl cmd to get the AKS cluster details from the windows machine, like below.
Reference: kubectl unable to connect to server: x509: certificate signed by unknown authority by bherto39.
Following Microsoft Quick Start for Function App with Go (https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-other?tabs=go%2Cwindows)
I was able to successfully run the code locally on my Windows computer. I continued to follow the steps to deploy the Function App to Azure portal and when try to run the Function App at the /api/HttpExample endpoint. It would fail to execute even though it runs fine locally.
Programming language used : Go 1.17.7
Links to source: https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-other?tabs=go%2Cwindows
Bindings used
I had the same problem (working locally, wouldn't load when deployed), but I am running Linux locally. The error message I got was:
An attempt was made to access a socket in a way forbidden by its access permissions.
I was creating the Azure Function App through the VS Code Azure extension, and the default OS when creating a Function App is Windows:
The clue was to select the Advanced option and select OS->Linux. With the AZ CLI you need to add the option --os-type Linux, e.g.:
az functionapp create --os-type Linux --resource-group hellogorgplinux --consumption-plan-location eastus --runtime node --runtime-version 10 --functions-version 3 --name hellogoapplinux --storage-account hellogostglinux
I have an Azure release pipeline that uses an Azure Web App for Containers task to deploy a docker image on an Azure App Service.
The image is specified in the form of some_image:$(Build.BuildId). The pipeline works as intended and successfully updates the App Service with the latest built of the image.
I want from an other release pipeline to execute a docker run command using that image. I've noticed that version 1 of the Docker task allows me to execute such a docker run command on a docker image (no idea why run is missing from version 2), but how can I specify the docker image? How can I get which image is the currently deployed on that App Service?
You can either use PowerShell or Shell script in the YAML pipeline. Since you already know the container registry and the image name, just use the below command to get the latest version
az acr repository show-tags -n MyRegistry --repository MyRepository --top 1 --orderby time_desc --detail
https://learn.microsoft.com/en-us/cli/azure/acr/repository?view=azure-cli-latest#az_acr_repository_show_tags
Might be too late now, but what you want to do is to get the value of LinuxFXVersion (if you're running docker on Linux) property from Azure Resource Explorer.
Using a combination of Azure PowerShell and CLI, you can have these commands to retrieve the current image running on your web app:
$webAppProperties = (az webapp config show --subscription "<subscription-id>" --resource-group "<resource-group-name>" -n "<webapp-name>") | ConvertFrom-Json
$webAppProperties.linuxFXVersion
Assuming you have the right permissions to your subscription from Azure Pipelines, you should be able to use this information for the next steps.
I have cloned my app from GitHub into the Azure shell. When I tried to create and deploy the webapp I am facing few errors. First I tried az webapp up -n newappname and I got the below error
Then I created a web app myself in the portal and just tried deploying it from Azure shell using the command az webapp up -n newappname_createdatportal. I got the below error
Any suggestions here will be much appreciated!
It seems it was a bug for old Azure CLI version, run az upgrade --yes and restart your prompt solve the problem for me.
Here are something to notice:
my Azure CLI version: 2.18.0
the command I use:
az upgrade --yes
#restart session and run this for authorizing
az login
az webapp up -n webappnamecreated
Here is the reproduce screenshot:
Here is the successful screenshot:
I tried updating the az command line as other answer suggested but didn't work for me.
Instead of doing az webapp up -n appname, try first creating an appservice plan with application name appname then only after it has been deployed enter the command az webpp up -n appname. This worked for me.
I am unable to install the VSTS Agent Azure VM extension on an Azure VM. I tried both the Install extension blade in the Azure portal and the Powershell option. When I try from the portal it just gets stuck at transitioning. If I run the Powershell script it gets stuck trying to connect to server.
I was able to install it on another server without any issues. The 2 servers are part of a web farm so they are exact images.
I am following the steps detailed at this url https://learn.microsoft.com/en-us/vsts/build-release/concepts/definitions/release/deployment-groups/howto-provision-deployment-group-agents?view=vsts .
I am trying to deploy from VSTS to an Azure VM.
This is the screen when I try to run the powershell script.
Run the config file directly (from C:/vstsagent folder) in cmdline and try again with dev.azure.com/{organisation name} url.