Deploying Vault and Consul

Let’s look at how to deploy Hashicorp’s Vault and Consul to DigitalOcean with Docker Swarm. This tutorial assumes that you have a basic working knowledge of using Vault and Consul to manage secrets. Please refer to the Managing Secrets with Vault and Consul tutorial for more info. Upon completion, you will be able to: Provision hosts on DigitalOcean with Docker Machine Configure a Docker Swarm cluster to run on DigitalOcean Run Vault and Consul on Read more

Comparing sizes of protobuf vs json

Google Protobuffer is a binary format claiming to much more compact than json and other text-formats, but just how much less space does it require? Does it hold for large arrays of data? In this blogpost I will compare the sizes of the two formats. Test-data with array of tickers I will generate test-data with a home made tool, you can find it on github: https://github.com/nilsmagnus/protobuf-json-xml-size-comparison The content of the data is defined in a Read more

Ansible wait_for with docker_container

When using Ansible’sdocker_container to manage containers, we’ve seen people use wait_for ensure the container is started. This requires that the container exposes a port and typically on the host network. Then the IP and the exposed/published port can be used to verify the container (or the service inside) is running. What if there is no port, or no host binding? If there is nothing to expose from the container (e.g. think of a queue worker), Read more

How to Configure the Linux Firewall for Docker Swarm on Ubuntu 16.04

Docker Swarm is a feature of Docker that makes it easy to run Docker hosts and containers at scale. A Docker Swarm, or Docker cluster, is made up of one or more Dockerized hosts that function as manager nodes, and any number of worker nodes. Setting up such a system requires careful manipulation of the Linux firewall. The network ports required for a Docker Swarm to function correctly are: TCP port 2376 for secure Docker Read more

How can I make git accept a self signed certificate?

To permanently accept a specific certificate Try http.sslCAPath or http.sslCAInfo. Adam Spiers’s answer gives some great examples. This is the most secure solution to the question. To disable TLS/SSL verification for a single git command try passing -c to git with the proper config variable, or use Flow’s answer: git -c http.sslVerify=false clone https://example.com/path/to/git To disable SSL verification for a specific repository It is possible to globally deactivate ssl verification. It is highly recommended to Read more

Building Driver-based Components in Laravel

Componentization is a great way to build extensible and reliable software systems. It allows us to build large systems that are composed of decoupled, independent and reusable components. It gives us a plug-and-play approach to building software systems. Laravel as a framework is richly composed of reusable components — some of which are third-party Symfony components — that are all well-defined and pieced together to make up the system. Components Most modern software systems are Read more

Laravel: The hidden Manager class

When creating your application, sometimes you may find a class that accepts different implementations of something. For example, a delivery courier may need any transportation to reach your house with your package: bicycle, car, or even public transport. Okay, you get the picture. Now you need a way to create these implementations depending on what the delivery courier needs to use to reach your house. And each of these implementations of transport have their own Read more

Drivers and Managers in Laravel

One of the biggest features in Laravel is the ability to create services easily that can be extended and customized in a painless way. For example, we can quickly set up our own authentication guard and use it where we want. Let’s take a look at how to write a custom manager that we can extend without touching it. Laravel offers a very simple way to switch between different technologies easily. Let’s say we want Read more

A simple way to enable CORS on Laravel

What is CORS? CORS stands for Cross Origin Resource Sharing. Origin consists of protocol, domain and port number such as https://hogehoge.com:443. Therefore, CORS means allowing an web application on a certain origin (e.g. https://hogehoge.com) to access an web application on a different origin (e.g. https://fugafuga.com). Why is CORS necessary? In order to prevent cross site scripting (XSS) and cross site request forgeries, JavaScript’s asynchronous communication such as Ajax follows the same origin policy, which bans Read more

The docker-proxy

Containers created and managed by the Docker platform, are able to provide the service that is running inside the container, not only to other co-located containers, but also to remote hosts. Docker achieves this with port forwarding. For a brief introduction to containers, take a look at a previous article. When a container starts with its port forwarded to the Docker host on which it runs, in addition to the new process that runs inside Read more


Любишь мемасики?

Подпишись на мой телеграм-канал!

Открыть
Закрыть