TFSService and multiple cloud services - can't unlink - azure-devops

I have 2 cloud services, live and staging, and I couldn't get staging to deploy from a TFSService build correctly - it kept either not deploying or deploying to live. The live cloud service is the one I originally created some time ago. I've deleted all builds for both services.
So I've tried to unlink both services in an attempt to relink just the staging one. Problem is that I can't unlink the live cloud service via the Azure portal. I get "Unlink TFS failed to complete cleanly. All info was removed from the Portal, but some might remain on TFS Hosted Services".
I've disassociated my TFS Service in my visualstudio.com admin area but I still get the error.
Can anyone advise what I can try next please?

Related

Azure Devops App Service Deploy Task Not Work Suddenly

I use [Azure App Service deploy] task in Azure Devops pipeline to deploy the artifact to an Azure App service.
Everything worked well before but today it not work suddenly. It failed when i tried to deploy the artifact to the production slot (the slot marked production). But when i tested to deploy to deployment slots, it worked well.
I just got an error message that has no much detail in the log
Cleaning up temp folders from previous zip deployments and extracting pushed zip file C:\local\Temp\zipdeploy\534hsvxr.zip (80.94 MB) to C:\local\Temp\zipdeploy\extracted
[error]Failed to deploy web package to App Service.
[error]Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
Anyone got the same issue before?
Thanks
It seems to be a source control issue. Just try going to the App Service Deployment Center blade and click "Disconnect" to disconnect your deployment. And then try to deploy it again.

How to integrate OnPrem Azure DevOps Server with the cloud one?

