Trace http calls with python-requests
Today python-requests is the de-facto standard library for rest calls. As everything goes on TLS, you can trace api calls with the following: import httplib as http_client http_client.HTTPConnection.debuglevel = 1 requests_log = logging.getLogger("requests.packages.urllib3") requests_log.setLevel(logging.DEBUG) requests_log.propagate = True
Set command output as facts with ansible
Having to check ntp configuration on a distributed cluster, I had to parse the “`timedatectl“` output into a dict and apply various checks. I did this via the (infamous)
MySQL JSON fields on the ground!
Having to add a series of custom fields to a quite relational application, I decided to try the new JSON fields. As of now you can: – create json fields – manipulate them with json_extract, json_unquote – create generated fields from json entries You can not: – index json fields directly, create a generated field […]
Terraforming the clouds
Terraform is an infrastructure configuration manager by HashiCorp (Vagrant) like CloudFormation or Heat, supporting various infrastructure providers including Amazon, VirtuaBox, … Terraform reads *.tf and creates an execution plan containing all resources: – instances – volumes – networks – .. You can check an example configuration here on github: Unfortunately, it uses a custom but […]
MySQL 8.0 Innodb Cluster looks at MongoDB
MySQL turns 8.0 and the technical preview integrates a new “InnoDB Cluster”. The overall architecture reminds MongoDB: – group replication with a single master, similar to replica-sets; – a mysqlsh able to create replication group and local instances supporting js and python; – a MySQL Router as a gateway to appservers, to be deployed on […]
Running MySQL with kubernetes volumes
When you attach kubernetes volumes to mysql images, consider to ignore lost+found. MySQL refuses to initialize non-empty datadirs, so any newly formatted ext4 filesystem doesn’t suit the task. name: mysql image: mysql:5.7 args: - "--ignore-db-dir=lost+found"
Openshift 3.4: broken ansible dependencies
The new ansible openshift 3.4 installation playbook is very nice. Just set deploy variables in the inventory and everything will raise from the ground magically… Well, not immediately tough. Due to this bug you need to: – downgrade ansible to 188.8.131.52 (the latest is 184.108.40.206) Or the playbook will try do serialize python objects which […]