Posts

Ansible IV: Managing variables and facts

- Updated it automation configuration as code

In the last post we created three machines using Vagrant and VirtualBox. Those machines correspond to the database, backend and frontend in our system. In this fourth entry we will configure the database, taking a look at how variables and facts work.

Ansible III: Multiple machines, multiple playbooks

it automation configuration as code

Here comes the third post of the Ansible series. This time we expose a scenario that will serve us through all the series. I had been wondering how this scenario should look like, but since I'm not an expert we will use a simple scenario: frontend + backend + database. Later you can expand this scenario to include cache, load balancing, service registry, vault, etc. Let's dive in!

Ansible II: playbooks, containers and inventory

- Updated it automation configuration as code

Welcome to the Ansible series! This is the second article in which we will start by creating our first SSH Docker container to simulate one remote machine, write an inventory and build a simple playbook to use against.

Ansible I: Concepts and Installation

- Updated it automation configuration as code

With this post we start a series about Ansible, the IT automation tool. This first article introduces the basic concepts of Ansible and its installation. Also we will install VirtualBox and Vagrant which will help us to practice Ansible in a more realistic scenario without exiting our computer.

Transforming a RDKit depiction function into a Web API with Flask

web api chemoinformatics

RDKit is a widely used toolkit to work with molecules in different languages. Web APIs are interfaces that work with request-response message systems, commonly implemented in HTTP and accessible over the internet. Here we will take the RDKit's function responsible for creating 2D molecular depictions and expose it over the internet, via HTTP, with a request-response system with the help of Flask and Python. We will be able to send molecules in SMILES format and our server will send us back the SVG representation of that molecule.

Django: basic auth with django-allauth

web framework

Django is a web framework that comes with a lot of stuff built for you, so you can focus on building your application instead of a web framework. Django also has a large ecosystem of apps that you can use with your Django project! Here you will use the django-allauth package which will handle the authentication processes for you. You will have a running Django website with authentication in no time!

Go - Types, variables, functions and classes

programming language programming basics

When learning a new programming language, I think that knowing its types is very important. They are the tools that you be working with, and you should know them: strengths and use cases, conventions... Among other things, variables and functions are basic too, even if they can get complex. Then we can find some 'advanced' concepts in classes and testing, for example. And which I think it makes a lot of difference is to know about the standard library, there is so many power in there... Here we will start to look at types, variables, functions and classes in Go: how we define them, how we assign them, etc. Let's dive in!

Go - Hello world, linting and build problems

programming language programming basics

Go is a programming language that is compiled, statically typed, expressive, concise and clean. It throws away things like inheritance in favour of composition. Its efforts at having a unified style caught my attention and made me eager to learn Go. It's time to act! I will be learning Go and posting those things I think are worth sharing.

Parallel Python - Standard Library

parallelization apis

If you need to process items in a list and each is independent from the others, you probably benefit from parallelism. To parallelize you split the work in multiple tasks and execute them at the same time. There are two ways of doing paralellism: threads and processes.

Load balancing with Consul & Nginx

load balancing service registry containers

The last few weeks I played with Docker, Consul and other tools, so I tried to load-balance multiple Docker containers with an API. I decided to share with you how I built the system so I wrote this blog post. I hope you find it useful in some way. We will use Consul, Docker, Docker compose, Nginx, Python and Supervisord to create a load-balancing system that gets its configuration updated when the group that load-balance scales up or down.

Idiomatic Python - Adapter pattern

programming patterns chemoinformatics

Writing idiomatic Python (also known as Pythonic code) is a skill that is greatly appreciated, since it improves both readability and maintainability of the code. Using a non-Pythonic ported from C++ I propose you how to adapt it using the Adapter design pattern.