1. Deploy TwinDB agent using Chef on your MySQL fleet

Deploy TwinDB agent using Chef on your MySQL fleet

We are big fans of automation which is also one of the reasons why we started TwinDB. We want to remove the pain around manual redundant jobs and automate them so that you can focus on what is important for your business.

Why Chef?

chef-311369_1280
Awesome Chef

Chef is a great example of how automation can be successfully applied to infrastructure such that your infrastructure becomes easily deployable, manageable, testable and well documented. Whenever, I talk about the benefits of using Chef, I greatly highlight how writing Chef cookbooks essentially documents your infrastructure. Isn’t it great to have a well documented infrastructure, that anyone can reference to? How many times have I not heard someone tell me how they have no idea how a particular service was deployed, or what was deployed on a particular machine? Many many times, and that is exactly where Chef truly shines for me.

Deploy TwinDB agent using Chef

We have released two cookbooks that automate installation and management of TwinDB agents:

Both the cookbooks have been thoroughly tested and can be easily tested using test-kitchen using the provided test suites.

You would only need to use the twindb-agent cookbook directly. It takes care of including the twindb-repo cookbook to setup the repository based on the platform.

Once you have signed up for TwinDB by navigating to https://console.twindb.com/, you will be provided a unique registration code. The registration code is used by TwinDB agents to identify them against your account.
With the registration code handy, you would need to add the following attribute to either Chef environment or Chef role:

Replace 0f6714f735a06a488ec92asasssx0a3f2 above with the actual registration code. I suggest adding the registration_code attribute to Chef environment, since it is going to be same for all your agents.

Once the registration_code attribute is setup, all you need to do is add the following recipes to the node’s run-list or a Chef role:

And that’s it! TwinDB repository will be setup, TwinDB agent would be installed and registered and you would be all set for TwinDB to start backing up MySQL. All without having to do anything manually.

Have a question? Ask the experts!

Previous Post Next Post