Photo by Alvaro Reyes on Unsplash

There is an article on how to implementing CI/CD for Containers on AWS using ECS and CodePipeline. But my experience is slightly different. We have a Jenkins setup on our own private datacenter and it has been used by the company for a long time not just for AWS but for other usage like Android build. Hence there is little desire to use AWS CodePipeline. Allow me to show you how to use Jenkins instead of CodePipeline to deliver your containers.

Let’s get started

Pre-requisites:

A. Your source code including taskdef.json, Dockerfile, Jenkinsfile, appspec.yml in the root folder.

B. You are running ECS…


Great article. I think this article will highlight how edge computing will make a big impact


Photo by Austrian National Library on Unsplash

Sometimes BDD testing requires a database, as it requires some form of data input to form a situation for certain behaviour. Many BDD tools like CakePHP or Ruby on Rails allow programmers to inject fixture test data into the database and run your tests.

I have a situation where I need not only mysql but also redis to run the BDD, and I need to automate it in the Jenkins Pipeline so that every time there is a PR, it gets tested for quality before being allowed to merge into master/main branch.

Hence I have this stage which I have…


The above image is a very common joke on NodeJS. But fret not there are already several documentations on how to reduce the size of the node modules. I just want to share the experience that I have reducing the size of the docker image.

The above is the file before the reduction

the above is after the reduction and the below is the effect of the reduction


Photo by James Wainscoat on Unsplash

I used to have a repository that contains python code that run locust.io on EC2 based on fabric. What it does is it installs locust.io on the EC2 instance and then pushes the locustfile.py to the instance and runs it. The problem is EC2 can be a pain to use and there isn’t any load balancing and scaling.

Hence I look around and found some GitHub repository that I can use locust on Kubernetes. The problem is you have to use his image and usually isn’t the latest version of locust. Hence I decided to come up with my version…


Photo by Florian Wächter on Unsplash

How often do you update your AWS task definition in your code pipeline? Most often than not you leave it alone. Why? Because you just use the latest ECR image tag for dev environment. And seldom you need to roll back. Fix a bug? Just push the code to the relevant branch and it gets build in Code Build and then it gets released in Code Deploy.

What about those environment variables? How often do you change them? From my experience, once the product development settled down you hardly

But what if you need a roll back, what if you…


Photo by Emile Perron on Unsplash

One of the best things about cloudformation is that it allows you to build cloud infrastructure in AWS at the snap of your fingers amount to tens of thousands of capital expenses. Cloudformation also allows you to build cloud infrastructure with security in mind.

For example, they allow security group ingress. Below is a sample code

# Update security groups to allow traffic RedisSecurityGroupIngressFromEcsSecurityGroup: Type: AWS::EC2::SecurityGroupIngress Properties: Description: Ingress from the Redis to ECS GroupId: Fn::ImportValue: !Sub "${StackName}:RedisSecurityGroup" IpProtocol: tcp FromPort: 6379 ToPort: 6379 SourceSecurityGroupId: !Ref 'WebSG' MySqlSecurityGroupIngressFromEcsSecurityGroup: Type: AWS::EC2::SecurityGroupIngress Properties: Description: Ingress from the MySQL to ECS GroupId: Fn::ImportValue…

I have a setup where I use Jenkins as a CI tool to build and test docker image and then push it to ECR and deploy to ECS service using Code Deploy Blue Green.

The problem is I cannot use Jenkins’ office365ConnectorSend to announce to the developers that the ECS has been deployed. It is because Jenkins runs the AWS deploy command line and running the command line doesn’t mean the new services is deployed immediately. Those familiar with code deploys know that blue-green deployment takes a while, so the HTTP call has to come from AWS SNS/Lambda which is…


Photo by Chris Ried on Unsplash

How do you usually set up your AWS in different environments? let’s say you are given an account and all your dev/staging/production needs to be in the same account.

What you usually do is to have 3 VPCs to segregate the environment differences. And let’s say you want to do it using cloud formation. So how do you template it to make sure you have the optimal use of the template?

Usually we all start off by putting all the resources under one single template. …


Me showing the difference between docker and virtual machine

Containerization has been one of the most talk about topics in the digital world. It enabled a whole new paradigm shift in getting software to run reliability when moving from one environment to another.

I have the privilege to run 2 docker workshops in SPH as I managed to set up docker running zaobao.com locally on my PC. It has been an amazing experience.

The first docker workshop was held on 19th October 2018, with 23 people attending. We went through what is containerization and its difference with virtual machines. Then we have exercises on docker command, docker-compose.yml and set…

Moses Liao GZ

Cloud and site reliability enthusiasts. AWS SA Associate certified

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store