hello everybody my name is Lawton and
I'm a Solutions Architect for AWS I'm
part of our partners team and today I'm
going to be talking to you about CDC
iPad plans for dotnet applications in
code pipeline
I've been a.net developer for most 17
years and called pipeline niwa both my
platforms of choice so first thing I
want to actually get your attention to
the dotnet core chat bot that we have
recently published please go ahead and
and check it out the URL is right in the
middle it takes advantage of services
such as Amazon lakhs which is all access
service AWS lambda Amazon could need to
identity and it also shows you how to
use it in a context of code commit which
is a gate repository or github and then
also code build and code deploy in a
context of code pipeline which
incidentally is the topic of today's
talk so running AWS toolkit for visual
studio one of the things that I was
really most impressed by was the level
of integration the work amount of work
that we've done you know in AWS toolkit
specifically for visual studio you will
be able to create different profiles for
itself you will be able to choose
whichever region you need to use and you
will have easy access to all of the AWS
services what do you need to configure
them or take advantage of them in your
dotnet applications we also have many
different templates that you may use to
take advantage of our services what are
you taking advantage of services such as
SNS sqs step functions lambda and so on
or whether you taking advantage of
managed relational database services in
sequel or dynamodb as are no sequel
offering so what is code pipeline
basically code pipeline has been an
orchestration tool that we used
internally here at Amazon and and a lot
of our customers have seen it and they
liked it so much that they said hey we
should really make this available for
everybody to use it's such a great
service so that's what we did we made it
available and and right now it actually
provides orchestration not just between
us code services but also a laundry list
of third-party tools and services out
there so here you can see we can use our
services is just code commit but you can
also use github or other services like
the STS and TFS which integrate via our
s3 service we can also take advantage of
code bill for both building of our code
as well as testing of the code itself or
we can use many out of third-party
services that are available and last but
not least code deploy which can be used
to actually deploy a dotnet application
source code or built application and and
built package over to our test QA and
even production environments and now I'm
going to show you how to build entire
infrastructure for a table is called
pipeline from beginning to the end as
well as configure each step within code
pipeline and each of the services needed
to run within code pipeline to deploy
your application to a target environment
so first thing I'm going to show you is
how to deploy the entire infrastructure
behind it for running AWS code pipeline
a lot of these things can be also
manually created but we have something
called cloud formation infrastructure as
a code so if you actually go here which
is our AWS labs github repository you'll
find AWS lacs
dotnet chatbot and in here you'll find
CloudFormation template that I'll be
using today to build this art completely
and I will show you what the
confirmation template built out also
honorable mention I mentioned early on
please go ahead and check out
introduction how to build a dotnet bot
it's gonna actually take you through how
this dotnet bot has been built from the
very beginning so I'm going to choose
the CloudFormation template which is in
llamo or it could be any mo or Jason and
and here I can actually give any stack
name to it it can be test video project
ID can be chat bot application can be
chat bot app and and these are the
things that are generally used for the
services to identify the project that
you're working on a specific application
so over here we're gonna be using github
repository to actually go ahead and get
this get these things out of github we
could be also using code commit but I
want to you know a lot of people are
familiar with github and you're probably
already using it so I want to use this
for the demo itself so you need to put
in your owner then your token and the
github repo and and where do you get the
token you might ask if you have not used
github before so I suggest you actually
go over here so I can show you if on my
profile if I'm to actually go under
rather the settings of the profile
itself and under settings if I go to
developer settings and then I look at
personal access tokens I can then
generate a new token but here I'm going
to edit the existing token that I'm
using right now and you'll see the type
of rights that you need to give to your
repo so it's all everything on the repo
and everything
under ednan repo hook some of you might
ask
hey it's lesson but how did you actually
get to this get to have the code in your
repository to begin with
well I cloned it directly from here so I
actually cloned this entire code that we
have under AWS lacks Nats at bot and you
can do that yourself so to go forward
we're going to select the instance type
key pair name subnet ID where we want
this deployed and and the VPC where we
want this deployed and and then we're
going to click Next we don't have to
choose anything here we can put down
tags or anything and then we're going to
click Next
if we if we satisfied with all of these
aspects which we are we're going to
click here we acknowledge the
CloudFormation might create I am
resources and then it's because it will
create specific permissions that code
pipeline needs in order to execute we
will go ahead and click on create once
this is created once this is created
this is kind of what it looks like you
you will see that they create is
complete you will see each of the events
for each of the resources that has been
created you will see each of the
resources that is being created over
here and a link to those resources so
everything from law roles to policies
that it means to deployment groups
artifacts and so on and and if we go
ahead and look at what the output is the
output is the the actual ec2 instance to
which the code got deployed we can go
ahead and click and you'll see this is
the chat bot that we talked about and I
can say I want to order flowers and chat
but should be talking to me yep and he
says what would you like with what type
of flower would I like to order I'll say
until I went to order roses and what
they would I like the roses to be picked
up and I guess Tuesday is a good day for
me somehow choose they always falls on
the Valentine's so what time I can say 2
p.m. and here we go there's a
confirmation of the purchase of the
roses through the chat bot they'll say
yes thanks I've just ordered it so how
did this happen so we went from creating
this entire infrastructure specifying
where the source code is down to the
actual application showing up and
running in AWS so what what is the
mechanism behind it so if we go back
here if we go here to services we go to
code pipeline and we open up the the
code pipeline that we used will say that
there's a three-step process here's the
github the code build that goes and
builds the code and then the code
deployed that those have had and dip
deploys it over so if we actually click
through into any of these it will take
us to the actual github here if we click
through on on the code build it will
show us the actual code build that
happened how it succeeded if it did not
succeed it would actually have links to
the lobs explaining and outline that
showing us the error or what did not
succeed and why and same goes for the
actual code deploy itself here we can
see what application details are as well
as our fleet details and your auto
scanning groups we may be using
deployment configuration which is one at
a time in this particular case and
obviously the status of the deployment
here we can actually see each of the
revisions for for what was deployed and
we can actually go back to previous
revisions if something went wrong with
this one
we're not happy with it for whatever
reason we need we wanted to redeploy the
previous one it's also important to know
that this does Bluegreen deployments
which actually creates a complete
replica of your environment deploys the
code over they test the code out and if
it's successful it drains the connection
from the existing service and then go
and and switches over to using the newly
created service we tested code on them
that is that is one of the most
efficient and possibly the safest ways
as well of deploying it deploying
generally code in the cloud so if we go
back to the cold pipeline if we say hey
we want to add this guy over let's see
what we got here so we have different
different stages and we can add
additional stages over here
we can give it a name it doesn't have to
have be specific so we're going to
delete this one but we're going to add
it what can we do within the stage and
you as you can see you can have actions
that either can come before or after or
at the same time as this action here of
actually taking the code out of the it
hub we can look at what other actions we
can eat we can use and you can see that
we have different types of categories
for these actions so they all start from
source and then you have different
source providers here we have s3 code
commit and github although s3 is a
storage service a lot of other services
looked like TFS and VST s actually use
it in order to create integration for
deploying code into AWS there's build we
do have a code build that I just showed
you but we also have things like Jenkins
in Solano and that we can use which is
third-party products for testing the
same thing we can use code build once
again but we can also use Jenkins Lotus
blaze me to ghost inspector run scope HP
and so many others for deployment the
same we can use
ECS which is a container service we can
use confirmation to deploy
infrastructure remember infrastructure
as a code but I just showed you code
deploy which is what we're using an
elastic beasto which is another way of
also deploying dotnet applications
energy to look at a video like this one
that explains that in in more detail as
well you can also put in actual
approvals from specific manual Brewers
from specific people and you can also
invoke things like lambda and lambda is
great because that's our service code we
just write the code
I run service Li and in allows us to to
create any additional actions that you
may may be missing from the code
pipeline itself and like that you can
actually build out each of these stages
add actions to the stages there's no
limited to the actions ordered to the
amount of stages and how you want them
to run and once that is done they will
they will automatically kind of pass the
code and builds from one another and go
ahead and deploy your application all
the way through thank you very much for
tuning in
[Music]