rand(Ø)

> beautiful code & photos

about <

Posts tagged: devops

MySQL: silent insecure password warning

I won't invent anything new here but I'll share a quick improvement on an answer I've found on Stack Overflow.

If you are doing batch actions and don't want to write in .mylogin.cnf file, there's the trick: use a process substitution!

$ mysqldump --defaults-extra-file=<(printf "[client]\nhost = host.rds.amazonaws.com\nuser = username\npassword = \$PassW0rd\$") \
    database > dump.sql

This also works for any other file input, like Docker env file run param:

> Continue Reading

Cross-region & cross-account AWS resources Terraform planning

Hey, it's been a while, right?

Lately, I'm leading some big changes in our infrastrure since I'm wrapping a Blue/Green deployment into another one. Uh?

Long story short: our product runs on AWS ECS Docker containers, and because we have one sub-domain per app instance, we use Apache wildcard sub-domains. Meaning a single container handles traffic from many clients/instances. We already have a Blue/Green deployment process in place but at the Docker container level, not at the client level. The idea is to entirely duplicate the whole stack (with all its flaws) and a sub-domain pointing to

> Continue Reading

CSP Header Hacking for Apache2

Hello,

I write here to report my latest dirty hack. Story—

While enforcing our HTTP server configuration at work, we are slowly implementing CSP policies and one of them allow Web browsers to report violations to a given endpoint.

At this moment, we are only at the reporting step of the implementation because the first time we attempted to roll this header out, it ended up breaking our staging env.

So, it's recommended to set the Content-Security-Policy-Report-Only header.

This header takes the report-uri directive which allows the browser to push the violation findings to a given endpoint.

For this example:

> Continue Reading

Upgrading in a few commands

It has been over a year now that I migrated my 2 blogs on full Docker-hosting and I wanted it to be as simple as possible for several reasons:

  • Docker is easy to work with and to maintain
  • Everything is Dockerizable
  • I don't want to spend more than an hour every month or so to upgrade my stacks

At work, we previously used CoreOS to deploy a fleet of Dockerized apps but it was hard to maintain but more specifically, CoreOS is designed for distributed apps, which is not the case of this blog.

So, I searched for a simpler

> Continue Reading