1. 程式人生 > >Pipelines For Container Applications Made Easy with mu

Pipelines For Container Applications Made Easy with mu

Amazon Elastic Container Service (ECS) is a great way to deploy containerized microservices. mu is an open source tool from Stelligent that makes it easier for developers to get started with microservices on ECS, by simplifying the declaration and administration of the AWS resources required for the ECS cluster, using a CLI. In addition, it creates a deployment pipeline using

AWS CodeBuild and AWS CodePipeline. In this guest post, Casey Lee of Stelligent explains how you can easily create such a pipeline using mu.
Arun

Amazon Elastic Container Service makes it possible to run container workloads at scale. Additionally, developers can leverage services such as AWS CodeBuild and AWS CodePipeline for orchestrating the build and deployment of their container applications. All the building blocks are available to create continuous delivery pipelines that quickly and consistently deliver value to users. However, there is a significant learning curve for developers to efficiently and effectively configure all these different AWS services to work together.

In this post, we’ll be looking at mu, an open source tool that simplifies the declaration and administration of the AWS resources necessary to create continuous delivery pipelines for container workloads. It codifies best practices as opinionated default configuration, making it possible to set up a robust pipeline for your application in a matter of minutes. Let’s jump right in and see it in action.

mu manages three primary components:

  • Environments – an environment includes the network (VPC) and cluster of hosts (ECS container instances) necessary to run containers. The environments include the ability to automatically scale out or scale in based on resource requirements across all the microservices that are deployed to it. Many environments can exist (e.g. development, staging, production).
  • Services – a container application that will be deployed to a given environment (or environments) as a set of containers.
  • Pipeline – a continuous delivery pipeline that will manage the building, testing, and deploying of a service in the various environments.   

See mu in Action

For the purposes of demonstration, we will be using a simple NGINX application. The source for the application is available at https://github.com/cplee/hello-nginx and consists of the following Dockerfile:

FROM nginx:stable-alpine

COPY health /usr/share/nginx/html/health

The mu.yml file contains a minimal configuration necessary to create:

###

# Define 2 environments

###

environments:

- name: acceptance

- name: production

###

# Configure the service with a route for paths /*

# from the ALB to port 80 in the container

###

service:

port: 80

pathPatterns:

