Category: Uncategorised
Working from home has become increasingly popular in recent years, particularly in the field of technology. DevOps engineers, in particular, can greatly benefit from the flexibility and convenience of working from home.
One of the most significant benefits of working from home for DevOps engineers is the ability to have a better work-life balance. This can lead to improved mental and physical health, as well as increased job satisfaction. With the ability to work from home, DevOps engineers can avoid the stress and time wasted on commuting, allowing them to spend more time with family and friends, or pursuing personal interests.
To make sure your work cannot be interrupted you need to set good quality internet connection and make sure you have valid backup plan if main internet connection goes down. For main line browse for stable internet provider in your area by checking what companies is available and reading customers feedback on those provider services. Preferred method of connection will be fibre-optic internet but if your work not related to massive data transfer, simpler broadband will be just ok. As backup option can be mobile internet, or additional internet line.
Working from home also provides DevOps engineers with the flexibility to work in an environment that is comfortable and conducive to their productivity. This can mean working in a quiet space, being able to personalize their workspace, or having access to better equipment and technology.
When you as DevOps engineer work on variety of customers you may set you work area to your personal preferences: use specific to your work equipment like monitors, keyboards and other hardware. 49″ curved monitor and mech 60% keyboard, as an example, is my prefered setup. No way corporate company will allow you to spend company money for that or you need to bring valid arguments why it is required for Cloud or DevOps engineer to have such setup. So if possible buy you own hardware and you may use it for different customers or employers. It is you who made those money and now time to treat yourself for good tech.
Additionally, working from home can also result in a more efficient and productive workforce. DevOps engineers can manage their time more effectively, and are not constrained by the traditional 9-5 work schedule. This allows them to work during the hours that they are most productive and reduces the amount of time spent on non-work-related activities during work hours.
By adding to your daily routine some activities not related to what you do on the work desk will help you to keep sane in insane workload. Add exercise time to your day, outside walking time for catching fresh air and switch from one activity to another. It will benefits you in long run. For me was important to organise home gym with few bits in it to do some movements on the middle of the day during my lunch time. It is not require huge investment but pay off huge bonus to your mental and physical health.
Another benefit of working from home for DevOps engineers is the ability to work remotely with a global team. This can lead to increased collaboration, communication and knowledge sharing, which are all essential for the success of any DevOps team.
4-5 years ago working from home was not popular and most companies haven’t got this practice. Anyone asked for permission to work from home was most cases not allowed to do that. When COVID-19 strikes most industries was forced to move to work from home scheme and it paid off greatly. On my company were recorder 80% rise in productivity in IT department – you cannot argue with this facts.
At last, working from home has many benefits for DevOps engineers. It allows them to achieve a better work-life balance, work in an environment that is comfortable and conducive to their productivity, work more efficiently and productively and work remotely with a global team. With these benefits, it’s no surprise that more and more companies are embracing the idea of working from home for their DevOps engineers.
Templates in Terraform are forms of work with string. In the example described in this task we may use an ARM template generated in Azure and use variable interpolation to create a template for future deployments.
In Azure portal UI select the component which will be deployed in the future many times but with different name, in different resource group or different location. Navigate to “Export template” section and configure how would you like your template: with parameters or without parameters, select section which will be put in template. Select “Download” or highlight section and copy and paste into the future template file. After that this template will require modifications like adding dynamical parameters which will be replaced later to new environment variables.:
Defining a template in terraform can be done two ways: template as data-source or call template function. Template function requires a template provider. Preferred way is data source:
Data source example:
data "template_file" "public_subnet" {
template = file("publicSubnet.tpl")
vars = {
name = var.subnetname
addresPrefix = var.int_subnet_ip_range
}
}
In the example above we have an external template file publicSubnet.tpl which contains variables $(name) and $(addressPrefix). Those variables will be replaced by values from var.subnetname and var.int_subnet_ip_range defined in vars or defined during terraform execution.
To get this template ready to be used need to call it with rendered attribute:
data.template_file.public_subnet.rendered
If the plan is to use Azure ARM templates, the approach is slightly different. AzureRm provider has arm template deployment ability via azure_resoyrce_group_template_deployment. It will allow the use of ARM templates with parameters, defined template body and required dependency (resources already deployed).
Access to azure key vault happening via data source description. For example we need to access secret data in this key vault create in Azure resource group MacroLifeRG
In the terraform file to access key vault secret data need to define that like datasource as per example below:
data "azurerm_key_vault_secret" "myPass" {
name = "myAdminPass"
vault_uri = "https://macrolifekeys.vault.azure.net/"
}
For variable “name” value taken from Key vault Secret name:
Access stored secret data and use it in future resource creation can be done by calling data.azurerm_key_vault_secret.myPass.value:
resource "azurerm_windows_virtual_machine" "sqlmachine" {
name = "Dev_SQL_VM"
computer_name = "dbserver"
resource_group_name = var.resource_group_name
location = var.location_name
size = "Standard_B4ms"
admin_username = "adminuser"
admin_password = data.azurerm_key_vault_secret.myPass.value
network_interface_ids = [
azurerm_network_interface.dbserver-nic.id,
]
os_disk {
caching = "ReadWrite"
storage_account_type = "Standard_LRS"
}
source_image_reference {
publisher = "MicrosoftWindowsServer"
offer = "WindowsServer"
sku = "2016-Datacenter"
version = "latest"
}
}