- From: Anthony Goddard <
>
- To:
- Subject: [chef] Re: API Interaction from node
- Date: Wed, 9 Jan 2013 00:37:25 -0500
lmao, that'd be awesome ;)
Fortunately AJ is right, I'm only storing the bin-log position (and filename)
in the databag
process is:
- backup starts (using backup gem) on a backup slave
- pre-backup hook stops replication, dumps the current bin-log position and
filename in a data bag
- backup completes, replication resumes
- a new slave can now get spun up automagically and know what position to
begin replication from by doing a query to the data bag that matches the
backup ID
Ant
On Jan 8, 2013, at 11:58 PM, Adam Jacob
<
>
wrote:
>
And if you are, you get a beer for most bold use of JSON in 2013 so far. :)
>
>
Adam
>
>
On 1/8/13 8:56 PM, "AJ Christensen"
>
<
>
>
wrote:
>
>
> In re-reading, maybe I understood. Ant, care to confirm? You aren't
>
> storing bloody big fuck off binary logs in JSON on the chef-server in a
>
> data-bag, are you?
>
>
>
>
>
> --AJ
>
>
>
>
>
>
>
> On 9 January 2013 17:54, Adam Jacob
>
> <
>
>
> wrote:
>
>
>
> Man I hope so.
>
>
>
> Be kind of awesome if he's packing actual binlogs into a JSON value,
>
> though.
>
>
>
> Adam
>
>
>
> On 1/8/13 5:57 PM, "AJ Christensen"
>
> <
>
>
> wrote:
>
>
>
>> I think he means storing the bin log position in a data-bag (quite a
>
>> common approach to allowing slaves to find the correct position)
>
>>
>
>>
>
>> No?
>
>>
>
>>
>
>> --AJ
>
>>
>
>>
>
>>
>
>> On 9 January 2013 14:54, Jay Feldblum
>
>> <
>
>
>> wrote:
>
>>
>
>> Anthony,
>
>>
>
>>
>
>> I would say "You're Doing It Wrong."
>
>>
>
>>
>
>> Chef is for configuration, not bulk storage. Storing backups in
>
>> chef-server is Doing It Wrong. There are plenty of other approaches. You
>
>> can run backups on a schedule (or on demand) separately from chef-client
>
>> runs. Chef-client can provision the backup
>
>> script and everything necessary to get it running so that it's a
>
>> one-liner in the crontab or a one-liner from SSH. If the script is
>
>> copying data to remote storage, it should not be to chef-server. Instead,
>
>> chef can provision a remote storage node with replicated
>
>> disks and can provision the slave's backup script to know about it, or
>
>> you can use a storage service like S3 and chef can provision the slave's
>
>> backup script to know about that instead.
>
>>
>
>>
>
>> Cheers,
>
>> Jay
>
>>
>
>> On Tue, Jan 8, 2013 at 4:49 PM, Anthony Goddard
>
>> <
>
>
>> wrote:
>
>>
>
>> Hi all,
>
>> I'm writing a little script to populate a databag each time it's run -
>
>> the purpose is to store mysql bin log data in a databag when a slave is
>
>> backed up. I was originally thinking of using the API from the node and
>
>> just using the local client.pem for authentication,
>
>> but while I can read databags this way, I get a 403 when writing to
>
>> them, so I'm looking for a breakdown of what objects the client is able
>
>> to modify.
>
>> I could also just change where I'm storing the data, or if that doesn't
>
>> work, some middleware with another key will work, but I'd be interested
>
>> in hearing about any other approaches if I'm Doing It Wrong .
>
>>
>
>> fwiw, the script that's interacting with chef is run from cron.
>
>>
>
>>
>
>> Cheers,
>
>> Ant
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Archive powered by MHonArc 2.6.16.