- /*

Installation consists of simply downloading the compiled mu binary and adding it to your path:

curl -s https://getmu.io/install.sh | sh

The pipeline is created by running the following command. It will prompt you for a GitHub personal access token that CodePipeline requires to configure the commit hook.

mu pipeline up

Once the pipeline has been created, you can monitor the pipeline progress with mu:

You can also monitor the CloudWatch logs output from the CodeBuild project via mu:

The CloudWatch logs for the ECS service can be viewed via mu to monitor the application:

Details about the ECS cluster are viewable via mu. Additionally, you can determine the URL of the ELB to then test the application:

Why Open Source?

At Stelligent, we help our customers build continuous delivery pipelines on AWS. One of our core values is sharing. We want to be open with our customers and give them access to the tools we use on our engagements with them. By open sourcing mu, we are able to empower our customers to have a sense of ownership of the tool we are using in their accounts.

Another goal with creating and open sourcing mu was to share our learnings and opinions with the community on how best to implement these pipelines. Our hope is for the community to use the tool and evolve it based on their use cases and to provide feedback on even better ways to approach the problems we are trying to solve.

One last point about the open nature of mu: a guiding principle in the development of mu was to provide a lightweight means to configure AWS resources. The effect is that mu creates resources in AWS and then gets out of the way. You can keep using it after the pipeline is created, or abandon it and use traditional AWS tools (console or cli). The diagram below demonstrates how mu works by reading in a mu.yml and generating opinionated CloudFormation templates that are run in the AWS account:

Contribute to mu!

If you have an interest in continuous delivery pipelines for container workloads, we need your help! Here’s how:

  • Try it out – Visit the quickstart on the mu wiki to download and install the tool. You can also follow a brief tutorial to create your first service.
  • Share your feedback – Ask questions and let us know what you think by chatting with us on in our Gitter room. Also, don’t hesitate to create a new issue with any feature requests.
  • Submit a pull request – Pull requests always welcome! Visit the contributing guide for more details.

Casey Lee is the Chief Architect at Stelligent – a Premier Consulting Partner with the DevOps Competency that has been implementing Continuous Delivery solutions on AWS since 2009. He is an AWS Certified DevOps Engineer – Professional and Solution Architect – Professional.  He has spent the past 20 years architecting, implementing, and supporting software systems for organizations ranging from startups to Fortune 500 enterprises.

The content and opinions in this post are those of the third-party author and AWS is not responsible for the content or accuracy of this post.

相關推薦

Pipelines For Container Applications Made Easy with mu

Amazon Elastic Container Service (ECS) is a great way to deploy containerized microservices. mu is an open source tool from Stelligent th

Accessibility Made Easy with Angular CDK

Keyboard focus and navigation are essential when developing for the accessible web. Many users rely on a keyboard when they surf the web.If a user doesn’t

Authentication Made Easy with Auth0: Part 1

Authentication Made Easy with Auth0: Part 1Through example, we will demonstrate how to use Auth0 to secure a Node.js (Express) API that is accessed by a si

ES6 development environment made easy with babel, gulp and webpack!

ES6 development environment made easy with babel, gulp and webpack!Hello, everyone!Yes, I know, this is yet another tutorial, aiming to incorporate the buz

Fleet Management Made Easy with Auto Scaling

If your application runs on Amazon EC2 instances, then you have what’s referred to as a ‘fleet’. This is true even if your fleet is just a single

[CVPR2015] Is object localization for free? – Weakly-supervised learning with convolutional neural networks論文筆記

sed pooling was 技術分享 sco 評測 5.0 ict highest p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px "Helvetica Neue"; color: #323333 } p.p2

【USE】《An End-to-End System for Automatic Urinary Particle Recognition with CNN》

Urine Sediment Examination(USE) JMOS-2018 目錄 目錄 1 Background and Motivation 2 Innovation

Fear the REAPER A System for Automatic Multi-Document Summarization with Reinforcement Learning

Cody Rioux, Sadid A. Hasan, Yllias Chali ##Abstract Achieve the largest coverage of the docu ments content.目標的覆蓋整個文件的內容 Concentrate dis

REST easy with kbmMW #16 – Multiple servers using HTTP.sys transport

前文寫過使用HTTP.sys轉輸層(TkbmMWHTTPSysServerTransport),實現一個kbmMW應用伺服器。 如果在一臺伺服器上,同時執行多個,基於TkbmMWHTTPSysServerTransport實現的kbmMW應用伺服器,該怎麼配置呢? 通常會遇到這樣的錯誤資訊,如:“Unab

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.Nu

java.lang.NullPointerException: null    at com.book.app.web.UserController.findPageWith(UserController.java:50) ~[classes/:na]   &

REST easy with kbmMW #17 – Database 6 – Existing databases

kbmMW已經包含了非常精細的功能來確定和解釋資料庫中表的元資料。 在下一版本中,這個功能將得到進一步加強,可以匯入現有資料庫中的表並自動建立與表相匹配的ORM類。 這意味著你能夠使用kbmMW的ORM智慧來查詢表,將資料儲存回表並操縱表元資料,例如新增,更改或刪除欄位和索引以及需要能夠升級資料庫用於匹配

一週一論文(翻譯 總結)—— [SOSP 18] LITE Kernel RDMA Support for Datacenter Applications : 一個LITE 核心支援的RDMA通訊庫

目錄 Abstract 1. Introduction 2. BACKGROUND AND ISSUES OF RDMA 2.1 Background on RDMA 2.2 RDMA in DataCenter Applications 2.3 Issue 1: Misma

Chapter 5 : More about Variables - Note for BEGINNING C#7 Programming with Visual Studio 2017.pdf

implicit conversion The implicit conversion rule for these types is this: Any type A whose range of possible values completely fits inside the ran

chapter 4 : Flow Control - Note for BEGINNING C#7 Programming with Visual Studio 2017.pdf

Boolean Assignment Operators OPERATOR CATEGORY EXAMPLE EXPRESSION RESULT &= Binary

Chapter2 Visual Studio-Note for BEGINNING C# 7 Programming with Visual Stud

visual studio 重新設定開發環境 工具->獲取工具和功能(T)… 獲取工具和功能(語言包中包括中文簡體、英文等) reset the settings to Visual C#,Visual C++,Web development…

Chapter 1 Introduction C#-Note for BEGINNING C# 7 Programming with Visual Studio 2017

Devlopment Enviroment C# 7 .NET 4.7 Visual Studio Community 2017 SQL Server Express What the .NET Framework is ? The .NE

品優購Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request proc異常

報錯 嚴重: Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request processing failed; nested exception is java.la

Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.and

                               使用環境:        剛剛為了一個新的功能,打算做個demo試試,結果剛建立了一個功能就這樣了。 Error:Execution failed for task ':app:preDebugAndro

How can I use different pipelines for different spiders in a single Scrapy project

2012-11-28 Hi vitsin, You can’t override settings like this in your spiders like your code does: class FirstSpide

Forging a New Path for Disabled Design: An Interview with Liz Jackson

Thanks for sitting down with us today, Liz. To kick things off, can you tell us a little bit about your background and how you got to where you are today?O