Posts

Showing posts with the label Template

Using Loops in Bicep

Image
I've been using Azure to test virtual machines and applications for quite a few years now and I've realized that although I mostly use two or three solution templates - like an Active Directory environment for example - in the majority of the cases I need more server or client machines. This is the main reason I decided to adjust my deployments and include loops so that I can control the number of machines using parameters and variables. In this post, I'll describe how I've used loops and hopefully how you can benefit from them. I'm a big fan of organizing resources in modules, so all of the examples will be based on a deployment of virtual networks and virtual machines from a main bicep file using the respective modules, one for each resource type. Multiple Resources/Modules Since we're talking about modules, what could be better than having the ability to deploy the same module multiple times! The first thing we need is a variable that will hold the custom fie...

Citrix ADC Deployment using Bicep

Image
Citrix ADC (formerly NetSceler) is, without doubt, one of the top enterprise Application Delivery Controllers on the market and the preferred solution for many organizations. It is offered in many different form factors, from physical to virtual appliances and even containers. Citrix ADC is also available on Azure, which makes it ideal not only for experimenting and getting to know it better but also for using it to publish applications and services. I've created a bicep template to serve as a starting point so that you can easily create an instance and get to know the resources required. The main template creates a subscription-level deployment that separates the resources into different resource groups. The resources to be deployed include: virtual network network security group network card public IP virtual machine Going through the bicep files, we have a main template file ( main.bicep ) that uses two separate modules to deploy the vNet ( vnet.bicep ) and the ADC ( adc.bic...

Deploy Bicep/ARM using Containers

Image
Developing using containers offers the ability to use different environments and software without having to install them on your development workstation, while at the same time you conserve a lot of system resources avoiding the use of virtual machines. Visual Studio Code has been receiving a lot of functionality towards that end with a great deal of extensions and part of that is targeting Azure template developement.  We can use VS Code to develop our code and then use a container with all the Azure tools to deploy. This post describes this very process, from docker installation to VS Code configuration and finally template deployment.  First we need to install all the necessary components on our system. This includes Docker Desktop, Visual Studio Code and a patch for the linux kernel of Windows Subsystem for Linux (WSL 2). You can find Docker Desktop on the official Docker page here  and VS Code on its page over here . The Docker installation wizard will add any requir...