Migrate SwaggerHub On-Premise to Ubuntu 20

Note

This guide is for customers who are in the process of upgrading from v. 1.26 and earlier versions to 1.29.2.

Fresh installations of v. 1.29.x, 1.28, or 1.27 do not need migration as they are already using Ubuntu 20.

Earlier versions of SwaggerHub On-Premise (up to 1.26) were delivered with the Ubuntu 16 operating system. Newer versions use Ubuntu 20. Because of this, the upgrade path to the latest version requires migrating the instance to Ubuntu 20.

Ubuntu 20 migration is done at the last stage of the upgrade process, that is:

Version up to 1.26 (Ubuntu 16)
         ↓
Version 1.29.2 (Ubuntu 16)
         ↓
Ubuntu 20 migration
         ↓
Version 1.29.2 (Ubuntu 20)

Important

Migration to Ubuntu 20 is mandatory. Ubuntu 16-based instances of SwaggerHub On-Premise are not eligible for technical support.

Before the migration

  • This guide assumes you have already upgraded the SwaggerHub application on your instance to v. 1.29.2. If you have not done so yet, follow these instructions:

  • Important

    License: As part of the Ubuntu 20 migration, you will need to activate your SwaggerHub On-Premise license again. You should have the license file in a prior email from SmartBear or saved locally. If you do not have the license file, contact Support.

  • Notify your users of the planned maintenance time.

  • Create a full VM snapshot of your SwaggerHub On-Premise instance. If you encounter issues during the migration, you can restore the working state of your instance from this snapshot.

Key points

Migration to Ubuntu 20 consists of the following steps:

  1. Back up your instance data and configuration using the built-in backup functionality.

  2. Important: Shut down the old instance to ensure no new data is created during the upgrade.

  3. Launch a new 1.29.2 instance.

  4. Activate the license on the new instance and configure this instance.

  5. Restore the data and configuration from the backup.

  6. Update the related infrastructure (such as the DNS name target and security groups).

  7. Verify the new instance is working as expected.

The rest of this guide explains these steps in more detail.

1. Back up the data and download the backup

  1. In the Admin Center, go to the System page.

  2. Click Backup.

  3. After the backup is created, download it.

    Downloading a backup

Important

The backup does not include NTP settings and SSH users. Make a note of your NTP settings and SSH user list on the Settings page of the Admin Center, so you can restore them manually later.

2. Shut down the instance

After you have downloaded the backup, shut down or stop your SwaggerHub On-Premise instance. This ensures that no new data (such as API definitions, comments, or users) is created in SwaggerHub during the migration, and that the backup has all the latest data.

3. Launch a new 1.29.2 instance

Next, launch a new instance of SwaggerHub On-Premise 1.29.2 with Ubuntu 20. See the instructions for your platform:

The new instance must have the same hardware specifications (CPU, memory, disk size) as the old instance.

Make sure your security groups or firewall rules allow inbound access to the new instance on ports 80, 8080, 443 (HTTPS), 22 (SSH), and any other ports you need. Port 8080 is temporarily needed for migration and can be removed afterwards.

Note down the IP address of the new instance.

4. License and configure the new instance

Navigate to http://<NEW_IP_ADDRESS>/ui/index.html and follow the prompts to activate your existing license on the new instance. For details, see:

go.gifActivating Your License

After that, you will be prompted for the initial configuration values:

go.gifInitial Configuration

You can specify arbitrary values at this point - these configuration values do not have to match the ones used in your old instance. You can choose to provide the same values, but this is not required. The entire initial configuration is temporary and will later be overwritten with the settings from the backup.

5. Restore all data from the backup

  1. Access the Admin Center on port 8080 of the new instance using the admin credentials you specified on the previous step (during the initial configuration):

    http://NEW_IP_ADDRESS:8080/ui

    Important

    Use port 8080 instead of the default port 80.

  2. On the System page, click Import and upload the backup (the .tar.gz file) of your old instance:

    Importing a backup

    This backup will appear in the backups list.

  3. Click Restore next to the imported backup and confirm the restore operation.

  4. You will see the "Processing. Please wait..." popup. It stays visible for the entire duration of the restore. The restore may take a few minutes to complete, depending on the amount of data.

    Do not close browser or navigate away while the restore is in progress.

    A backup is being restored
  5. Wait until this popup disappears.

  6. After the restore is complete, the Server Status changes to Completed:

    Status: Completed
  7. Refresh the page.

  8. Log in to the Admin Center again, but this time using your old admin credentials to verify they have been restored from the backup.

  9. If needed, re-add the NTP servers and SSH users on the Settings page of the Admin Center. For details, see:

    go.gifConfigure NTP servers

    go.gifAdd SSH users

6. Update the related infrastructure

Configure the infrastructure attributes for your new SwaggerHub On-Premise instance to match the old instance:

  1. Point the DNS name to the IP address of the new instance.

    Or, if you have a load balancer in front of SwaggerHub, add the new instance instead of the old instance to the load balancer’s back end.

  2. Make sure the new instance uses the correct security groups or firewall rules.

    • You can now remove port 8080 from the inbound security groups or firewall rules as it is no longer needed to access the Admin Center.

  3. Navigate to https://Your.SwaggerHub.Domain (the main application) and https://Your.SwaggerHub.Domain/ui (Admin Center over HTTPS) to make sure the routing works as expected.

7. Post-migration checks

  • Verify that single sign-on works (if you use it).

  • Log in to the main SwaggerHub application and verify that all data – organizations, teams and users, APIs and domains – is present.

See Also

Publication date: