How to setup sonar in Azure? - azure

I am planning to setup sonar in VSTS for that I tried searching blogs and stack overflow.I got few links to setup sonar but all I need is to have Microsoft SQL windows server 2012 R2 as a IAAS. I need dedicated VM as IAAS(Infrastructure as a service) to configure sonar in Azure after creating Microsoft SQL server VM I can give that endpoint in VSTS and can run sonar.But in my company we are having all VM's as a PAAS(Platform as a service).My organization is not ready to have VM as IAAS.So kindly provide the solution how can I configure sonar in VSTS.
The below link received from stackOverflow.
http://donovanbrown.com/post/how-to-setup-a-sonarqube-server-in-azure

SonarQube is designed to use a dedicated server and needs access to a database. Take a look at the system requirements for details. There is no way to host it inside of VSTS.
If your organization isn't ready to do IaaS with Azure, then you have two options. The first option is to setup a SonarQube server in your office or data center and make it publicly accessible.
If that isn't an option, then your only other option is to make use of SonarCloud as Fabrice mentioned in the comments. Take a look at this blog post for setting up VSTS and SonarCloud.

Well, if you wish to hosted in SonarQube in Azure then you are in luck. You can make a VSTS/Azure DevOps Project where you add this Github: ARM Template for VM, network and DB setup for SonarQube to your a GIT repo.
This will give you the possiblity to have you secrets safe in VSTS/Azure Dev but automatically support the SonarQube setup from Azure DevOps with Cloud Infrastructure.

Related

Automated way to add & deploy SPFX sppkg solution package file to SharePoint 2019 (on-premises) app catalog

I'm looking for an automated way for adding & deploying SPFX solution package (*.sppkg) into the SharePoint 2019 (NOT online) app catalog. This is cause and doing the deploying using azure devops (CI/CD) release pipeline.
I found those two below tasks for adding this package:
The first one worked fine in just adding the file to the app catalog but not deploying it, so I had to do it manually.
The second task has the option to write PnP script against SharePoint, but the problem with me is that most of the scripts i found are for SharePoint Online not on premise.
Appreciate your support if you had such situation and got it solved using PnP or something else.
Microsoft's official documentation describes an approach to continuous deployment using Azure DevOps. You can click Implement Continuous Integration and Continuous deployment using Azure DevOps for detailed information. There is no need to write PNP scripts using this method.
Setting up Azure DevOps for Continuous Deployments with a SharePoint
Framework solution requires the following steps:
Creating the Release Definition
Linking the Build Artifact
Creating the Environment
Installing NodeJS
Installing the CLI for Microsoft 365
Connecting to the App Catalog
Adding the Solution Package to the App Catalog
Deploying the Application
Setting the Variables for the Environment
If you just want to use Azure DevOps CD and don't want to use CI, you can skip the second step and upload your build artifacts directly to the repository, and then use them in the release pipeline.
There are some basic scenarion for using pipelines:
You use cloud pipeline (azure, github, etc) with their abilities and their purpuse.
You create own environment with self-hosted pipelines
You add own runner (pipeline agent) to your cloud (azure) environment
So, azure allows you to add own pipeline agent to environment. For example, self-hosting windows agent.
So, I think solution in your case will be:
Install self-hosted agent
Configure agent environment - installing SharePointPnPPowerShell2019
Add agent to your azure environment
Add step to deploy your solution into pipline with using self-hosted agent
This scenario allows you to deploy sppkg solutions without publish your app catalog to internet, because your self-hosted agent will be in the save network as your sharepoint farm.
Azure pipeline deploy steps allow to run powershell on target machines
Prerequisites This task uses Windows Remote Management (WinRM) to
access on-premises physical computers or virtual computers that are
domain-joined or workgroup-joined.

Redirect Self-Hosted Building Agent to Azure Devops Service

I have the following problem to solve but I cannot find the right documentation.
I just upgrade the version control software from TFS (on premise) to Azure Devops Service.
I have my own self-hosted building agents that are hooked upo with the TFS istance.
What I want to do now is to redirect them from pointing to TFS to pointing into Azure Devops Service.
I can find everything about the authentication part, token and so on but I miss the basic steps on reconfiguring the building agents themselves. Can someone help me by any chance?
You can reconfigure your build agents into Azure DevOps. Remove and re-configure an agent
To remove the agent:
.\config remove
After you've removed the agent, you can configure it again.

How do you create an installer for Azure Web Apps / Azure Websites

I am a software vendor with a .net web solution that I want customers to be able to easily install / deploy into Azure Web Web Apps / Azure Websites along with a Sql Azure backend. I can't find any installer tool that supports this scenario. I have also looked into the Azure Marketplace but it seems the only option there is to create VM images. I want my customer's to avoid having to deploy to an manage VMs and adopt the IaaS model. Instead they should be able to install to Azure Web Apps with a package that copies all the web solution files and installs and connects the Azure Sql. Is this possible or will I have to manually deploy and configure Azure solution for each customer?
You can use the VS Marketplace to do the deployment. What you need is to create an ARM template. There is a huge number of samples here: https://github.com/Azure/azure-quickstart-templates - you can pick one of the web app ones - for example: https://azure.microsoft.com/en-us/resources/templates/201-web-app-sql-database/ - has a SQL database linked to a web app.
The ARM template allows you to do a "no-hands" deployment of the resources and know when they are ready for further action. You can also deploy from any of the supported continuous deployment options (see the template with a GitHub connection as an example) or you can use ftp/msdeploy after the deployment is successful.
This is a good tutorial https://learn.microsoft.com/en-us/azure/azure-resource-manager/vs-azure-tools-resource-groups-deployment-projects-create-deploy
This is the github example mentioned in previous answer
https://github.com/Azure/azure-quickstart-templates/tree/master/201-web-app-github-deploy

Azure ARM template Continuous Delivery Release pipeline

I am developing CD release pipeline using TFS 2015 update 2 on-prem instance. I'm relying on ARM template to setup Azure website and Azure Sql server. I'm using FTP method for deploying website bits from internal Build server to Azure website. For this website deployment I'm reading the credentials from PublsihingProfile of the newly created website.
Is this a right way or can you suggest a better way? Any comments are appreciated.
P.S. Customer wants to use FTP method and not WebDeploy.
If you really have to use FTP, and the thing you're not happy with is the process/password secret management, you could try this:
https://marketplace.visualstudio.com/items?itemName=januskamphansen.ftpupload-task
Its a VSTS extension task for release, which works with the vnext build/release system in VSTS or TFS2015 server. This task lets you put the parameters in against each environment you setup, and mark the passwords as secrets so they wont come out in logs or the UI.
The step basically wraps up the process of doing the ftp bit for you - you may want to do other steps as part of the release.

Can anyone give guidance on installing TFS Build on a Windows Azure Role

We have TFS 2010 working on-premise in a domain environment.
I want to add a Build Service which will be hosted in a multi-instance Azure service wherein the build agent runs in the cloud. It will have access to SourceControl from on-prem TFS probably through Service Bus. I would prefer to do this without using a VM Role if possible.
The most likely topology as per Understanding a Team Foundation BuildSystem is either the 'Multiple-machine System' or 'Multiple-machine system with multiple controllers'
Has anyone done this specific type of deployment, how?
Could the Build Agent be made to run in a Web or Worker role?
For the tfs preview it can be done using the vm role: http://bartwullems.blogspot.com/2011/10/running-your-build-server-on-azure.html

Resources