PeterNic
10-11-2008, 11:01 AM
Here's how to set up the trust relationship between two grids in order to migrate applications freely between them.
Source grid: the grid where the application is before the migration; in the examples, source.mygrid.com
Target grid: the grid where you want the application to go; in the examples, target.mygrid.com
Essentially, you need to create a user for the target grid on the source grid. This way, the target grid will be able to log into the source grid and take the application. If you'd like to use the new --export option in AppLogic 2.4.5, to issue the command at the source grid, you need to create the trust relationship both ways.
Here are the details:
At the target grid shell, issue the "grid info -v" command. You will see:
target> grid info -v
Grid Name : target
Grid Description :
AppLogic Version : 2.4.5 Beta
Controller IP : 192.168.1.1
Grid ID : 100/1
Current Time : Sat Oct 11 19:49:31 CEST 2008
System Uptime : 10 days, 9 hours, 31 minutes
Grid Public SSH Key : ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAp2UiwoZ18Vwat8a44AZtcU lbNKDmIeR1kSAESrkMjnoRv2Q7t4x4daanGl6+E+B8bf1nanCz PXOhfgtC5AUEULXT4PanKBV/84...LyHrez5Xy6kSP3QvXNI/1X/zN1KYxbQpo3yQ==
HA State : ok
...
Copy the target grid's publish ssh key to clipboard (select and right-click copy).
Go to the source grid's shell and type the following:
target> user create target@mygrid.com pwd=- sshkey="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAp2UiwoZ18Vwat8a44AZtcU lbNKDmIeR1kSAESrkMjnoRv2Q7t4x4daanGl6+E+B8bf1nanCz PXOhfgtC5AUEULXT4PanKBV/84...LyHrez5Xy6kSP3QvXNI/1X/zN1KYxbQpo3yQ=="
NEW password: ************
re-enter NEW password: ************
adding new key for target@mygrid.com
(Note: don't be tempted to put a simple password, like "test"; use a hard password as with any regular logins)
That's it! Now, at the target grid, type:
target> app migrate source.mygrid.com myapp
(Note: in AppLogic 2.3/2.4 the syntax of the migrate command may have changed slightly, check the documentation for help -- app name and grid name may be swapped. In AppLogic 2.4, you can do the migration using the import/export buttons from the Applications list tab on the grid dashboard -- a bit more human if you're doing it for the first time.)
If you want to set up a bi-directional trust, just repeat the procedure with the target and source swapped.
Good migrations,
-- Peter
Source grid: the grid where the application is before the migration; in the examples, source.mygrid.com
Target grid: the grid where you want the application to go; in the examples, target.mygrid.com
Essentially, you need to create a user for the target grid on the source grid. This way, the target grid will be able to log into the source grid and take the application. If you'd like to use the new --export option in AppLogic 2.4.5, to issue the command at the source grid, you need to create the trust relationship both ways.
Here are the details:
At the target grid shell, issue the "grid info -v" command. You will see:
target> grid info -v
Grid Name : target
Grid Description :
AppLogic Version : 2.4.5 Beta
Controller IP : 192.168.1.1
Grid ID : 100/1
Current Time : Sat Oct 11 19:49:31 CEST 2008
System Uptime : 10 days, 9 hours, 31 minutes
Grid Public SSH Key : ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAp2UiwoZ18Vwat8a44AZtcU lbNKDmIeR1kSAESrkMjnoRv2Q7t4x4daanGl6+E+B8bf1nanCz PXOhfgtC5AUEULXT4PanKBV/84...LyHrez5Xy6kSP3QvXNI/1X/zN1KYxbQpo3yQ==
HA State : ok
...
Copy the target grid's publish ssh key to clipboard (select and right-click copy).
Go to the source grid's shell and type the following:
target> user create target@mygrid.com pwd=- sshkey="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAp2UiwoZ18Vwat8a44AZtcU lbNKDmIeR1kSAESrkMjnoRv2Q7t4x4daanGl6+E+B8bf1nanCz PXOhfgtC5AUEULXT4PanKBV/84...LyHrez5Xy6kSP3QvXNI/1X/zN1KYxbQpo3yQ=="
NEW password: ************
re-enter NEW password: ************
adding new key for target@mygrid.com
(Note: don't be tempted to put a simple password, like "test"; use a hard password as with any regular logins)
That's it! Now, at the target grid, type:
target> app migrate source.mygrid.com myapp
(Note: in AppLogic 2.3/2.4 the syntax of the migrate command may have changed slightly, check the documentation for help -- app name and grid name may be swapped. In AppLogic 2.4, you can do the migration using the import/export buttons from the Applications list tab on the grid dashboard -- a bit more human if you're doing it for the first time.)
If you want to set up a bi-directional trust, just repeat the procedure with the target and source swapped.
Good migrations,
-- Peter