Posts

Showing posts with the label docker

Scala TestContainers

Image
TestContainers is a great project for integration tests, mocking, and even for Chaos Engineering. Scala TestContainers is the library in the form of idiomatic-scala with some sugar to make it even easier to use it. I want to show you guys how we can use Scala Test Containers in an SBT 1.5.0 Project using Scala Spec in order to test as MySQL docker container. So let's get started!

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. 

Running Rust Service in Kubernetes with only 3.5MB

Image
Rust is a very exciting language. Not only for system programming but also for microservices and business development. Today I will show how we can create a simple service application in rust using Iron Framework . For this blog post, we will build a rust binary and run both in Docker and Kubernetes. In order to run kubernetes locally, I will be using minikube but you can use any kind of kubernetes cluster or distribution and it should work just fine. The most amazing thing is that we can build a rust executable with only 3.5MB and a docker image with the only 3.63MB . This is super lean!

Running istio with docker-compose and consul

Image
In my previous post , I showed how o install and run istio locally with minikube. However, if you don't have 8GB of ram FREE it might not be a good FIT for you. Today I want to show a lightweight approach for a local environment where we can run Istio with Docker, Docker-Compose, and Consul . I will be doing more posts about istio, this week, talking about how to run Istio on AWS for instance. But going back to this post. In order to have this solution working in your machine you have some pre-requirements such as: have docker installed , docker-compose installed and kubectl installed .  Running with consult and docker-compose is way easier than running with minikube/kubernetes however you are not as close as the production topology. For istio, we will be using istio version 1.0.5 Let's get started!

Running Ansible with Docker

Image
Ansible is a great provisioning tool. However, it can be painful to get some ansible scripts right. Especially if you need some stuff with bash and Ansible. Often baking time in AWS can be pretty high. So It's better you can run ansible locally. However, running ansible local could mess up with your OS. So the best thing is run ansible in Docker. Since the docker container will be ephemeral, once you finish running the container all changes will be lost. You also will benefit from running locally and being able to figure it out quickly whats wrong.  So today I want to share about some simple project I create in order to help to do that. This is called Ansible-Docker this is an ansible sandbox using Amazon Linux.

Mocking Terraform AWS using Docker

Image
Terraform is a good tool for infrastructure provisioning.  However to test terraform it could be pretty difficult. So you will create some terraform scripts and upload to the cloud a run some slow Jenkins job? and if your syntax is wrong? Well, this process can be very painful. So I want to share some simple sandbox I built in order to speed up terraform + aws development in your local machine. I might be wondering how is that possible─? Well, my secret sauce is Localstack . So we are limited to all endpoints that localstack mocks. As Localsttack adds more endpoints we benefit from that. The main idea behind this simple project is to show how easy is to docker-ize somDevOpsps tools and make engineering easy.  Currently is very often to spend 40mim or more doing baking and that's is wrong. So that's kind of mainframe era so the idea is to save time and run things local - as much as possible. Docker helps a lot with that. I run software in production using...

Mocking and Testing AWS APIs with TestContainers and LocalStack

Image
Cloud Computing is the default today. I do believe the future is containers and multi-cloud solutions. However today I work a lot with AWS . There are specific endpoints such as S3, AutoScaling , Route53 and other that are among the ones I use more in my day to day work. AWS API is easy to use however not no easy to test. Distributed systems tend to be hard to test. Having quick feedback is very important for engineers. There is some kind of tasks that need to interact with AWS APIs like S3 for backups for instance. However, if you need to wait to deploy in AWS to test it because is basically impossible to test it locally then we have a problem. We need to be able to do end-2-end testing however while you are coding or doing some troubleshooting is important to do things faster. There are 2 specific projects that can help us with this task. TestContainers and LocalStack . Today I will show to use LocalStack and TestContainers together with JUnit in order to do unit tests m...

Getting Started with Dyno Queues

Image
Dyno-Queue is an interesting queue solution on top of Dynomite . Dyno-queue uses dynomite java driver a.k.a Dyno . Dyno Queue gets all benefits from dynomite like Strong Consistency, High Availability, Stability, High Throughput and Low latency and extend to queue semantics. I highly recommend you read Netflix post about dyno-queue.

