Run PowerShell with Azure deployment scripts - Leo Visser - PSConfEU 2023

  Рет қаралды 190

PowerShell Conference EU

PowerShell Conference EU

Жыл бұрын

In this session, I introduce myself as Leo Visser, a cloud consultant at OGD in the Netherlands, specializing in infrastructure as code, CI/CD, automation, agile, and DevOps. I provide my Twitter handle and blog information for those interested in learning more about my work.
I then proceed to discuss the topic of the talk, which is Azure deployment scripts. I explain that deployment scripts are used in Azure deployments to run custom scripts during the deployment process. I mention that Azure spins up a small container to run these scripts, and then removes the container once the script execution is complete.
I go on to mention that I will be doing a demo using ARM templates, although the same concepts can be applied to Bicep templates. I explain that I work with many customers still using ARM, but I am gradually trying to transition them to Bicep.
During the demo, I create an automation account in Azure and demonstrate how to write and run a deployment script. I mention that Azure takes some time to process the deployment, so I continue discussing the use cases for deployment scripts, such as adding delays in deployments to ensure asynchronous processes are completed before proceeding, and calculating dynamic values within the script.
In the next part of the podcast, I discuss the process of pushing a PowerShell script to an automation account. I explain that while a git integration could be used, some customers may not have access to this feature or may not want to connect to it. To demonstrate, I show the script content and mention that it includes commands such as "getAZContext" and "import automation runbook".
I then show the success of pushing the script to the automation account and explain that deployment scripts have several advantages, including automatic cleanup after a certain period of time. However, I note that this can be an issue if traceability is desired.
Next, I discuss the different identity options for deployment scripts, including the ability to use a user assigned managed identity. I mention that I created a user assigned managed identity and linked it to a role in Azure. I explain that this allows the deployment script to access the automation account.
Moving on, I explain the concept of input and output for deployment scripts and give an example of creating a schedule in an automation account. I mention that the start date for the schedule needs to be in the future and that deployment scripts can be used to calculate the next suitable hour for the schedule to start.
Finally, I introduce another deployment script that does not require an identity and is solely focused on running a script. I explain that it has a parameter for deployment script outputs and show an example where the output is set to "text". I mention that this can be customized based on the specific requirements.
Overall, the podcast episode focuses on the use and implementation of deployment scripts in Azure, providing insights and practical examples for the audience.
In the next part of the podcast, I demonstrate a simple PowerShell command to get the current date, set minutes and seconds to zero, and add one hour to it. I discuss creating an automation schedule and a job schedule, linking them together. I mention a bug in Azure and mention that I picked the wrong browser. I recommend using template specs for working with ARM templates. I validate and create the schedule. I explain how deployment scripts can generate multiple outputs and discuss the potential slowness of deployment scripts. I show the progress of the deployment script and the output. I mention the issue with time zone conversion and daylight saving. I explain that the runbook is connected to the schedule. I introduce the possibility of script failure and show the deployment of a script with intentional errors. I discuss the importance of easily troubleshooting and accessing error details. Lastly, I touch on the practical applications of deployme…

Пікірлер
Azure Deployment Scripts - Real World Use Cases
59:12
Matt Allford
Рет қаралды 1 М.
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 49 МЛН
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 33 МЛН
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 13 МЛН
Azure DevOps and PowerShell Pipelines
13:35
Travis Roberts
Рет қаралды 22 М.
Get to know Mutemwa Masheke - PSConfEU 2024
29:50
PowerShell Conference EU
Рет қаралды 36
Infra as Code on Azure with CARML Bicep Modules - Part 1
1:31:40
Economist fact-checks Scott Galloway’s Anti-Boomer TED Talk
26:05
Money & Macro
Рет қаралды 30 М.
How I discovered classes (without much Class{}) - Stephane Van Gulick PSCONFEU
2:22:09
PowerShell Conference EU
Рет қаралды 3,5 М.
Learn PowerShell: Episode 1, The Basics
26:43
ABMedia
Рет қаралды 91 М.
PowerShell with a focus on automation (HD)
1:36:02
Cody Konior
Рет қаралды 155 М.
Я купил первый в своей жизни VR! 🤯
1:00
S24 Ultra and IPhone 14 Pro Max telephoto shooting comparison #shorts
0:15
Photographer Army
Рет қаралды 9 МЛН
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 989 М.