Alycia  Klein

Alycia Klein

1598702280

Deploy a Single Page Application to Azure Storage using Azure Pipelines

Create a simple static web app

First, we will start with a very simple web application, an index.html file, that displays the environment and version on the page.

Note_ The web application is very simple. You can use the result of a more complex build (from a React, Angular or VueJs application for example). This is not the purpose of this article._

Here is the index.html file :

<!doctype html>
	<html lang="en">

	<head>
	    <title>Demo Pipeline</title>
	</head>

	<body>
	    <h1>Variables ...</h1>
	    <ul>
	        <li>Environment :  </li>
	        <li>Version :  </li>
	    </ul>
	    <script src="assets/script.js"></script>
	</body>

	</html>

Then the script.js file :

async function run() {
	  const response = await fetch('assets/config.json');
	  const json = await response.json();
	  Object.entries(json).forEach(([key, value]) => {
	    const el = document.querySelector(`#${key}`);
	    if (el) {
	      el.textContent = value;
	    } else {
	      console.warn(`Element with id : ${key} not found ...`);
	    }
	  });
	}

	run().catch((err) => {
	  console.error(err);
	});

And the config.json file :

#continuous-delivery #ci-cd-pipeline #azure #continuous-integration #azure-devops #devops

What is GEEK

Buddha Community

Deploy a Single Page Application to Azure Storage using Azure Pipelines

Paresh Sagar

1581940975

What Is A Single-Page Application?

Single page web apps are an ideal choice when thinking about future web development. This architecture is a perfect choice for social networks stuff, SaaS platforms, or some close communities where SEO doesn’t matter.

#what is a single page application #single page application #single page application development

Alycia  Klein

Alycia Klein

1598702280

Deploy a Single Page Application to Azure Storage using Azure Pipelines

Create a simple static web app

First, we will start with a very simple web application, an index.html file, that displays the environment and version on the page.

Note_ The web application is very simple. You can use the result of a more complex build (from a React, Angular or VueJs application for example). This is not the purpose of this article._

Here is the index.html file :

<!doctype html>
	<html lang="en">

	<head>
	    <title>Demo Pipeline</title>
	</head>

	<body>
	    <h1>Variables ...</h1>
	    <ul>
	        <li>Environment :  </li>
	        <li>Version :  </li>
	    </ul>
	    <script src="assets/script.js"></script>
	</body>

	</html>

Then the script.js file :

async function run() {
	  const response = await fetch('assets/config.json');
	  const json = await response.json();
	  Object.entries(json).forEach(([key, value]) => {
	    const el = document.querySelector(`#${key}`);
	    if (el) {
	      el.textContent = value;
	    } else {
	      console.warn(`Element with id : ${key} not found ...`);
	    }
	  });
	}

	run().catch((err) => {
	  console.error(err);
	});

And the config.json file :

#continuous-delivery #ci-cd-pipeline #azure #continuous-integration #azure-devops #devops

Automate Spring Boot application deployments to Azure!

Today, we’re excited to announce the availability of the Azure Pipeline Task for deploying Spring Boot applications to Azure Spring Cloud. You can get started by building your pipelines using the Azure Spring Cloud task to automate Spring Boot application deployments to any number of environments and Azure Regions.

Over the past 18 months, we worked with many enterprise customers to learn about their scenarios including thoughts on automating end-to-end from idea to provisioning Azure resources to building Spring Boot applications to deploying those applications to production. Many of these customers have thousands of Spring Boot applications running in on-premises data centers. As they migrate these applications to the cloud, they need everything automated end-to-end to ensure repeatability and meet the requirements set forth by their IT departments and/or regulatory bodies. They require a fully-featured Continuous Integration / Continuous Delivery (CI/CD) service that can automatically deploy updated Spring Boot applications to Azure Spring Cloud. In many customer environments, they use Azure CLI in Azure Pipelines to automate Spring Boot application deployments to Azure, and they asked Microsoft for an Azure Spring Cloud task to ease their automation effort and delegate the maintenance of the deployment task to Microsoft. Now, using the new Azure Spring Cloud task, anyone can automate deployments straight to production or automate blue-green strategies to stage for testing and then set to production.

#[object object] #spring boot #azure #application deployments #automate spring boot application deployments to azure!

