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 associated with redundant manual jobs and automate them, so that you can focus on what’s important for your business.

Why Chef?

chef-311369_1280
Awesome Chef

Chef is a great example of how automation can be successfully applied to an infrastructure, so 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 a TwinDB Agent Using Chef

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

Both 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 includes 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 with a unique registration code. TwinDB agents use the registration codes 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’s going to be the 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! The TwinDB repository is setup, the TwinDB agent is installed and registered and you’re 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