The Azure Container Instances service helps developers deploy applications easily and fast— without requiring knowledge about infrastructure or networking. Azure Container Instances (ACI) is new in the Azure marketplace. The idea of the service is very simple. You can deploy applications via containers, but there are no infrastructure considerations.
How it works
With Azure Container Instances, it is possible to start containers without the need for an entire VM. It speeds up deployment, and has a significant level of security because it isolates your application with containers. As needed, it can also be made available by a public IP. You can customize the configuration to get what you really need (and in line with your budget). Plus, the storage is mounted directly to the Azure file share, which is one less thing to worry about. If you’re thinking about deploying something cross-platform, you can, because it accepts application configurations on the Windows and Linux platforms.
After running a container, you can access it in the way you choose. Because you don’t have hardware considerations, all the resources are abstracted and can be scaled easy. And it can even be managed by Kubernetes via the integration.
ACI in practice
For a practical example of installing a container instance, I will show some examples of creation. Go to your Azure portal, and click the New option on the left side. Then, type in Azure Container Instances. The following screen will appear.
Next, we have the screen for the basic settings of the environment. I’ll choose the name “container,” but I do not recommend that it always have the same name, as it can bring you difficulties later.
This screen is a very important one because it is where you choose how many colors your application will use, how much memory will be directed to it, whether it will have a public IP, and the port that will be released for access.
Next, we have the validation of the configuration, which means that your application will be created in a few moments. We will wait to open it and see the results.
Save the steps of the next screens if you want to work in the container portal. Then, you’ll go to Automation Script.
In this screen, you will stay longer. Notice that you have a template, and command line in case you want to edit or upload your code via the template.
It is also possible to do a command line deployment. It is much easier and more convenient to use the command line, especially for those who are used to code, scripts, etc. The advantage of using the command line is that editing code or uploading an instance is faster than the portal. With the command below, we can upload an instance quickly by defining the name of the container, the image that will be used, the resource group, and the type of IP chosen.
az container create –name mycontainer –image microsoft/aci-helloworld –resource-group myResourceGroup –ip-address public
If you are thinking about ways to use this functionality, you can actually use it in any deployment you like. Take NGINX as an example. Initially, you would have to create a VM, choose the operating system, configure the hardware, and then install NGINX. With ACI, you simply go to NGINX. You can even use the following command line.
az container create -g aci_grp –name nginx –image library/nginx –ip-address public
Conclusion
With ACI, you can see Microsoft’s change of thinking about the command line, because of the option to do a command line deployment. Plus, with Azure Container Instances, it is possible to configure with and without Docker and Kubernetes. Basically, it is a manager of work completed, as if it were a collection of instances. For those who do not have the CLI habit, the command line will seem a bit strange. However, it is easy to adapt, and there is plenty of documentation.
Those who already have the habit will realize that it is much better and more intuitive to use the CLI provided by Azure. From the point of creation of the instance in ACI, there is a perceptible change of conception from Microsoft, because an instance is understood as a file. When you work with an instance creation script, you can make improvements and recreate multiple instances in a matter of seconds—besides, of course, version management or sharing by Git.