I recently migrated a large number of projects (30) from Atlassian Plugin Studio@studioStudio (no longer available) to Atlassian OnDemand Cloud using a variety of techniques. The result is http://bobswift@atlassian.net. While I am happy with the result, getting there took much longer than expected! There were a number of problems to overcome along the way and many things I would do differently if I needed to do something similar again. The following summarizes what I would recommend for others with a similar migration to do . Some of the steps could be omitted or modified for your situation. This only covers migrating Confluence and JIRA data.
Automation was used extensively due to the large number of projects to migrate and the need to perform all the migrations in the shortest amount of time. To demonstrate, we will use 2 projects - PA and PB. If you only have one project, you can simplify the steps to some degree and in some cases do steps manually or use simplified commands. ACLI was used extensively. Atlassian CLI 2.6.0-SNAPSHOT or above is required. Specifically, use a customized version of the atlassian.sh or atlassian.bat to make it easier. Figure out a head of time what user will be used to make the changes in the OnDemand instance. I recommend creating an automation user id (automation).
For Confluence, a local Confluence 3.5.13 (or equivalent) migration installation is required to enable the restoring of data to the OnDemand instance. The local instance will be upgraded to 4.1.7 after the studio data is restored. This will give us the ability to save and restored the spaces to the OnDemand instance because it is at roughly the same release level.
No Format | ||
---|---|---|
| ||
if [ "$application" = "confluence-studio" ]; then
string="confluence-cli-2.6.0-SNAPSHOT.jar --server https://studio.plugins.atlassian.com/wiki --user xxxx --password xxxx"
elif [ "$application" = "confluence-ondemand" ]; then
string="confluence-cli-2.6.0-SNAPSHOT.jar --server https://xxxx.atlassian.net/wiki --user xxxx --password xxxx"
elif [ "$application" = "confluence-migration" ]; then
string="confluence-cli-2.6.0-SNAPSHOT.jar --server https://localhost:8121 --user automation --password xxxx"
|
...
No Format | ||
---|---|---|
| ||
if [ "$application" = "jira-studio" ]; then
string="jira-cli-2.6.0-SNAPSHOT.jar --server https://studio.plugins.atlassian.com --user xxxx --password xxxx"
elif [ "$application" = "jira-ondemand" ]; then
string="jira-cli-2.6.0-SNAPSHOT.jar --server https://xxxx.atlassian.net --user xxxx --password xxxx"
|
...
- Prevent Confluence pages from being created, updated, or commented on
- General users don't have much permission anyway. Only administrators and a few special cases are allowed to edit - ignore that or handle manually.
Remove comment permission from users group
No Format atlassian confluence-studio -a runFromList --common "-a removePermissions --space @entry@ --group users --permissions comment" --continue --list "PA, PB"
- Prevent JIRA issues from being created, updated, or commented on by switching users (group) role from users to observers
Give Observers role to users group - no harm in doing this early
No Format atlassian jira-studio -a runFromList --common "-a addProjectRoleActors --project @entry@ --group users --role Observers" --continue --list "PA PB"
Remove Users role from users group
No Format atlassian jira-studio -a runFromList --common "-a removeProjectRoleActors --project @entry@ --group users --role Users" --continue --list "PA, PB"
- The default permission scheme gives users group authority not just role authority to create, update, ... issues!!! So, you need to change all projects to use a different permission scheme that is strictly role based. Developer Relations created this specifically for this purpose (thanks Jonathan!). There is no harm in doing this change well before migration.
Update all projects to the role based permission scheme
No Format atlassian jira-studio -a runFromList --common "-a updateProject --project @entry@ --permissionScheme \"Role based\" " --continue --list "PA, PB"
...
As part of the migration, it is important to migrate user ids as well (especially for JIRA!) in order to preserve who created issues or content. This will enable the original user to retain ownership as much as possible. This can be done easily with Confluence but is significantly more difficult for JIRA. JIRA limitations make it impossible to retain certain information using an external migration approach. In our case, the limitations were acceptable.
- Confluence data
Export participants data (userId, full name, email)
This allowed user ids to be exported.No Format title This can take time for larger spaces or a large number of spaces/projects atlassian confluence-studio -a runFromList --common "-a exportData --space @entry@ --file participants-confluence.txt --append" --list "PA, PB"
Export space
No Format atlassian confluence-studio -a runFromList --common "-a exportSpace --space @entry@ --file @entry@-space.zip" --list "pa, pb"
- JIRA data
Export participants data (userId, full name, email) - only need to do this once for all projects
No Format title This can take time for larger projects or a large number of projects atlassian jira-studio -a exportData --exportType participants --file participants.txt --search "project in (PA, PB)"
Info title Incomplete Unfortunately, studio prevents access to the email address for users (JIRA only, Confluence works ok!). You will need help from Developer relations to get the email addresses for your JIRA participants.
Export project data - versions and components
No Format atlassian jira-studio -a runFromList --common "-a exportData --project @entry@ --file @entry@.txt" --list "pa, pb"
Get issues
No Format atlassian jira-studio -a runFromList --common "-a getIssueList --project @entry@ --file @entry@-issues.txt --list "pa, pb"
Get comments
No Format title Run for each project atlassian jira-studio -a runFromIssueList --project pa --common "-a getCommentList --issue @issue@ --outputFormat 2 --append --file pa-comments.txt"
Get voters
No Format title Run for each project atlassian jira-studio -a runFromIssueList --project pa --common "-a getVoterList --issue @issue@ --outputFormat 2 --append --file pa-voters.txt"
Get watchers
No Format atlassian jira-studio -a runFromIssueList --project pa --common "-a getWatchersList --issue @issue@ --outputFormat 2 --append --file pa-watchers.txt"
- Attachments
Attachments will be handled by script by retrieving them one at a time and adding them to the migrated issue directly
...
Script is used to do most of this for each project in parallel.
Add users - important to retain JIRA reporters and comment authors for both JIRA and Confluence
No Format atlassian jira-ondemand -a run --file participants.txt atlassian jira-ondemand -a run --file participants-confluence.txt
- Confluence spaces
- Copy *.zip to Confluence home/restore directory of a local Confluence 3.5.13 instance
Restore exports to local instance
No Format atlassian confluence-migration -a runFromList --common "-a restoreExport --file @entry@-space.zip" --continue --list "pa, pb"
- Upgrade Confluence 3.5.13 to Confluence version <= 4.1.7 (OnDemand level)
Export spaces (now in OnDemand compatible release format)
No Format atlassian confluence-migration -a runFromList --common "-a exportSpace --space @entry@ --file @entry@-space-41.zip
- restore spaces to OnDemand instance using UI (on demand has unique restore support)
- link the space to the existing JIRA project with the same key (this didn't seem to work though - OnDemand bug ?)
JIRA projects - create project and add versions and components
No Format atlassian jira-ondemand -a runFromList --common "-a run --file @entry@.txt" --continue --list "pa, pb"
Restrict notifications - no notifications while JIRA data is being recreated. Create a No notification notification scheme to use for your on demand instance.
No Format atlassian jira-ondemand -a runFromList --common "-a updateProject --project @entry@ --notificationScheme \"No notifications\" " --continue --list "pa, pb"
- JIRA issues
- run issue create script
- match JIRA keys
- progress issues to correct state
- JIRA comments
- run comment create script
- JIRA voters
- run comment create script
- JIRA watchers
- run comment create script
- JIRA attachments
- run attachment copy script
Restore notifications
No Format atlassian jira-ondemand -a runFromList --common "-a updateProject --project @entry@ --notificationScheme \"Default Notification Scheme\"" --continue --list "pa, pb"
...
As a service to your users, you can redirect users from the old information to the new information.
Update Studio Confluence pages with redirect link
No Format title For each space atlassian confluence-studio -a runFromPageList --space pa --common "-a updatePage --space @space@ --title @title@ --content "... redirect macro ..."
Add a comment to Studio JIRA issues with link to equivalent issue
No Format atlassian jira-studio -a runFromIssueList --project pa --common "-a addComment --issue @issue@ --comment "Issue migrated to [@issue@|bobswift@atlassian.com]"