How to automate the installation of MySQL 5.6 and above

Posted by Matt Bryson on 14-Apr-2016 13:24:59

With the release of MySQL 5.6, there was no longer a default user account with an empty password. For security reasons the root account is now allocated a random password when MySQL is installed, which is written to a log file.

You then look up the password from the log file, and use it to login and change it to something else...

$ sudo grep 'temporary password' /var/log/mysqld.log 
$ mysqladmin -u root --password=RANDOM_PASSWORD_FROM_LOG password myNewSuperSecretPassword1!

This is all well and good, unless you are automating deployment of MySQL. We use vagrant/ansible to spin up our local dev servers, and as soon as we upgraded MySQL, all our MySQL commands started failing as they could no longer authenticate.

There was no obvious way to install with a predefined password, or no password, so we came up with the following to automate setting up MySQL.

Read More

Topics: Ansible, Deployment, Database, yum, CentOS, Linux, MySQL, Vagrant, Provisioning, Technology

Support for Korean / Chinese / Japanese characters in PhantomJS

Posted by Matt Bryson on 22-Jun-2015 12:52:26

We use PhantomJS to auto generate images of user generated content. All was fine, until we entered the Asian markets.
It was not the usual black squares issue that you can get with Phantom, it just had spaces where the Korean characters should have been.

The font itself was loading fine, as Latin characters were in the correct type face.

After following lots of posts about installing font support packs on linux, and non of them working, I finally got it running on Centos with groupinstall for yum

sudo yum groupinstall "Korean Support" "Chinese Support" "Japanese Support"
Read More

Topics: PhantomJS, AWS, yum, CentOS, EB (Elastic Beanstalk), Linux

Compiling phantomJS 2.0 for AWS EC2 linux image

Posted by Matt Bryson on 17-Apr-2015 11:30:08

Back in Feb I wrote about how to compile phantomJS 2.0.0 for linux, using centOS as the build machine. However, the resulting bin files are not portable across all linux distros, hence why the official binaries aren't out yet.

If you need to run phantomJS on one of the AWS machine images, here is how we compiled it on AWS.

Read More

Topics: PhantomJS, EC2, AWS, CentOS, Linux, Bash

Shellshock Bash Bug : How to patch Bash on AWS EC2 deployed with Elastic Beanstalk

Posted by Matt Bryson on 26-Sep-2014 10:18:02

In response to the ShellShock bug, we tried to patch all our AWS EC2 servers following this security bulletin... but it didn't work.

Turns out that the instructions in the AWS bulletin don't apply to Elastic Beanstalk deployed servers. After some searching, we found the answer.

Read More

Topics: EC2, AWS, yum, CentOS, EB (Elastic Beanstalk), Linux, Bash, Apache

yum repomd.xml does not match metalink for epel - or other repository

Posted by Matt Bryson on 12-Sep-2014 10:50:46

We had this error the other day when running our vagrant script (centOS box):

[Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.

This tried and failed on every single mirror, and basically hung our deployment.

Read More

Topics: Ansible, Deployment, yum, CentOS, Linux, Vagrant, Provisioning