Automating deployments to on premise servers with Azure DevOps

As someone who has spent most of their (very short) career doing one click cloud resource deployments, I was shocked when I jumped onto a legacy project and realised the complexity of the deployment process to staging and production. Using a traditional .NET Framework application stack, the deployment process consisted of the following steps:

  1. Set the configuration target in Visual Studio to release
  2. Build the project
  3. Copy the .dlls using a USB to a client laptop which was configured for VPN access
  4. Copy the .dlls via RDP to the target server
  5. Go into IIS Manager and point the file path to the new version of the application

As you can see and may have experienced, this is a long, slow and error-prone process which can often take over an hour given likelihood of one of those steps not working correctly. For me it was also a real pain point having to use the client laptop, as it had 3 different passwords to get in, none of which I set or could remember. It also meant if we needed to do a deployment I had to be in the office to physically use the laptop — no working from home that day.

My first step was to automate the build process. If we could get Azure Pipelines to at least build the project, I could download the files and copy them over manually. There are plenty of guides online on how to set this up, but the final result meant it gave me a .zip artifact of all the files required for the project. This also took away a common hotspot for errors, which was building locally on my machine. This also meant regardless of who wrote the code, the build process was always identical.

The second step was to** set up a release pipeline**. Within Azure Pipelines, what we wanted to do was create a deployment group, and then register the server we want to deploy to as a target within that deployment group. This will allow us to deploy directly to an on premise server. So, how do we do this?

Requirements:

  • PowerShell 3.0 or higher. On our Windows Server 2003 box, we needed to upgrade from PowerShell 2.0. This is a simple download, install and restart.
  • .NET Framework x64 4.5 or higher

Steps:

  1. Navigate to Deployment Groups under Pipelines in Azure DevOps:

Image for post

Deployment groups menu item in Azure DevOps > Pipelines

2. Create a new deployment group. The idea is you can have several servers that are in the same group and deploy the code to all of them simultaneously (for example for load balancing reasons). In my case I only have one target in my deployment group, so the idea of a group is a bit redundant.

#azure #azure-pipelines #deployment-pipelines #windows-server #azure-devops #devops

How To Develop, Build, Deploy Application using .NET 5, CI/CD, Azure App Service, Azure...

Develop, Build, Deploy applications using .NET 5, CI/CD, Azure App Service, Azure SQL Database, Azure Storage Account.

Welcome to my hands-on session on the Complete Development and Deployment of a.NET5 application using Azure services. My name is Sandeep Soni. I am a Microsoft Certified Trainer and an Azure Architect.

Connect with me 👋
Call Sandeep Soni for Career Guidance ► +91 98490 01840
Connect with me on LINKEDIN ► https://www.linkedin.com/in/sandeepsoni123/

👉🏼 Upcoming FREE Tech Webinars: https://www.bestdotnettraining.com/courses-and-webinars
👉🏼 Join our WhatsApp group: https://chat.whatsapp.com/CiFJr9qmid08NesQ86WWvg

#deccansoft #bestdotnettraining #sandeepsoni

▬▬▬▬▬▬ COURSE OVERVIEW 📚 ▬▬▬▬▬▬
🔥 Topics Discussed 🔥
► .NET5
► CI/CD Pipelines
► Azure App Service
► Azure SQL Database
► Azure Storage Account

💻 📡 LIVE Webinars & Courses
► Check our upcoming schedule 👉🏼 https://www.bestdotnettraining.com/courses-and-webinars
► 📲 Join our WhatsApp group to get all updates 👉🏼 https://chat.whatsapp.com/CiFJr9qmid08NesQ86WWvg
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
We want to reach 100K Subscriber, please do subscribe so we reach our goal faster :)
Subscribe for related videos: https://www.youtube.com/user/Deccansoft123

👨🏻‍🏫 This complete tutorial is compiled by Sandeep Soni, a Microsoft Certified Trainer, a Software & Corporate Trainer for 24 years!
For more great tutorials from the creator of this course, check out https://www.bestdotnettraining.com/

📞 Reach us @ +91 8008327000 Kashmira Shah

📱 Connect with us

#azure sql database #azure sql #azure #azure app service #.net 5 #ci/cd