Delivering Your Code to the Cloud With JFrog Artifactory and GitHub Actions

Introduction

Artifactory and GitHub actions work great together to manage your deployments to the cloud. In this post, we’re showing an example that deploys an application to Microsoft Azure. This case involves an Azure web app, but the techniques we’re showing today could be used to deploy to any cloud service, virtual machines, or Kubernetes. Also, the application highlighted today is written in Java, but you could use any type of application code in the same way. I’m using Azure web apps because it has built-in CI/CD integration and it integrates easily with JFrog products, including Artifactory and X-Ray. The IDE I’m using is Visual Studio Code, an open-source, free text editor you can get at code.visualstudio.com. Our code is in a GitHub repo, and we're storing some of the dependency artifacts using Artifactory. Here’s a screenshot of the application:

It's a Spring Boot application that shows the Microsoft Developer Advocate mascot named Bit.  You can find the source code in this repo

Azure App Service, Azure Cloud Services, or VMs – Which Hosting Service Is Right for Your App?

Learn How To Choose Between Azure App Service, Azure Cloud Services, and VMs To Host Your App in the Azure Cloud

Microsoft Azure provides different ways to deploy your applications to the Azure cloud and choosing the right fit can often become a challenging. Azure App Services, Cloud Services, and Virtual Machines are the most popular and easiest to use. 

Let us have a look at all 3 and then compare them against each other to figure out the strengths and weaknesses, and over all compatibility with your project.

Using Startup Command to Pass Command Line Arguments to Azure App Service for Linux

Azure App Service on Linux has several prefabricated Docker images that support applications written in languages such as .NET core, PHP, and Node.js. App Service also supports using your own Docker image to spin up a container for your application. A useful configuration feature of App Service on Linux is the Startup File configuration that you can set as part of configuring the runtime stack. The value that you specify for the configuration overrides the CMD instruction of the Dockerfile that creates the runtime of the application. If you are not aware of this configuration option, we will soon deploy an application that uses this configuration option soon, so keep reading.

The Docker documentation states that if your Dockerfile has both CMD and ENTRYPOINT instructions, then CMD arguments are appended to the end of the command generated by the ENTRYPOINT instruction. A necessary condition for this feature to work is that you must use the exec form of the ENTRYPOINT instruction in your Dockerfile. In simple terms, assume that your Dockerfile has the following instructions.

Investigating a Memory Leak in Entity Framework Core

Don't let memory leaks become floods

The terms "memory leak" and ".NET application" are not used together very often. However, we recently had a spate of out of memory exceptions in one of our .NET Core web applications. The issue turned out to be caused by a change in behavior in Entity Framework Core, and whilst the eventual solution was incredibly simple, the journey to get there was both challenging and interesting.

The system itself is hosted in Azure and is comprised of an Angular SPA front-end and a .NET Core API on the back-end, using Entity Framework Core to talk to an Azure SQL Database. As a software consultancy specializing in .NET development, we've written many similar applications before.

Migrating Spring Java Applications to Azure App Service (Part 2 – Logging and Monitoring)

As we demonstrated in Part 1 of the series, running on the cloud is not only for cool new applications following twelve-factor principles and coded to be cloud-native. In the first article, we demonstrated how to migrate a legacy Java Spring application to run on Azure App Service and how to address handling JNDI, credentials, and externalizing the configuration. In this article, we will show to enable logging, and monitoring to use Azure native capabilities. The full application example is available on Github.

Application Insights

Application Insights is an extensible Application Performance Management (APM) service helping to monitor web applications. It will automatically detect dependencies such as HTPP or JDBC calls and includes powerful analytics tools to help you diagnose performance issues. For more details, refer to Microsoft's Getting Started Guide.

Migrating Spring Java Applications to Azure App Service (Part 1: DataSources and Credentials)

Originally published July 23, 2019

Running on the cloud is not only for cool new applications following 12-factor principles and coded to be cloud-native. Many applications could be converted to be cloud-ready with minimal adjustments — just to be able to run in the cloud environment. In the following few articles we will demonstrate how to address the most common migration items in legacy Spring applications — handling JNDI, and credentials, externalizing configuration, remote debugging, logging, and monitoring.