if you want to succeed and get ahead the name of the game is adding value that
could be value to your customers or to your organization as a dev how do you add value
well it's probably in creating those new products and features that people want
or maybe you found a bug and now you can get that fixed as an ops person it's different we want
to make sure that the lights stay on we want to make sure that things are backed up and protected
and that all of the performance is what it should be those are all very different ways of adding
value and sometimes this can put the devs and ops against each other how can we prevent this
from happening the devops cycle is here to help i'm Dean Cefola and this is the azure academy
welcome to project awesome new thing a project commitments have been made to our business and
we're ready to ship in one month denny the dev will be our developer and guy the ops guy will
support us in production so denny how long will it take to write this magnificent new code yeah
no problem manny it should be like i don't know three weeks oh it's gonna be great man it's gonna
be great excuse me uh denny did you just say three weeks so we're only going to have one week to do
testing and get the code into production that is not gonna work because our testing cycle before
moving anything into prod is two weeks well i'm sorry guy but the business is already committed
to shipping in one month we'll just all have to tighten our belts and knuckle down and get
things done on time are you sure you need all those testing steps you are after all the expert
okay manny which of those testing procedures do you suggest we skip hey it don't bother me
my code is solid i tested it myself really denny and just where do you test your code on my laptop
or when it's already in pride man i test on the fly i'm sorry you test your code in production
why do we even have a testing environment what how long have we had a test environment that sounds
like a great idea dude are you kidding me nobody uses that test environment it's like 100 years old
it doesn't even match my specs or nothing we built the test and the prod environment at the same time
they were built identically and we maintain it so it's just like production
oops guess that's why you can't get my awesomeness code working in pride either man you don't know
how to build anything right i'm just gonna have to do it myself i'll build some servers and
you know it's gonna be awesome i don't even need you and just how are you gonna do that denny after
the last time you pushed your awesome code to the database while we were in the middle of doing
a san upgrade because you didn't follow change management we took your rights away i don't know
i'm gonna do what i got to do maybe i'll spin up a vm or two in aws or something
so if you did that denny you could build the code and test it totally man it's going to be awesome
this guy's just holding up the show no no that's even worse it won't look our environment on prem
or in the cloud it's not even your laptop hey man the world wants my awesome code and if you
won't work with me to get it done i'll just do it myself well this has been a tremendous meeting i
will let the business know that they can expect the product to ship on time in one month denny
will have three weeks to write all of that code and test it and then guy will have one week to get
the code into production that sounds reasonable great meeting everyone bye bye bye bye bye bye
wow that was rough but obviously it was just an exaggeration and hopefully you've never
been any one of those people in those meetings so we had three people here we had manny the manager
denny the dev and guy theops guy and all of them had their own priorities
manny only cared about the ship date on the calendar because that was his responsibility to
the business denny only cared about writing the code because that's his area of responsibility
and it didn't matter how that code got into production or how much time he gave anybody
else in the schedule and then the ops guys saw the entire thing as just a big inconvenience
and acted as a blocker to everything and didn't offer any real solutions in working together and
he's just annoyed because people don't follow all the processes that he's responsible for
and he thinks nobody else cares they're all working toward the same goal of getting this
awesome new thing into production making the customers happier making the business succeed
that's what their focus should be working together and this is where the devops cycle comes in now
have you ever seen this symbol that's the symbol for infinity it is a loop that never ends and just
keeps on going forever and ever and ever that's the devops cycle so let's do some of this magic
so here's the cycle plan code build test release deploy operate monitor and then it goes back
again so our first step is to plan everything begins with a plan you have to know the end from
the beginning if you want to succeed in the case of azure we're focused on infrastructure as code
but we still need to know what the point of what we're building is the next step is to code this
is where the dev would go out and actually build the code according to the plan to meet the goal
now in the case of infrastructure as code you ops people may end up actually filling the role of dev
because you may be building the infrastructure as code through our armed templates which we're going
to be working on in a few minutes so in the build phase we're taking that code we want to create
something called an mvp this is a minimal viable product so this may be like building a car
like that one when you're building a car and you want an mvp of a car this could be
the engine the frames and the wheels you don't need paint you don't need windows and you don't
need spinning rims all that comes later those are features and the next step in the process is
to test this is where we're going to test that mvp does it do what we think it does so in the release
this is where you're doing code promotion from environment to environment and make sure that they
have the processes the rights and that everything works as expected before handing it off to ops
or this could be where you hand off to ops and they're going to do that test in the non-prod
environment before it gets pushed into production to make sure that everything works as you've told
them it should and then we come to deploy and this is definitely an ops role this is where we're
pushing the code into production everything that they have delivered should just work if it doesn't
something was missed in a prior step so now that we've got the code in production it needs to run
it needs to be operated and this is where the code lives in that production environment and we want
to be sure that it is doing what it's supposed to do so how do we do that that's the next step which
is to monitor in monitoring we want to check its performance is it eating up too much resources and
it's not working as advertised you want to be sure that it's got the right amount of uptime downtime
patch management security all of that stuff we want it to be monitored and verify that it's
working as it should if not then we can introduce those things as issues into the plan phase and
then we repeat the cycle all over again everyone has to work together and if the ops people don't
succeed the devs don't either and maybe you've heard it said before that if the dev has to carry
the pager they're going to write better code 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
hey y'all welcome back to denny's master class and arm templates today we're covering two things
the arm vs code extension and parameters so over on the top left we're gonna click to
add a new folder we're gonna build ourselves a workspace we're gonna name that devops and then
we're going to click and add a new file and this is going to be called azure deploy.json
and in there we're going to type arm and then you're going to get this box and we're going to
click on the very first one arm at the exclamation point and now we've got our arm outline all set up
without having to type anything else it's awesome let's go over here on the left to the
resources and click a plus and then in the box at the top we're going to type virtual network
and then boom there's virtual network code all done for you without you having to know nothing
all right so let's go up to the top to the terminal we're going to do a deployment but first
we got to sign in to azure which last time we did with the connect az account we still need that
but i want to automate it so we're going to do this instead we're going to do a get credentials
command from powershell pass it our username give it our password we're going to sign in
automatically and don't be trying to steal my password so now let's run the connect az account
pass it our creds we are signed in to azure and ready to go so let's type our deployment command
new az resource group deployment give it a name give it our template file and then hit enter and
as soon as we do it's going to build that template and we're going to go up to azure and check it out
and there it is all done boom arm code is awesome now we want to make this a little more interesting
so let's go back and add a parameter so we're going to go to the parameters section and put
in the double quotes and when we do it's going to prompt us to add a new parameter and you do and
then it's going to fill all that information for you but you still have to give it a special name
so we're going to call that virtual network name which means we have to replace our virtual
network's existing name with a parameter so we're going to go down and we're going to type in
the square bracket just like that and then we're going to get a whole list of functions and there's
a whole lot of them we'll come back to all that later right now we just want parameters which is a
function then we give it the parentheses and then it's going to ask us to select which parameter we
want to use and we want our virtual network name and now that we got our virtual network name let's
do another deployment all right and then we go and run that deployment again this time it's
going to prompt us to enter a virtual network name and we're gonna go type typey on that and then
we're gonna do the deployment it's up in azure so let's go check it out we go to the deployment
again click on devops and then there it is we go to inputs there is our parameter which also means
that we now have a parameters file that we can get out of the azure portal so let's click over there
and do some of that copy that go back to vs code now we're going to make a new file and this is
going to be azure deploy parameter and then paste all the code now this is just a json file this is
not working yet with the arm extensions that are here so we want to change our language over in
the corner and then we'll click on the box up top change that to azure resource manager template and
now we want to link the two together so we'll go back to our template click where it says to select
the parameters file and that gives you a drop down box pick your parameters file and now they are
linked together which you can tell because it has filled in the name of our virtual network so let's
create another parameter between all the different parameters we need a comma and then we'll do the
same thing we'll put it into quotes select our new parameter give it a name and this one is going to
be for a subnet so we'll just rename this to be subnet name dash one which means we got to go down
to the subnet section find that thing and then do the square bracket type in parameter give it the
parentheses select the subnet one parameter and we are good to go so let's do another deployment
we'll go back to the terminal set it all up again to run the same thing but this time we are going
to add dash template parameter file and give it our azure deploy.parameter.json file hit enter but
look it did not ask us for a virtual network name why because it's in the parameters file man so now
we'll type in the name of the subnet do the deployment go back to azure and there it is and
we have another input which means we can capture that from the parameters file and do the same
thing we just did let's write a parameter directly and we'll type it in this time new parameter
into quotes subnet name dash two and then look at that now let's set it all up so we can do a value
and that's gonna be what the parameter equals and we get rid of them comments because we don't need
that don't hurt nothing but we just don't need it then we'll go back and do another deployment
and then there it is now we got three parameters and you just keep doing this all day long replace
everything you want with parameters and then that'll make it all kind of easy to to make this
template do something and then deploy it again and you get a whole nother something else so that's
parameters and that's some of the things about working with the arm templates and i know it went
kind of fast with all that but you know i expect you guys to be sharp man i mean you're trying
to be in the dev world now so you know keep up oh thanks denny subtle as always appreciate that and
if you've been appreciating our content please do click on that subscribe button down below i have
it on good authority that if you don't do that that somebody somewhere will duct tape a small
puppy to a small kitten and then they'll just run in circles with each other until they both pass
out from exhaustion and you don't want that to happen save a puppy or a kitten today as well as
click the thumbs up if you've been enjoying this series on devops these skits don't make themselves
so i need comments from you on what you want to see in an upcoming video that always helps me out
and if you want to keep the learning going over on the top we've got our latest video and
at the bottom one from the overlords at youtube and you definitely don't want to miss those
thanks for joining us for today's video and we will see you in the next one happy learning