Blorp (scsi) wrote in lj_everywhere,
Blorp
scsi
lj_everywhere

Setting up cluster 2

Hi everyone!

Rather than bug brad via email, I figured that id get some documentation out in the open on how to initialize another cluster using the LJ system.

Here is what I have so far:

Add a new entry in your ljconfig.pl file.. Here is mine (minus my passwords, duh)

'master' => { # master must be named 'master'
'host' => "127.0.0.1",
'port' => 3306,
'user' => 'livejournal',
'pass' => 'wee',
'role' => {
'cluster1' => 1,
},

},
'master2' => { # master must be named 'master'
'host' => "10.0.0.10"
'port' => 3306,
'user' => 'slave',
'pass' => 'wee2',
'role' => {
'cluster2' => 1,
},

},

Then, add:

@CLUSTERS = qw(1 2);

One you get that all done, create the database on cluster2 and add a mysql user.

Once you can connect from one machine to the other, run /home/lj/bin/upgrading/update-db.pl -r --cluster 2 This will create the tables on the other machine.. You should be ready to move people over now by using the /home/lj/bin/moveucluster.pl script..

From what I can tell, all of the styles, user table, etc stay on the master cluster, and only the journal entries, userpics, etc (dynamic user stuff) goes on the cluster of which that person is a part of.

Brad: Am I even close to getting this right? Or is there some other thing that I should be adding..
Subscribe
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 5 comments