Azure service fabric create package command line - azure

I've seen is possible to push Azure Service Fabric applications using PowerShell, but for this the package of the application is a pre-requisite, and in all tutorials I can only create it through visual studio.
Is there any way to create the package from command-line?
I plan to create my package on the build server.

The basic answer for command line is this:
msbuild Application.sfproj /t:Package /p:Configuration=[Debug|Release]
The article on setting up continuous integration that Raphael posted goes into more detail about how to set this up in a VSTS build definition.

Well, we have a good guide here:
https://azure.microsoft.com/en-us/documentation/articles/service-fabric-set-up-continuous-integration/#create-your-build-definition

Related

Create Azure Deployment Package & deploy to cloud service

I have a web project and Azure cloud service deployment project. I am currently deploying to Azure cloud service manually by creating package and updating the package in Azure portal. I wanted to automate this process using PowerShell script. I found a blog which list out the steps, but it is very old. Also, I am not able to use exec msbuild command that is mentioned in this article. Can you help me how to following command? I am not able to execute this from powershell window.
exec { msbuild /p:Configuration=Release /p:DebugType=None /p:Platform=AnyCpu /p:OutputPath= /p:TargetProfile=Cloud /t:publish /verbosity:quiet }
https://www.kenneth-truyers.net/2014/02/06/deploying-cloud-services-to-azure-with-powershell/
Are you using azure devops? If yes, and automating the deployment of your website to cloud is the problem then consider using pipelines? I hope I understood your question correctly!

Install an MSI into Azure Service Fabric node

How can I install a MSI into service fabric remotely or after a deployment? I have an install I need on each node in the cluster. Using Remote Desktop and running the MSI is not an option. I need something that scales. Any thoughts?
You could take a look at Desired State Configuration (DSC) there is an extension which you can use within your ARM template, it is a big topic so here is a couple of links that might help get you started.
vmss with dsc
installing msi with dsc
I figured out how to do this using the SetupEntryPoint and ExeHost in the ServiceManifest.xml file. See the documentation here Documentation to SetupEntryPoint

How can I deploy a html website using Azure Resource Manager

I've got a website (basic html) and I want to deploy it using Azure Resource manager. It doesn't have a visual studio sln file and I don't want to create one.
I've found this tutorial for an angular website that does something along the lines that I am trying to do. http://www.azurefromthetrenches.com/how-to-publish-an-angularjs-website-with-azure-resource-manager-templates/
The problem I want to solve is that I have the Microsoft Azure SDK for .NET (VS 2015) 2.8.2 which allows me to add resources to my resource group project. The tutorial writes everything itself, rather than use visual studio to create the resources.
Does any one know how to do this?
I've got my application to build the website using a website.publishproj (found at the tutorial) so I have my zip file, what I am now lacking, is how to upload the zip file to azure using the already existing powershell that comes with the 2.8.2 SDK.
So far i've added the below code under the Import-Module statement:
C:\"Program Files (x86)"\MSBuild\14.0\bin\msbuild.exe 'C:\Source\website.publishproj' /T:Package /P:PackageLocation=".\dist" /P:_PackageTempDir="packagetmp"
$websitePackage = "C:\Source\dist\website.zip"
If you're ultimate goal here is the ability to simply deploy and changes to the Azure Web App, one solution is to setup automated deployment from a local Git repository into an Azure Web App. Firstly, you'd create the RG in the Azure portal then configure Continuous Deployment. You can then use something like Visual Studio Code to trigger the deployment from any code changes.
Good run through here: https://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-app-using-vscode/
Assuming your website is under source control eg. GitHub - you can use an ARM template to point at the GitHub repo, so when it creates a new website it will automatically pull the content into your newly created site. Great walkthrough here: https://azure.microsoft.com/en-us/documentation/articles/app-service-web-arm-from-github-provision/ or just the code can be found here: https://github.com/Azure/azure-quickstart-templates/tree/master/201-web-app-github-deploy.
You can use Azure CLI from non-Microsoft world to deploy eg.
azure group deployment create...
If this has helped, please mark as answered.

Can I deploy to Azure Cloud Services with a mac?

Deploy with non-windows SDK?
The documentation is vague or non-existent for deploying to Azure's Cloud Services from a non-windows environment. I have the Azure SDK for node.js and the CLI but there are no commands for publishing or building the required packages.
This repo used to solve the problem, but hasn't been touched in several years and no longer seems to work: https://github.com/c9/azure-cmdlet-node
Found Documentation
or lack thereof
None of this explicitly says you can't deploy outside of Windows, but nor does it say you can:
This document explains deploying and building the package via Powershell: http://azure.microsoft.com/en-us/documentation/articles/cloud-services-nodejs-develop-deploy-app/
This explains how to do it with git and an Azure Website (not Cloud Service): http://azure.microsoft.com/en-us/documentation/articles/web-sites-nodejs-develop-deploy-mac/
And this article talks about the package and configuration that needs to be generated: http://azure.microsoft.com/en-us/documentation/articles/cloud-services-how-to-create-deploy/
You can't. I tried and tried and eventually gave up.
https://mediocre.com/forum/topics/one-does-not-simply-run-node-js-on-microsoft-azure
Have you tried cross platform command line interface
http://azure.microsoft.com/en-us/documentation/articles/xplat-cli/

Publish Azure Application with MSBuild

Visual Studio 2013 has a publish wizard for Cloud Service projects that packages and deploys a cloud service based on settings persisted in a .azurePubxml file.
I'm setting up automation of this process on a CI server, and want to leverage this functionality within MSBuild, but I'm unsure if it's even possible.
I have found a lot of articles that talk about shelling out to a PowerShell script and using a custom MSBuild target file to do the deploy, but that seems like a duplication of information that I'd rather not delve into.
Given that I have the Azure subscription credentials installed on the build machine, VS 2013, and Azure SDK 2.2, can I invoke the same mechanism that VS 2013 uses in the publish wizard to package and deploy my cloud service?
Currently, using MSBuild with the publish target, I can package the service into a .cspkg file, but I cannot figure out how to trigger to package/deploy based on a profile (.azurePubxml file) that defines the VS build config, and all of the Azure settings.
So, as you pointed out, the default targets will only give you a package. From there, Visual Studio is publishing things using their own infrastructure. Publishing the build from a CI server is considered something external to actual build process and rather something that is part of the deployment process.
If your CI technology has support for PowerShell then it's as easy as automating the Windows Azure PowerShell cmdlets to do your bidding. There's a nicely detailed article on how you might do this with Team Builds in TFS here on MSDN.

Resources