I have a two microservices applications running in Azure Service fabric cluster. I don't have any issue when I deploy the applications from Visual Studio. But when I try to deploy the applications through Azure DevOps CI/CD pipeline I'm getting the below error.
[error]Found more than one item with search pattern D:\a\r1\a**\drop\projectartifacts**\PublishProfiles\Cloud.xml. There can be only one.
From this error message what I can understand I should have only one Cloud.xml file in the solution.
I would like to know the best practices to create multiple applications in Azure Service Fabric cluster and how to resolve the error.
You have two SF applications in the solution. If you are building both and dropping then on the same folder, you will have two cloud.xml files.
Because you specified a broad search pattern, it will find both.
You didn't tell which task is throwing this exception, I will assume it is the Deploy Service Fabric Application.
To deploy both applications, you should have two steps, one pointing to each application, then you should fix the search pattern to be more specific on which SF App you are deploying.
Related
What I have:
Several separate repositories with .NET solutions.
Each solution has a Service Fabric Project (.sfproj).
Each sfproj has a needed publish profile.
Local Service Fabric cluster, which is used for development/debugging.
What I need:
I want to create a ps script which will go solution by solution and deploy the projects to the local service fabric cluster. Right now I'm opening each solution in VS and I'm publishing the app from VS. And it takes a lot of time.
Main question:
How to write a command that will build and publish the sfproj using needed publish profile?
P.S.: I have read Azure service fabric create package command line question here. But I don't understand how to include the needed publish profile.
I have an application which I want to deploy to a number of VMS on Azure and AWS, I was working with Azure DevOps before and it provided very nice features to achieve this with deployment groups etc. Now I want to work with Github and I am really having problems to design my CI CD pipeline since Github actions do not have any feature which could be used to do deployment on a set of VMS. If there are please guys share your thoughts any article would be appreciated. Thanks
You can firstly consider to deploy application to one Virtual Machine with Github Actions.
Just in the environment of Azure, all you need is to use GitHub Action to build a virtual machine (VM) within Azure.
you can learn the detailed steps to deploy application to one Virtual Machine with Github Actions in:How to use GitHub Actions to deploy an Azure Virtual Machine.
For multi-environment deployments either in Azure or AWS with GitHub Actions, I recommend you to use Octopus Deploy as a reference. you can still refer to Multi-environment deployments with GitHub Actions and Octopus to deploy Virtual Machine on AWS.
For
deploy application to multiple Vms
We recommend you to use Azure Batch to run parallel workloads. It can allow you to deploy application to multiple Vms at one time in batch in the basic of deploy application to one Virtual Machine.
You can run the batch job using Azure CLI by following the example: Run Batch job with the Azure CLI.
What options are there to deploy a web application to a heavily locked down machine without WinRM?
The situation is as followed.
Code is in Azure DevOps cloud
Release server is in a semi-secured area with access to download artifacts from DevOps
Target server is in a very locked down zone.
If release server can only copy files to a specific temporary folder target machine, is there a way to do deployment to it without WinRM?
My initial thought is to have a script on the Target machine to watch for the artifact showing up and deploy it. I want to know if there's a better way or if that's my best option?
If release server can only copy files to a specific temporary folder
target machine, is there a way to do deployment to it without WinRM?
If you've read document Deploy your Web Deploy package to IIS servers using WinRM, you would find the notice below the title:
A simpler way to deploy web applications to IIS servers is by using deployment groups instead of WinRM.
So you can consider using Deployment Group as a simpler direction. And here're some discussions(#1, #2) which may help you to do a choice between WinRM and Deployment Group depending on your needs.
Update1:
My initial thought is to have a script on the Target machine to watch
for the artifact showing up and deploy it. I want to know if there's a
better way or if that's my best option?
In your specific scenario, it's one choice when the target server cannot have line of sights to the Azure DevOp/TFS server and you can't(or maybe not want to) use WinRM.
Currently I am working on a project to provide Restful APIs on Azure. We want to deploy the project to both Azure Kubernetes and Service Fabric. Is there any possibility to do that? And how to implement the CI/CD on Azure?
We need to maintain all code login in a single project. Then create a deployment package for both aks and service fabric using the different configuration files/scripts. Or, we may have 2 extra projects in the same solution, 1 for aks, 1 for service fabric.
Those 2 options are all acceptable. Is there any sample or guide?
both aks and service fabric supports microservices deployment orchestration, if you would elaborate where are you facing the challenge, I or someone will be able to help you out in a more better way.
Azure has devops resources, so you can create CICD even easily.
https://azure.microsoft.com/en-in/product-categories/devops/
If you want to create your own CICD structure, there are tools like Jenkins. travis CI, terraform, ansible, chef, etc. that you can start looking in.
Can we expose ports on a Azure VMRole after we have published the project onto Azure?
Probably using Azure Powershell cmdlets or some other way.
At present, I am deleting the VMRole and adding new endpoints on my project (Visual Studio Azure Project) and re-publish it.
I'm pretty sure the answer is no for cloud apps. (VM Role is one type of role for a cloud app.) Endpoints have to be declared before publishing.