sbgrid-cli-admin.md
... ...
@@ -142,3 +142,51 @@ For more info on cron, see [https://www.man7.org/linux/man-pages/man5/crontab.5.
142 142
143 143
## Migrating existing site installations
144 144
To migrate an existing site-install, use the `sbgrid-cli migrate-admin` command as the *sbgrid* user. This will convert the legacy sbgrid-admin installation.
145
+
146
+```
147
+sbgrid@computer $ sbgrid-cli migrate-admin
148
+```
149
+Will produce
150
+```
151
+warn: The RSYNC_ARGS in your sbgridrc will not be copied over to the new configuration file.
152
+warn: (in most cases sbgrid-cli doesn't require any custom arguments for rsync, so this should be fine)
153
+info: Retrieving package metadata...
154
+info: (1/9) Checking connection...
155
+info: Checking services...
156
+info: Checking sbgrid.org (HTTPS) ...
157
+info: Checking sbgrid.org (HTTP) ...
158
+info: (2/9) Checking rsync credentials...
159
+info: (3/9) Calling activate API endpoint...
160
+info: Site activation credentials provided, skipping API activation
161
+info: (4/9) Initializing installation directories...
162
+info: Please note that a link from the default installation directory /opt/sbgrid to the install target is required to run the software.
163
+A link from /programs to /opt/sbgrid is also required.
164
+info: (5/9) Synchronizing...
165
+info: (6/9) Synchronizing...
166
+info: (7/9) Installing sbgrid-installer@2.4.0 (x86_64-linux)...
167
+info: Installation complete for sbgrid-installer@2.4.0 (x86_64-linux)
168
+info: (8/9) Saving installation sitename file...
169
+info: (9/9) Setting up your installation...
170
+info: Setting all packages to installed & synchronizing your installation...
171
+info: (1/2) Installing the admin cron job...
172
+info: Cron job successfully installed to the current user's crontab
173
+info: (2/2) Setting up your installation...
174
+info: Migration to sbgrid-cli complete. The legacy configuration file has been renamed to /home/sbgrid/.sbgridrc_migrated
175
+```
176
+When migrating from an sbgrid-admin "site" isntallation to a sbgrid-cli installation, the symlinks are likely to be already in place and the info about creating them can usually be ignored
177
+
178
+The default crontab is added by this process. You can set that with the `crontab -l` command. This will check for updates every 15 minutes for the default software versions.
179
+
180
+```
181
+sbgrid@computer $ crontab -l
182
+*/15 * * * * /programs/x86_64-linux/sbgrid_installer/latest/sbgrid-cli admin
183
+```
184
+
185
+To check for updates for all versions (recommended), run `sbgrid-cli crontab --all-versions` which will create a crontab with the proper `--all-versions` flag.
186
+
187
+```
188
+sbgrid@computer $ crontab -l
189
+*/15 * * * * /programs/x86_64-linux/sbgrid_installer/latest/sbgrid-cli admin --all-versions
190
+```
191
+
192
+Add the relevant `--darwin` or `--linux` flags to the crontab command if your installation should include software for macOS on linux or vice-versa, i.e. for an SBGrid installation shared across Mac and Linux workstations.
... ...
\ No newline at end of file