My firm has the Azure DevOps online version where we have all our projects and repo's. We were not able to configure CI/CD for the repo's because our internal server network doesn't have access to the internet.
To overcome this issue, we built a new server that has access to the internet and also to the internal network. On the new server, we installed and configured Azure DevOps Server 2019. We don't want to migrate our repo's from the cloud version to the online version.
I am trying to link the OnPrem repo to the cloud repo but it was not working. I issued a PAT on the cloud version and added it as a service connection under Pipelines in the OnPrem version but still, I am not able to see and link the cloud repo's.
I can clone the repo from the cloud to the OnPrem server but that will not get the latest code as the code is being checked in the cloud repo's
Can anyone please guide me on how to link both of them, please.
Thanks!!!
I don't think there's a meaningful way to integrate Azure DevOps Services and Azure DevOps Server, as they are essentially the same product. I assume (but don't know) that you're looking to integrate Azure DevOps Services to on-premise builds and deployments, as you state that you want to keep the repos in Azure DevOps Services. So, in essence, you want to run build and deployment group agents in on-premise environment.
Take a look at the agent-documentation and especially the communication subsection:
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops
Or this old blog post, from which the communication section originates:
https://devblogs.microsoft.com/devops/deploying-to-on-premises-environments-with-visual-studio-team-services-or-team-foundation-server/
The ideal solution would probably be that you run self-hosted build agents in your server that's open to internet, and configure an agent pool for them in Azure DevOps Services. For deployments, you'll want to use Deployment Groups and install deployment group agents to target servers, where they'll just need outbound 443 access for communicating with Azure DevOps Services.
If that's not possible, you'd have to install deployment agents to the build machine, which then sees your other on-premise servers, but this is rather unsatisfactory solution since you'd either have to rely on WinRm capabilities for deployments, or expose too much network between your build server and other on-premise servers.

Azure Function deployed successfully, but not working

I am facing a weird problem. I deployed my code using Azure DevOps Pipeline Release - it ran successfully, however, the code is not reflecting in Azure Function App.
Here is what I am doing:
Created a Release pipeline with a "Deploy Azure App Service" task. It picks up artifacts from a build pipeline and is configured to deploy to a Function App using Service Connection
When the Release pipeline is triggered it runs through all its steps, and I get a success (see logs below)
However, when I open up Azure portal and navigate to the Function App, it continues to say "Now it is time to add your code" on the Overview tab, and I am not able to hit my API on that Function App
Surprisingly, On the Deployment Center tab of the Function App, it does show the details of the deployment (See details below)
I can also find the deployed zip file under D:\home\site\wwwroot when I log on to the Kudu console
Deployment logs:
Got service connection details for Azure App Service:'myFuncApp'
Updating App Service Application settings. Data: {"WEBSITE_RUN_FROM_PACKAGE":"1"}
Updated App Service Application settings and Kudu Application settings.
Package deployment using ZIP Deploy initiated.
Successfully deployed web package to App Service.
App Service Application URL: http://myFuncApp.azurewebsites.net
View on Function App Deployment Center Tab:
Deployed Successfully to production
Source Version 6d9c8340ba Build 20190411.1 Release: 3
The Function App endpoint is working, (throwing a generic welcome page) confirming the Function App itself is healthy, but I am not able to access my API.
Additional updates
Here is the structure of the .zip file that is being uploaded to d:\home\data\SitePackages as a part of the zip deploy from Azure Pipelines:
/host.json
/package.json
/proxies.json
/package-lock.json
/func_name/index.js
/func_name/function.json
/node_modules/**
The same code is working locally.
Note: When I go to the Deployment Center tab, I do see this error message, but I think this is related to Continuous deployment through Function App
We were unable to connect to the Azure Pipeline that is connected to this Web App. This could mean it has been removed from the Azure Dev Ops Portal. If this has happened, you can disconnect this pipeline and set up a new deployment pipeline.
Please help me. What can be going wrong?
I was finally able to troubleshoot. #4c74356b41 pointed me in the right direction as the key issue was the package.
Below was the issue:
I had added an archive step in the build pipeline. This was causing the artifact to be zipped before publish
In the release pipeline I was using Azure App Service Deploy task. This internally uses Zip Deploy where App type is set to Azure Functions. Thus, it was zipping my zipped file.
When I remove the archive step, the double zipping was avoided, and it started working.

Pushing liberty app + server to Bluemix

I want to deploy a liberty application along with server config to Bluemix, I found these options listed in the documentation
https://console.bluemix.net/docs/runtimes/liberty/optionsForPushing.html#options_for_pushing
My question is should we be pushing the app + server always to keep the server config, or it like push app + server for the first time and subsequent pushes can only contain app files ? will the server config be retained?
You need to push the app + server every time.
There are a number of ways to deploy Liberty on the IBM Cloud - the recommended place to get started is on the App Service console:
https://console.bluemix.net/developer/appservice/starter-kits
The documentation has options for Kubernetes / CF Deployment to the Cloud and recommend using the IBM Cloud Dev CLI tooling which containerizes your app to run locally and gives you the option to push the image up when you're ready.
In addition, starter kits set up an example of how you can incorporate DevOps into your app. When you make changes from your Git Repo, it will trigger a hook which will run the app through your testing pipelines, and deploy it to the cloud.
The idea of using containers is so you can package your application with a consistent, reproducible environment, so you can orchestrate and scale your application when necessary.

Deployment azure cloud services with application downloaded from blob

i deploy my cloud services package from eclipse to azure. First it will upload my application to the blob storage. ( This is standard i can't change this ) And then it will starting sending the azure package and the update is started. Everything works fine.
But what will happen when i remove the application from the blob after the update is succeeded? Because after a few day the azure servers will be recycled and new servers will be available with the same azure package. Will the new server still get the application ? Is the application somewhere available in azure for redeploy azure?
But what will happen when i remove the application from the blob after
the update is succeeded? Because after a few day the azure servers
will be recycled and new servers will be available with the same azure
package. Will the new server still get the application ? Is the
application somewhere available in azure for redeploy azure?
Azure Service Fabric (service responsible for managing your application) reads the application package file from blob storage and copies it to another location within its infrastructure. So even if you delete the files from blob storage, Azure has a copy of your application and will deploy the application using that copy.
In short, Azure is not dependent on the files in your blob storage after it has created the deployment.