AWS CodePipeline for Building a RESTful Web Service with T2 Micro Instances and Orchestration Tools

Build a Pipeline with AWS CodePipeline for a RESTful Web Service using T2 Micro Instances and Orchestration Tools like OpsWorks or CloudFormation.

Prev Question Next Question

Question

A developer is trying to get a new DevOps role and preparing for a technical task for the interview.

The requirement is that a simple pipeline should be built up within 1 week for a RESTful web service that contains several endpoints.

For the pipeline, he decides to use AWS CodePipeline.

For the application, he wants to use T2 Micro EC2 instances as they belong to free tier.

In order to show a breadth of skills, he would like to use certain orchestration tool such as OpsWorks or CloudFormation to deploy the App.

He has used Chef for some open source projects before.

What below option is the best for him to do in a short time?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

The best option for the developer to build a pipeline for a RESTful web service using AWS CodePipeline while demonstrating knowledge of orchestration tools such as OpsWorks or CloudFormation is option D:

D. For CodePipeline, configure an S3 bucket as the source provider and configure the OpsWorks as the deployment provider. Then OpsWorks can create stack/layers and deploy APPs using artifacts in S3.

This option provides a good balance between ease of setup, speed of deployment, and demonstration of a breadth of skills.

Here's how the developer can implement option D:

  1. Set up an S3 bucket: The developer can create an S3 bucket and upload the application artifacts (e.g., code, configuration files) to the bucket.

  2. Create a CodePipeline: The developer can create a CodePipeline and configure the source provider to use the S3 bucket as the source location for the pipeline.

  3. Configure the pipeline stages: The pipeline should have at least two stages: Build and Deploy.

  4. Configure the Build stage: In the Build stage, the developer can choose a build provider (e.g., AWS CodeBuild, Jenkins) to build the application. The build provider should output the built artifacts to the S3 bucket.

  5. Configure the Deploy stage: In the Deploy stage, the developer can choose OpsWorks as the deployment provider. OpsWorks can create the stack/layers and deploy the application using the artifacts from the S3 bucket.

OpsWorks is a configuration management service that uses Chef, an open-source configuration management tool. OpsWorks supports deploying applications to EC2 instances, ECS clusters, and Lambda functions. By using OpsWorks, the developer can demonstrate familiarity with configuration management tools.

Option A is incorrect because it suggests using OpsWorks to hook up CodePipeline in the build stage. This is not an optimal solution because CodePipeline already has built-in integration with many build providers, and the developer can choose a build provider that fits the application requirements.

Option B is incorrect because it suggests configuring an OpsWorks stack, layer, and instance before setting up the pipeline. This approach adds unnecessary complexity and requires the developer to configure OpsWorks separately from CodePipeline.

Option C is incorrect because it suggests using CloudFormation to build up EC2 instances with ELB and Autoscaling. While this is a valid approach, it requires more setup time and may not be necessary for a simple application that uses T2 Micro EC2 instances. Additionally, the question specifies that the developer should use an orchestration tool such as OpsWorks or CloudFormation to deploy the application, and CloudFormation does not qualify as an orchestration tool in this context.