Posts

Showing posts with the label DEVOPS

The Death of CI/CD

Image
XP (Extreme Programming) leaders popularized CI (Continous Integration) in the late 90s. The idea was very simple, to continuously integrate code in a common branch usually called trunk, nowadays we call it main. The principles behind CI were (A) Reduce feedback cycles (B) Increase response time and release software faster. CI it's a powerful concept, that requires automation of the build process and of course, automated tests. In order to do CI you also an SCM (Source Code Management system), in the past there were various solutions like CVS (not a drugstore), SVN, and GIT rules today. By definition CI also requires continuous merging, which leads to interesting realizations like, how often should we merge, the answer is as much as possible, as frequent as possible. Today's environments are more complicated than they were in the 90s, back in that time, the CI process was generating one single binary. 

Tagging Everything

Image
I was always a big believer in metadata and observability. Tagging is another form of observability, the idea is very basic and yet not well explored in our industry. You add metadata to a resource. Metadata is just data that describes data. Why bother? Well, at scale, there will be hundreds to thousands of resources including ec2 machines, container images, security groups, load balancers, and all kinds of applications like services, bffs, aggregators, a much more. How do you make sense of these resources? How do you know if you need them after all? Cloud computing is great but also is a big cost center. Understanding your resources is critical, not only for savings but for better infrastructure management. Tags help with cost, but they go beyond cost.  Endless Resources So let's say you have some scale, easily you can have hundreds to thousands of ec2 and dozens to hundreds of lamdas. The first question that should come to mind is ownership, how own all these resources? By not ha...

Chaos Engineering with ToxiProxy

Image
Chaos Engineering is an important discipline of modern cloud-based services. Failure will happen no matter what and it's improved to prove your infrastructure, code, and configurations are reliable and can resist failure and proper recovery. The only way to know is to either by the worst way possible i.e error 3AM on Sunday night or you can test it and sleep better at night :-).  ToxiProxy from Shopify is a pretty useful and interesting solution. It's a proxy that allows us to introduce all sorts of network chaos in our applications such as latency, hang, timeout, and much more. ToxiProxy is written in Go and you can run the server in a self-contained executable like all Go good stuff. ToxiProxy has multiple clients in multiple languages. I will demonstrate some chaos with Redis using the Lettuce driver in Java and ToxiProxy java client library.

Java Process Builder

Image
Sometimes applications need to interact with the underlying OS, even with Bash and Process. JVM has a native implementation for Process, in Linux, there are system calls that are invoked. Today I want to show how easy to make Java and bash to talk to each other. This kind of technique can be used for all sorts of DevOps Engineering solutions or automation. So Let's get started!

Comments on DevOps Report 2021

Image
The DORA DevOps Report 2021 is out. Thats a very interesting report about DevOps and SRE covering 32K professionals over the world during the COVID-19 Pandemic time. We are in difficult times and having this data is very very interesting. IMHO We lose the battle, like Agile but at the same time, the report shows some interesting findings which always gave me hope.  I have read this report since the beginning and always find it interesting and super useful. Today I want to do something slightly different, I made a video commenting on some of my thoughts on the report. I hope you guys like it, so let's get started!

Tickets - Two sides of the same coin

Image
Tickets! Some people love them others hate them. I for sure dont have much love, however, I can see both sides of the same coin. There are lots of tracking systems such as Bugzilla, Track, Jira, GitHub Issues, and many others. There are companies with complex workflows with lots of approvals and complicated steps.IMHO there is little value in complex workflows, I understand the reasons why companies might arrive there but still think is not the way. Tickets can be used for multiple reasons, some could be valid, and others could be actually bad practices, meaning hiding inefficiencies. Let's take a look at the 2 sides of the same coin.

Embedded Java in Bash

Image
Java is the backend solution for several companies, mainly for services and microservices. However, when you need to ship java for a CLI or DevOps solution java is a bit verbose. First, because you need to have a JDK, and second java by default is not self-contained. Meaning you will java multiple jars and if you are not running on a standalone server or using a framework like Spring Boot this could be a bit annoying. There are other solutions like you could be doing a Uber Jar or Fat Jar where you can bundle your app + dependencies in one and one jar. Today I want to share a bash trick where we can embed a Java jar into a single bash script. This trick is neat because with a single file we can combine bash and java. 

