Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The script will need to establish a session witht eh priv's necessary to complete the site updates (eg, admin) and looks for the username and password in the DynamicConfigurationServices under the admin.user and admin.pw keys.

One way to set do this is to use jconsole. On the node where the code will be running, you can establish a reverse tunnel to your local box using something like this:

ssh -R 6780:localhost:6789 ccjon@psl-6.ucdavis.edu

Then on your local machine (eg, psl-6.ucdavis.edu) run

telnet locahost 6780

and you will be connected to port 6789 of the remote machine.

You can also just log into the remote machine and connect to port 6789 on localhost.with jconsole

You'll need to forward X11 thru the knockdc firewall cluster to do it.

add to .ssh/config:

No Format

LocalForward 127.0.0.154:12104 <remoteMachineDNSName>:22

Host <host Name to type on commandline>
HostName 127.0.0.154
Port 12104


Then

No Format

ssh -X knockdc
....
ssh -X remoteMachineDNSName

jconsole

select 'Remote' connection tab and use localhost port 9000

Select the 'MBeans' tab (top)

Expand the 'beans' domain (left side) and select the DynamicConfigurationService MBean

Select the 'Operations' tab (top)

Set the values for the two keys 'admin.user' (username) and 'admin.pw' (password)

Then on the remote machine run

remote-machine>telnet localhost 6789

h3 Running the process

connect to the telnet port and run:

...

No Format
 sessionid = tool.login();
		
 result = tool.addMessageToolToUserSites(sessionid);

 go

Note

When the task is completed, be sure to remove the admin.pw key value from the DynamicConfigurationService MBean in jconsole, at the least and probably better to also remove the 'admin.user' key