thanks for joining us again at the azure academy you have been
asking for it and we are doing it devops right now
i'm Dean Cefola and this is the azure academy if you want to master the azure cloud you can start
right now by clicking the subscribe button and the notification bell so you don't miss anything
so i am super excited about this devops series but i gotta get two things out of the way first number
one is my perspective most material out there about devops is from a developer's perspective
not an ops person i'm ops the second thing that i want you to keep in mind is that you should
be an active participant in this series we're going to set up our environment today and get
ready for the rest of this series and you should build your environment as well so maybe you want
to watch this video all the way through so you know what's going on and then watch it again
go back and actually download things and build your environment like i'm doing it so with that
let's take a quick minute and think about why we need devops as operations hey is it my turn Denny
i'm still doing the intro come on my grandma's script could have been done by now yeah i know
i know but you have to be patient everyone's not at your level yeah you know but i got customers
we're waiting for updates let's go already hey remember what we talked about hey we're here to
help everybody out so we can get more done and do more together remember teamwork fine just hurry up
get a cool review in 10 minutes we're doing our best here thanks thanks Denny sorry about that
really is a great guy he's got a lot going on so where was i devops devops is a mindset
and a tool set mindset first though because you have to change how you think this is not just
about tools like you know azure devops and github this is about a philosophy of i.t so let's set the
stage here so we have our dev and our devs love change they love making new products and features
and bug fixes and updates and rolling out all that code and then we have our ops guys and the
ops guys eat change because we know change is the enemy things break it's because something changed
we have to take care of all of the infrastructure old and new patching maintenance backups all of
that stuff and so a ops person likes a very stable environment but a dev always wants to introduce
change now what do we have going for us in common tools that starts out at the bottom with things
like bash and powershell then you work your way up to some code management tools or automation
tools like azure automation that we've talked about before and infrastructure as code that's
what we're going to spend the majority of our time talking about since this is focused on the cloud
and then at the very top we have github and azure devops which help to manage all of that code and
the life cycle of that code through the process so common scenario that i'm sure everybody is
familiar with on the op side is we have our devs behind the ethereal wall and they throw the code
over the wall and we ops people have to catch that code put it in there and then we have problems
which results in the blame game you people and you didn't do right and your environment isn't like
it should be and it doesn't match production and and then the devs have similar complaints you know
you guys didn't do it right you don't have the right tool set or you know all this useless stuff
so let's go back to our scenario of our dev and our ops person the way that we can come together
in devops and this is the key automate everything our code testing and code promotion should be
automated on the dev side and on the ops side we want to have infrastructure as code management as
code which then gives us collectively identical environments identical configurations and most
importantly identical strategies to approaching it and rolling out products and updates etc so that's
the whole key of devops working together based on a similar tool set with similar priorities that
then means that our customer or our management of our company are both very happy because we can all
do more together and this eliminates things like shadow ops and you know where the devs are trying
to do operations things which means they're not spending more time writing code so it makes it
better on all sides all right so here we go we've got a vm that's set up in azure and we're gonna
rdp into that vm and we're gonna set up vs code which you may not be familiar with but this is the
tool for making all of your infrastructure as code so we're gonna go and download that from the vs
code website and then once we get that downloaded we're going to do the standard installation
which is just going to come up with this dialog box that's up here you just want to hit ok that
means we're going to set it up for all users who log on to machine no problem and we're just going
to do the default installation with the clickety click because you know you guys don't do the
keyboard that well yet we're going to fix that so we're going to do the regular install and
then look that's see see how fast that was that's already done it's great right i love vs code then
we're going to run it for the first time and it shows up in glorious dark mode let me give you a
little bit of navigation and that's going to start up top with the file and folders section this is
where you can have your organizing your structure your files and you can create all your folders and
you can make all that right here and create your own little workspace and that's all good next to
that is search and there's also find and replace which we'll get to using and then there's git
which is your source control that's my favorite area we'll get into that later and then there's
debugging which is great but you won't need too much of that right now and then there's extensions
and this is where the real cool stuff is because in extensions this is where we can add other stuff
like your browser extensions that all kind of thing makes it do all kinds of stuff and here
if we search for arm you will find that there are a whole bunch of extensions for arm and for azure
and you want to get the azure resource manager arm tools this is going to add color coding it's going
to add intellisense it's going to add a actual language of arm into vs code so it knows exactly
what we're typing and can help us get the job done so you're gonna want that for sure and then
there's also powershell because in powershell this is how we're gonna deploy all those arm templates
you're definitely gonna want that okay so now that we've got it all installed here's what we're going
to do we're going to set up powershell in vs code so first we're going to find our module this is
the az powershell modules and that's so that you can talk to azure and do everything you have to do
so we're going to run find dash module space dash name a z and then we're going to pipe
that over to install module and then we're going to throw in some other switches there so it just
happens even if you have it already that way you get all the latest just run that that'll take just
a couple minutes wait what's going on why is it going dark all right well that was weird i guess
we're done okay cool so let's move on all right so we're going to type in cls and we're going to
clear the screen and now type get dash module and notice there are no powershell modules for azure
but that's okay because this will load as we need them but just so you can see
what it looks like and everything we just did i'm going to do import dash module and give it the az
and then that'll import everything which will take a couple minutes so don't worry about that
i'm just showing you this here and then you go and look look at all them there's all the modules
now that's all you got from that one command see that's that's cool that's automation you didn't
have to download all them by yourself it's great all right so let's clear the screen again and now
let's go back to business so the next thing we have to do to talk to azure we have to connect so
that's going to be connect dash easy account and then you just hit enter there's other ways to do
this and automate it but we'll get into that later now so what happens sometimes in vs code is the
authentication window shows up in the background so i'm going to alt tab here there it is and
we'll just sign in now so don't don't peek at my password all right in just a minute we'll be all
authenticated and logged in and there you go all right we're ready to rock so first thing i like
to do just to make sure everything's working i'm in the right subscription and everything else is i
like to do get dash az resource group and that's going to show me just a list of all my resource
groups so i know i'm in the right place now we're ready to start talking about arm templates now
why arm templates this is important this is infrastructure as code now don't be scared because
this is written in json json this is the stuff you need to really kick the cloud into high gear
alright so we'll take it real slow and then we'll break up the rest of this all into little
small bite-sized videos so that you operations people can keep up all right okay so here we go
okay so let's open up our very first arm template here now notice that opens over on the side and
then we can just close the terminal right up there all right so now we got it all here now you got
the the template so let's talk about the format of the template so you can get your way around
and you know what's going on and all that so over here on the left we have the file explorer window
we're going to shrink that down and now we have the arm template outline this gives us all of that
framework for what's going on here in the template and we have at the very top we have the schema now
the schema tells arm and all of that what all is in here what are all the possibilities and
the apis and everything else that we can do and all the settings and all that good stuff so don't
worry too much about that but if vs code asks you to update the schema the answer should be yes all
right because they're all backwards compatible so you definitely want that that way you get all
the latest and greatest features okay then we have the content version content version has to do with
versioning your code you want to track it and know what changes go into what version this is
one of those devops practices that we do very well you guys need to pick up on and that way
we always know that if a version happened then we can go back to that version see who happened
what happened when it happened and get all that good information okay then after that we have
the parameters now you're familiar with this from powershell right the parameters are those
inputs they're the things that i want to do so i could have an input for like storage account name
and then when i build the template this time i'll give it one name when i build it the next time
i can give it another name and get another storage account without having to change my code at all
that is a parameter the next section is variables now variables are a little bit tricky okay this
is kind of like variables in powershell same kind of idea and this is where i can say something like
look here i want to have a unique id and then put some value behind it just like you would do
dollar unique id in powershell and then that equals something then we have our resources
now this is the thing that you're familiar with this is the thing i'm going to build
using this infrastructure and i'm declaring it all as code in this case it's a storage account
now resources have different values that are some required and some are optional and other
ones that are properties of those parameters so the one that's always going to be there
no matter what is going to be the type the name the api those are always going to be there and and
most of the time you'll have location that's a very important one but some of the other ones that
are here like tags that's optional it's always good should always have tags but they're optional
and then you have kind that relates to only storage accounts and then there's sku
which is storage account and a couple other things and that will have properties of its own like name
and tier and that'll be different based on the resource and we'll cover more of that
later then at the bottom here we have outputs now outputs just like in powershell right these
are the things that we're going to get after the whole thing is done we built our storage
account that's our only resource and then we're going to say the output of that is i want to know
what is the name of the storage account that you built because we built it using a unique string
thanks to our variable so i don't know what the name is going to be before it's built
all right so i want to know that information so that's going to be my output all right now that's
the structure let's do a quick deployment and then we'll wrap it up and we'll get back the other guy
so to do a deployment we're going to go up to the top to terminal and go to a new terminal that'll
open that power shell again then you can click this little cute arrow there and that'll full
screen a thing and that'll make it all convenient to do all the typey typey so let me just type out
the command here real quick okay and there's our command new az resource group deployment
with the name of test going to the arm templates resource group with our arm template file when
you hit enter because we have a parameter and we have not included a parameters file we have to
input the name of the storage account let me just type that quick all right so now we hit
enter and that's it we just wait and it's going to take our template file bring it up into azure
process it build our account give us our output have a nice day over to the azure portal oh boy
thanks denny okay so here we are in the azure portal we're going to go to our arm template
resource group and in there we have our storage account there's the name match
what we saw in visual studio code and if we go to the top to the deployments we can see
the deployment that was done all of the inputs outputs etc and the template
so you can click on the template and there you go that's exactly what we brought into the cloud
so this is just the beginning of our devops series and we do have a lot of things that
we want to cover so we're going to keep the videos bite-sized and you know we will have
Denny come back hey all right so it's been great you know i'd love meeting y'all and it's gonna be
fun we're gonna help you all become better Devs yeah but you know we're not trying to make ops
people into devs that's not what happens in devops you know we just want to use some of the same
skills well no man i mean you're working with code now i mean you're in dev that's just the way it is
you know get used to it thanks for joining us here at the azure academy for our series on devops you
can give us some comments down below on things that you're interested in so that we can make
this series as great for you as we can and this is starting small so we will build our way up
to azure devops and github for managing everything across the cloud yeah let me know if i'm coming on
too strong or nothing right you know i mean i just want to have fun and you know it's like it's gonna
be it'll be great it's gonna be awesome and if you want to keep on yeah so yeah they keep on learning
right i mean we're gonna have more in this series and it's gonna come fast they're gonna be small
videos to keep it interesting and and help you to learn little bits and yeah you're gonna love it
oh yeah yeah the other videos right so over over there that's like the latest one so you want to go
see that one and then like the other one down there you know maybe that would be like this
series or something or you know maybe something like that the overlords you know back at youtube
central maybe that's what they picked out so you know it'll be whatever that is i guess we'll see
you next time hey thanks for joining you know like and subscribe you know like and subscribe