AWS Profile switching

On the other day, I was sitting in front of my console, and tried to get the courage to run ‘terraform destroy’.

I started to think about what shall I do in the future to avoid situations like this, and then I realized the problem is with the ‘default’ section. When you run the ‘aws configure’ command, it will create you a section named ‘default’ in the .aws/credentials and .aws/config files, from that very moment you will use that section as your … well, as your default credentials, and when you add more and more keys, you can select them by using ‘–profile’ switch over and over again.

Continue reading “AWS Profile switching”

My MySQL command prompt

Earlier this week we had a discussion with fellow DBAs about our mysql prompts, and at the end of the day it showed up, that a lot of us hit the same problem.

The problem is, that when you set up your mysql prompt then ‘\h’ will be resolved to ‘localhost’ when you connect locally – instead the name of your host as you expect it. It always bugs me, and once I spent a good afternoon figuring out how to workaround this.

Well, the workaround is not a big deal, because you can insert any text into your mysql prompt, and after you realise that you can do it, then it is easy: just put the hostname into your prompt with your chosen provisioning tool and that will do.

Continue reading “My MySQL command prompt”

The way I like to compile my Go programs – Makefile

I was on the quest of searching the Holy Grail of Go programming, and I found something, which I doubt that it is, but close enough – for the first sight.

I have several problems with GO, first, that I write my code on an OSX box, and I’ll run the programs on Linux hosts, so I have to solve the cross compilation; my second problem with Go, that I don’t really like the “There is a GO project folder, and all the GO projects are relying on” approach. It makes using GitHub painful.

Continue reading “The way I like to compile my Go programs – Makefile”

MySQL/docker performance report update

Saturday I was in my favorite grocery store, standing in the line, browsing the net on my phone. I read Vadim Tkachenko‘s blog post about Measuring Percona Server Docker CPU/network overhead and his findings were opposite than mine – he didn’t found any measurable difference. Reading his post, he did found huge impact in networking which I didn’t check, so I was re-run my checks again, but now with paying attention to network configuration.

Continue reading “MySQL/docker performance report update”

MySQL in docker or native – performance benchmarks

Back in October I have write about possible ways of running multiple MySQL instances on the same hardware. As the months passing by, the project of splitting our database schemas into standalone instances is closing in, so I started to check the different ways.

EDIT: This post is outdated, here is the follow up.

Continue reading “MySQL in docker or native – performance benchmarks”

Continuous feedback from jenkins console output

This one really was a pain in the ass for a long time.

Jenkins is great, not only for building projects, but I start the most of the ops related tasks here. All the projects have their own workspace, I can browse the previous outputs, see if a task failed or not, and I can easily share the results at the end of the task.

I had only one problem with that: the long-running tasks weren’t shown on console output until they finished. I tried to solve that, but it was only annoying, not a showstopper, so I let that go, because it didn’t look like an easy win, and I didn’t want to spend too much time on that.

But last week I created a job for online altering the database and – surprise! – pt-online-schema-change was continuously updated the console log screen, so I started to google out what is happening.

Continue reading “Continuous feedback from jenkins console output”

“About the unix philosophy, and why I broke it – and then how I moved back to the old track”

I am always fascinated by the cleanliness of UNIX. One tool only should do one thing, but it has to be the best in that way. The operating system itself will glue all the modules together and give you a complex feel of a system, you don’t have to take care of huge, bloated software, don’t have to deal with mysterious bugs, which are appearing random. Just small bricks of clever software and the rest are on you.

Recently I broke this, and frankly, I am not sure if it was a bad decision, or not.

Continue reading ““About the unix philosophy, and why I broke it – and then how I moved back to the old track””