In this video, you’ll see how to create a continuous deployment pipeline using AWS
Service Catalog products for CodePipeline and Elastic Beanstalk.
With this solution, you can leverage reference architecture from GitHub to easily set up a continuous
integration and deployment (CI/CD) pipeline that integrates with your .NET application.
We’ll begin from the GitHub repository that contains the AWS Service Catalog
reference architecture for the CI/CD pipeline.
This diagram gives a quick overview of the reference architecture.
To install the reference architecture in your account, visit this page and click
Launch Stack.
A wizard will guide you through some setup steps.
For demonstration purposes, we have already launched the stack and set
it up in our AWS account.
Let’s take a look.
The reference architecture created a portfolio with the Service Catalog products needed to deploy the pipeline.
It also provisioned an AWS Cloud9 IDE product, as well as an Identity and Access Management (IAM)
group and role for Service Catalog end users.
Users assigned to this role or group automatically have permission to deploy the products in this portfolio.
Let’s launch the Elastic Beanstalk CodePipeline project.
We can launch either a Windows or Linux product version.
We’ll name our .NET application and launch the product.
Next, we’ll deploy the Cloud9 IDE instance so we can edit code and
push changes to the CodeCommit repository.
Users can, of course, choose to configure their own local development environment for this purpose.
Let’s obtain the Git repository URL so we can associate the repository with the development environment.
Copy the URL.
Launch the Cloud9 development environment.
Now paste the URL we just copied to specify the linked Git repo path.
Let’s also specify where in the Git repository folder our project code will live.
Let's skip ahead to when the Cloud9 environment has fully deployed and open it.
For the purposes of this example,
the folder associated with our repository is already populated with a sample ASP.NET project.
Let’s push it to CodeCommit to begin the CodePipeline execution.
Next, let’s check to make sure the CodePipeline execution triggered.
As you can see, the pipeline has begun execution and is now pulling the code
from our CodeCommit repository.
Let’s skip ahead a few minutes.
The source pull and build stages have successfully completed,
but the deployment step failed.
Let’s look at the details.
The deployment step failed because we haven’t yet deployed the Elastic
Beanstalk application environment where our .NET web application will be running.
In order to deploy Elastic Beanstalk, we’ll need the location of the Amazon
Simple Storage Service (Amazon S3) bucket that was generated by the CodePipeline product.
Let’s copy it and return to Service Catalog.
Launch the Elastic Beanstalk product.
In the code source parameters, paste the name of the S3 bucket.
Cut the name of the application bundle from the string and paste it in the next field.
Next, we’ll provide the information needed for Elastic Beanstalk to create
the application associated with our project code.
We’ll need the name of the solution stack that supports our application deployment
runtime configuration.
We can find that information in the AWS Documentation.
For our purposes, we’ll copy the solution stack name for Windows Server Core 2019.
Paste the solution stack name into the field.
Launch the product.
Now, let’s ensure the application has successfully deployed.
We can use the LoadBalancerURL to access the application website.
The application successfully deployed.
Next, let’s test that this Elastic Beanstalk application has been properly configured in
our CodePipeline.
To do so, we’ll modify the project code and push our changes to CodeCommit, which will trigger
the pipeline to redeploy.
Let’s change the index page heading to “Hello CodePipeline!”
Now let’s push the change.
Returning to CodePipeline,
we can see that our push to the CodeCommit repository triggered a pipeline execution.
As you can see, the “Update-Beanstalk” action
successfully executed in the Deploy step of the pipeline.
Let’s return to the application website to see the deployed change.
The page now shows the new headline.
You’ve just seen how to how to create a continuous deployment pipeline using AWS Service Catalog
products for CodePipeline and Elastic Beanstalk.
Thanks for watching. Now it's your turn to try.