Working with Azure Resource Manager (ARM) deployment scripts as with any other scripts can be a challenge. Especially in the moment when you want to run a deployment script.
Why?
How often did you discover that to be able to run a script you need to specify a lot of parameters? The happy case is when a default value is already specified and even if you don't know what happens behind you don't care and only 'click next button'.
I observed that the number of parameters is directly connected with the size and complexity of the deployment. After a specific threshold, the number of parameters that don't have a default value is high, making almost impossible to run the scripts.
Because of this, complex pre-deployment steps would require a lot of time, especially when it is the first times when you make that deployment or something change.
I remember one time I saw a deployment scripts written in ARM and PowerShell that was a state of an art from the way how it was designed and written. As long as you would be able to understand and specify the correct value of each parameter, the deployment script would create and configure for you an ultra complex system, with more than 1.000 components.
Making the script working by specifying the right value of each parameter is another story.
There were many other configurations, but you made an idea.
VMs T-shirt Size
The T-shirt concept is simple, can be understood by anybody and is extremely useful when you need to specify the tier size.
It's more simple to specify a size of a T-shirt like Small, Medium, Large or X-Large than having to specify the VM size and/or the number of instances.
Without T-shirt size you would need to ask yourself how many instances of a specific VM I need ? 2, 6 or 12? Are 4 or 8 enough? What is the minimal size of a VM that is acceptable, should I use the default one or I need another size?
The T-shirt size resolve this for you. By allowing the person that defines the deployment script to specify the size of T-Shirt for number of VMs and/or for the VM tier.
Number of
You might say that this reduces the level of customization - yes, you're right. In the same time, don't forget that not all the time you need this customization and flexibility level. In most of the cases the scenarios are simple and clear.
A great article about this topic can be found on Endjin blog.
T-shirt at next level
T-shirt size helped us to resolve the parameters values, making this value more clear and simple to understand. Even with T-shirt size, the number of parameters was not reduced to much. We still need to specify values for different configurations like:
This means that we could group together parameters under a T-shirt model. By having parameters for configuration like:
Why?
How often did you discover that to be able to run a script you need to specify a lot of parameters? The happy case is when a default value is already specified and even if you don't know what happens behind you don't care and only 'click next button'.
I observed that the number of parameters is directly connected with the size and complexity of the deployment. After a specific threshold, the number of parameters that don't have a default value is high, making almost impossible to run the scripts.
Because of this, complex pre-deployment steps would require a lot of time, especially when it is the first times when you make that deployment or something change.
I remember one time I saw a deployment scripts written in ARM and PowerShell that was a state of an art from the way how it was designed and written. As long as you would be able to understand and specify the correct value of each parameter, the deployment script would create and configure for you an ultra complex system, with more than 1.000 components.
Making the script working by specifying the right value of each parameter is another story.
There were many other configurations, but you made an idea.
VMs T-shirt Size
The T-shirt concept is simple, can be understood by anybody and is extremely useful when you need to specify the tier size.
It's more simple to specify a size of a T-shirt like Small, Medium, Large or X-Large than having to specify the VM size and/or the number of instances.
Without T-shirt size you would need to ask yourself how many instances of a specific VM I need ? 2, 6 or 12? Are 4 or 8 enough? What is the minimal size of a VM that is acceptable, should I use the default one or I need another size?
The T-shirt size resolve this for you. By allowing the person that defines the deployment script to specify the size of T-Shirt for number of VMs and/or for the VM tier.
Number of
"vmsNumber": {
"small": 2,
"medium": 6,
"large": 12
}
"vmsSize": {
"small": A2,
"medium": A4,
"large": A8
}
In this way, not only the number of parameters is reduced, by also the complexity of parameters is reduced to a basic concept - to words not numbers. Now, based on the load of our system and other parameters we only need to specify small, medium or large.You might say that this reduces the level of customization - yes, you're right. In the same time, don't forget that not all the time you need this customization and flexibility level. In most of the cases the scenarios are simple and clear.
A great article about this topic can be found on Endjin blog.
T-shirt at next level
T-shirt size helped us to resolve the parameters values, making this value more clear and simple to understand. Even with T-shirt size, the number of parameters was not reduced to much. We still need to specify values for different configurations like:
- Redundancy levels
- Replication level
- VPN type
- Backup policy
- Encryption level
- ... and many more...
This means that we could group together parameters under a T-shirt model. By having parameters for configuration like:
- Deployment Size (small, medium, large)
- Security Level (low, medium, high)
- Redundancy Level (low, medium, large)
- ...
- Deployment Size (small, medium, large)
- VM Tier and Number
- DB Tier and Number
- Service Fabric cluster size
- App Service Tier
- Security Level (low, medium, high)
- Encryption level
- VPN connectivity (if is not required or not)
- Routing and firewall configuration of appliances
- Redundancy Level (low, medium, large)
- Storage replication
- DB and VM Backup policy
- Communication
As we can see, we can use this simple concept to group other parameters also, making scripts more simple, easy to read and understand.
Conclusion
Being technical persons, we try all the time to make a scripts configurable, adding as many values as possible in the parameters. Often we forget that the person that runs this scripts might not be so technical as we are or to understand all the dependencies between all parameters.
Offering a deployment scripts with less parameters might be useful especially when our target audience are sciences or persons that are not technical.
Comments
Post a Comment