Lambda continuous delivery using docker and Jenkins pipeline

Using AWS Lambda has become very popular. Most of the time using it is fast and just (but not always). When you start having a lot of lambda functions the complexity of managing them can be hard. When a developer can just edit the code inline, it can become the worse manage service use ever chose. So again, the most important thing to do when you start working with Lambda is to have a proper way to deliver the code from git to aws. ...

June 27, 2019 · 4 min · 703 words · Omer

The state of continuous integration using docker

Docker has become the preferable way and the most easy way to run continuous integration, due to its reproducible nature and fast learning curve. There are multiple ways approaching CI processes using docker. Using docker build, which is the easiest way FROM node:12 ARG NODE_ENV=production COPY . /src RUN npm install WORKDIR /src CMD [ "node", "app.js" ] Using docker multi step build, this usually helps making the final image smaller and safer without all the build binaries FROM maven AS Builder COPY . /src RUN [ "mvn" , "clean" , "install" ] FROM openjdk:12-alpine WORKDIR /srv COPY --from=Builder /src/target ./srv/ CMD [ "java", "-jar", "app.jar" ] Using docker run with a pre-built build image on a volume mount this allows having cache directories and have some more functionality during the build, and will allow multiple commands docker run -v `$pwd`:/src -v `~/.m2`:/root/.m2 maven mvn clean install Using docker in docker, like gitlab, bitbucket etc… This method is more complex than the rest and require you to mount docker socket to the as a volume to the docker container, and can be preformed in 2 ways: There is an official docker in docker image by docker inc that is tagged as docker:dind ...

June 2, 2019 · 5 min · 964 words · Omer

Accessing EKS API Server from AWS EC2 instance using IAM Instance Profile (No Static Credentials)

Overview In this post, I am going to describe how to maintain access to Amazon AWS EKS - Kubernetes cluster with only attaching an IAM Role as an instance profile, without configuring access keys on the EC2 instance. The benefit of course is not storing any Amazon IAM credentials on the EC2 instance, having your infrastructure more secure. Use Case: Jenkins CI/CD Pipeline In my use case, I wanted to have my Jenkins CI server have access to EKS cluster for adding continuous delivery using Jenkins declarative pipeline to my continuous integration process. By doing that, I achieved a full CI/CD process for all the microservices that Jenkins handled. ...

May 28, 2019 · 5 min · 1034 words · Omer