Podman in Linux

Image
Podman is the new cool kid on the block. Podman is a deamonless container(OCI) engine for Linux. It's the natural open-source Docker replacement. Docker recently changed the license and plans. Podman commands and flags are compatible with docker and the replacement is very smooth. OCI makes things much more simple and portable. So today I want to share how we can install and use podman. So let's get started. 

AWS IAM

Image
IAM is one of the most powerful tools in AWS. IAM is centralized and super powerful. However, IAM can be pretty complex. IAM is all about managing access to resources and services in AWS. AWS IAM is for free, meaning free of charge but you will pay(of course) by other services you end up using for computing and storage. IAM is made for fine-grained access control, with MFA, Active Directory Integration, and much more. AIM has auditing capabilities integrated with AWS Cloud Trail. IAM allows us to create individual users, groups, and credentials that should be rotated often. Today I want to share a slidecast about IAM. So Let's get started.

CDKs

Image
Cloud Development Kits are becoming very popular. Terraform, Cloud Formation, and many old solutions in the sense of infrastructure provisioning support CDKs. All infrastructure provisioning started as an OPS-ish thing, and often developers/engineers were far away from that. Terraform did a good job of being declarative for OPS and being simple and easy for developers. However, today there is a push to have provisioning happening into multiple programming languages such as Python, Javascript/Typescript, and even Java. Mainly to be more developer-friendly and really on the power of established programming languages. There are a bunch of CDKs popping up nowadays. However, CDKs have a price, code generation, and underlying complexity. Today, I have a slide cast and 2 code demos to show you CDKs more detail and compare them with standard solutions like Terraform. Let's get started!

Java Properties Deep Dive

Image
Properties are around since java.  Properties are a persistent form of K/V pair which is mainly used for configuration. Configuration can be extrapolated all the way down to Feature Flags, Feature Toggles, and Canary. Java properties are cool because they are a simple API that allows you to do simple and yet powerful programing around them. There are 2 interesting projects enhancing properties such as Apache Commons Configuration and Netflix Archaius . These projects are pretty cool and give you killer functionally however the Java Stand SDK can also be pretty powerful if you have enough creativity and know-how to use it. So today I want to share a video exploring the Java Properties API in Depth showing how we can do some pretty powerful and simple configuration management for Dynamic Configurations, Feature Flags, Toggles, and more. So Let's get started!

My 2 Cents on "On the Diverse And Fantastical Shapes of Testing"

Image
I want to share my cents about the post: " On the Diverse And Fantastical Shapes of Testing ". First of all, I believe this is a very interesting subject and yet still see very few engineers talking about it. People mostly take tests for granted. Secondly, I would like to acknowledge the parts I agree with on this post mainly around the concept of Sociable and Solitary Unit Tests are quite useful and show be widespread. Also with the need for teams to have reliable, fast, Bounded(Isolated) and not Flacky on Justin tweet . Now that I acknowledge that, let me elaborate on what I think we are missing and why IMHO the pyramid is dated and we need a mentality shift. I have 4 points I want to elaborate on and give more context.

Reflections on SCM

Image
Branches are almost a religious topic on technology. Git made branches easier and the default approach nowadays. However, do branches always help us and improve the status quo? Do we understand where we are going and what goes do we have or are we just following the herd and choosing technology as a fashion choice? Branches can impact your Refactoring, Code Review, and Collaboration habits. Branches also have high relation with software architecture or the lack of then. Many teams want to do CI/CD or at least talk about modernizing the release technologies but do all teams understand the principles behind it. To answer these questions and many others: Today I want to share a slide cast I made about branches and SCM in general. Doing some reflections and thinking about the benefits and the issues around branches. So Let's get started! 

Restarting Spring Boot Applications