Running Multi-Nodes Akka Cluster on Docker

Image
Akka a great actor framework for the JVM.  Akka is high performance with high throughput and low latency, resilient by Design.  It's possible to use Akka with Java however I always used and recommend you use with Scala . Create actors systems is pretty easy however creating multiple nodes on Akka cluster locally could be boring and error-prone. So I want to show how easy is to create an Akka cluster using Scala and Docker (Engine & Docker-Compose). We will create a very simple actor system, we will just log events on the cluster however you can use this as a base to do more complex code.

Running Dynomite on AWS with Docker in multi-host network Overlay

Image
Dynomite is a kick-ass project. Basically, allow you to have strong consistency on top of NoSQL Databases. I've been using dynomite for a while in production( AWS ) and I can say the core is rock solid and it just works. Lots of developers use Windows or Mac for instance and dynomite is built in C and it's really meant for Linux(Like all good things).  So some time ago I made 2 simple projects to get started quickly with dynomite.  Basically, the project creates a simple dynomite 3 node cluster and let you run on your local machine with docker . There are 2 projects - One to create a dynomite cluster with Redis -- The other with Facebook's RocksDB (Experimental). So you can use it on your local machine to Debug and it works just fine. So why not go 1 step further and run Dynomite in AWS using docker? There are cool benefits if you do this approach.

Kubernetes with Docker and Minikube

Image
Kubernetes is getting more popular every day. Kubenertes is an open source system for automating deployments, scaling and managing containerized applications. Created by Google on 2014 and also know as k8s. Why? Because there are 8 letters between k and s :-). K8s has many features such as Automatic bin-packing which is the capability of placing containers based on resources and constraints.  K8s also has horizontal scaling, storage orchestration using local storage or cloud storage such as AWS or GCP. K8s has important Cloud native capabilities such as Self Healing, Service Discovery and Load Balancing and secret and dynamic config management. For this blog post, we will see how to bake a simple docker image using node js application and deploy this docker image on hibernates using minikube in order to run locally. There are other cloud-native solutions such as NetflixOSS Stack . Also Spring Cloud , which uses NetflixOSS too. However, on this post, we will ...

Dynomite and RocksDB running on Docker

Image
Dynomite is a kick ass cluster/proxy solution that provides high availability and strong consistent to databases. Dynomite was created and battle tested by Netflix using Memcached and Redis as primary store backend. RocksDB it's a Facebook Embedded Key/Value store which is growing up a lot because of his incredible high performance and low latency. For this blog post, I will show some simple project I create for the developers to get started with Dynomite and RocksDB together. This project uses docker and creates a Dynomite cluster using RocksDB as backend. Let's get started...

VirtualBox Hell on Windows 10

Image
Currently, Docker and even Vagrant are difficult to use on Windows 10 . As far as I know the VirtualBox is not being stable at all. That's why these last versions of docker and vagrant were being so unstable and given too much head-ache. IF you have to work with a windows station I recommend not update this stack if is working for you. Some months ago I ran into serious trouble and spend lots of time to fix it.   If you are having networking issues with Vagrant or Docker on windows 10 I might have the solution for you. It works for me. :-)

Vagrant: Ubuntu 14.04 with Docker 1.7

Image
Boot2Docker is great however it has some limitations. For instance the OS is readonly and came with pretty much nothing, setting up a shared folder in windows is challenging as well as i showed on last post .  In this post i come to show something different and easier than the previous solution. You can use docker with vagrant if you are a windows or mac user this is better than use boot2docker because IMHO you can do it easily and with less software and you also gain a linux os with you can do stuff because is not read only. Let`s use Vagrant .

Docker Shared folder on windows

Image
Docker is ultra hot right now. It`s becoming a standard very quickly.  There are some issues on IO and Network but still a very promising solution for prime time. If you are a developer and are working on a Windows machine docker is great for you because you can have linux almost for free :-) For Mac and Windows users we need use Boot2Docker . Boot2Docker is a very small image lass them 30MB and is ultra fast it uses tiny linux kernel . Let`s see how to have a shared folder in windows and a docker container using ubuntu inside docker :-) This should be included at the official boot2docker image at some point but for now or you build the image or you do a workaround.