Azure Stack IaaS – part ten
This blog is co-authored by Andrew Westgarth, Senior Program Manager, Azure Stack
Journey to PaaS
One of the best things about running your VMs in Azure or Azure Stack is you can begin to modernize around your virtual machines (VMs) by taking advantage of the services provided by the cloud. Platform as a Service (PaaS) is the term often applied to the capabilities that are available to your application to use without the burden of building and maintaining these capabilities yourself. Actually, cloud-IaaS itself is a PaaS since you do not have to build or maintain the underlying hypervisors, software defined network and storage, or even the self-service API and portal. Furthermore, Azure and Azure Stack gives you PaaS services which you can use to modernize your application.
When you need to modernize your application, you have the option to leverage cloud native technologies and pre-built services delivered to you by the cloud platform. Many teams choose to utilize these capabilities when they add new capabilities or features to their existing app. This way they can keep the mature parts of their application in VMs while tapping onto the convenience of the cloud for new code.
In this article we will explore how you can modernize your application with web apps, serverless functions, blob storage, and Kubernetes as part of your Journey to PaaS.
Web apps with Azure App Services
Back in the virtualization days we had VM sprawl. So many VMs were taking up resources just to perform a single purpose. The most common was an entire VM just to host a website. Using an entire VM not only is wasteful from a resources point of view, but also in its on-going management. Azure App Services gives you a new option. Instead of creating a VM and installing a web server, you can just create a website directly on the platform. It is super easy to create a web app in the Azure Stack portal. Really the main thing you must provide is the website name which becomes part of the overall DNS name just like in Azure, but on the network you have installed your Azure Stack.
Once your web app is deployed you can push your website to it using FTP or web deploy or from a repository. You can access this simply by accessing the deployment options of the web app.
You can even create a custom domain for your web app so that your users can access your website with a more recognizable name. So, a URL like timecard.appservice.midwest.azurestack.corp.contoso.com can become timecard.contoso.com or some other domain entirely.
You can learn more about Azure App Services on Azure Stack:
- App Services on Azure Stack (for the operator)
- App Service Custom Domains
- App Service Documentation
- Quickstart guides for App Services
Serverless functions with Azure Functions
If you have something even smaller than a website, why create an entire VM? With Azure Functions you can simply host your code with the platform, no VM required. Example candidates for Azure Functions are scripts that need to be run on a schedule or a script that is triggered by a web request. I’ve seen people using functions to take periodic measurements of resource usage, check if something is responding properly, or notify another system that condition has been met. Azure Stack supports functions written in CSharp, JavaScript, FSharp, PowerShell*, Python*, TypeScript*, PHP*, and Batch* (* indicates experimental languages).
Functions are easy to create directly in the portal. You simply need to provide a name for the function then pick a scenario template to get started:
You can even test and run your function directly in the Azure Stack portal:
Learn more:
Storage as a service with Azure Storage
Another common but wasteful use of VMs in the virtualization days was storage. Teams set up their own file servers for their web app’s images or for sharing of documents. When you use Azure Stack you can take advantage of the built-in platform storage features. Azure Storage in Azure Stack gives you four storage options:
- Blobs for unstructured data like web images, files, and logs that can be accessed by a code-friendly URL instead of a file-system object.
- Queues for durable message queuing accessible via a web friendly REST API.
- Tables for semi-structured XML data like JSON with OData-base queries.
- Disks for persistent storage to support your Azure Virtual Machines.
To get started with Azure Storage you create a storage account in your Azure Stack subscription. Once you create the storage account you can create blobs, tables, or queues. Here I have created a queue of items for my team to bring for a picnic which they can de-queue when they sign up for bringing it:
Using Azure Table Storage is Azure Stack allows you to store and query store semi-structured data for apps that require a flexible data schema. You can access this data through the Azure Storage SDK or use tools like Azure Storage Explorer or Microsoft Excel to view and edit the data. Here is a baseball roster stored in Azure Table Storage viewed from Azure Storage Explorer:
Here is the same data accessed from Microsoft Excel:
Sharing unstructured data is easy as well. Here are all the logs my IoT devices are creating. I can download or even upload logs right in the portal or in code via the blob URL:
Learn more:
- Azure Blob Storage
- Azure Disk Storage
- Azure Table Storage
- Azure Queue Storage
- Connect Azure Storage Explorer to Azure Stack
- Connect Microsoft Excel to Azure Table Storage
Secrets with KeyVault
How did you keep passwords and certificates secret in the virtualization days? Admit it, not always best practices. KeyVault is a built-in Azure platform service that provides a secure place for you to keep your secrets. You can create a VM on Azure Stack with a secret kept in KeyVault. This way you don't need to put passwords or other secrets in clear text in the template you use to deploy the VM. This is just another example of how you can modernize your VMs by taking advantage of the Azure platform services.
Learn more:
Containers with Kubernetes
Another great way to modernize your application is to take advantage of containers. Azure Stack gives you the option to host your containers in a Kubernetes cluster. This Kubernetes cluster is created using the Azure Kubernetes Service (AKS) engine so that you can easily move your applications between AKS in Azure and your Kubernetes cluster in Azure Stack. Creating a Kubernetes cluster is easy in Azure Stack, simply deploy it from the portal’s marketplace.
Azure Stack Kubernetes Cluster is currently in public preview.
Learn more:
- Deploy Kubernetes to use containers with Azure Stack
- Add Kubernetes to the Azure Stack Marketplace (for operators)
- Azure AKS Engine
The platform for apps not just VMs
The primary focus of virtualization platforms is helping improve the life of the infrastructure team. But with cloud platforms the focus is on improving the life for business units and developers. Virtualization VMs will only take you so far. But when you move your VMs to cloud-IaaS in Azure or Azure Stack, you can modernize your app to stay current with your users who now expect cloud cadence. Tapping into native PaaS services gets you out of the business of infrastructure and into the business of your app.
In this blog series
We hope you come back to read future posts in this blog series. Here are some of our past topics:
- Azure Stack at its core is an Infrastructure-as-a-Service (IaaS) platform
- Start with what you already have
- Fundamentals of IaaS
- Protect your stuff
- Do it yourself
- Pay for what you use
- It takes a team
- If you do it often, automate it
- Build on the success of others
Source: Azure Blog Feed