Image
Spring Boot is the standard framework for developing java services nowadays. It's more than normal to have multiple deploys into productions during the day if you are not trapped by a release calendar or release train which should be a temporary thing and end up being a permanent thing. Ideally, you will have 3 at least 3 instances of your service, one for each availability zone in AWS. In order to introduce changes, DevOps often apply a pattern called Rolled Updates where often you patch one service and restart the application and then you do that one server at a time. In order to do that you server should be able to handle a clean shutdown and manage restarts smoothly which requires some config or code in your service side and also some consideration in sense of release resources, deny connections and prepare the land for a proper restart to happen. You might be in the middle of an important transaction so maybe you want to finish that first. For services is common to use the Sag...

git rebase with squash

Image
Git is a very powerful tool for source code version control. Often we do POCs and no one whats to waste time while you are doing a POC so often people dont pay much attention to their commit messages(including myself). However the POC grows and you reach the point to productionize the solution, all great but what you do with your poor commit messages? Good messages are critical for good configuration management, release management, and code hygiene. So what can we do? Well git rebase can rescue us. Git rebase is also useful in other use cases where you need to have a specific format of messages because your CI/CD tool does some validations or you are hunting a bug down and you want to drop a bad commit or you are cherry-picking commits to doing a chirurgical release. So I made a short video showing rebase commands in action. We also will use squash which is an interesting way to combine your commits in one for better trackability. So Let's get started.

Management: The non-obvious II

Image
This is the second post on the series of management the non-obvious. I highly recommend you check out the first post . For the first post, I shared +20 books which was the base of the ideas of the first slidecast. This is the second slidecast. In this second slidecast, we will continue covering some non-traditional ideas and I will recommend +20 books again. Books are portals to other dimensions. We have several cognitive biases in our brains that work against us. We also live in a world that the bad things are repeat over and over and the good things are faiding. So it's really important to spot and think about it. Often we think we have all the answers and just need to execute something, is that so? They allow us to see things we were not seeing before. So I hope you guys like it. Let's get started.

Terraform S3 Bucket Object

Image
Terraform is awesome.  Terraform allow us to do declarative Infrastructure as Code and it's really the way to roll in AWS nowadays. You really dont want to do things manually or using the mouse because they dont scale and are error-prone. Automation often takes more time to do it and get it right but in the long run, it really pays off because it scales very well. So today I want to share a specific feature in Terraform called S3 Object Bucket. This resource allows us to upload local files to S3. So let's get started! 

Networking Troubleshooting/Debugging with Wireshark & tcpdump

Image
This is the 3rd and final post on the Apache Mina series.  I highly recommend you check out posts I and II.  tcpdump is very important networking debugging tool. tcpdump allows us to capture traffic because on a specific port. Wireshark is a visual(there is a terminal version as well) network capture and analyzer tool. We will use tcpdump to capture traffic between our mina TCP server app and a telenet client session. We will use the tcpdump capture to feed Wireshark and we will use Wireshark to understand what's going on between the client and the server on the network stack. Wireshark has a killer feature to follow TCP flow: meaning you can see all exchanges from client and server. So I made a video showing in detail this whole thing. So Let's get started.

Apache Mina TCP Server using SSL

Image
This is the second post on the Apache Mina series. In the first post , I show how to build a simple TCP Application using Mina, Xstream and we did create a Client which we test with Junit and also Telnet. Now we will do something a bit different, we will add SSL support. So there is another video where I explain in detail how we can generate the keys, also test the application using the OpenSSL client in Linux. So Let's get started!

Factorio: A game about automation

Image
This is a very interesting game. Factorio is a game about automation. If you work as an engineering or DevOps/SRE or like Lean and Queue theory this is a game for you. Factorio is highly, highly, highly addictive. It's very much like real life with the need for Refactoring, Technical Debt, Architecture, the pressure to deliver, constant tech updates and you have to catchup, debugging why you product halt, and much more. You can either play alone or with friends. It's 100% fun, especially if you are in the tech industry like I'm. The game reminds me a lot of StarCraft 2 but much more focused on automation at scaling them battles and micro. So I made a quick video showing some of the ideas about the game and I hope you guys like it and have fun. Let's get started!