How to move a Sapho app between servers

Last update:

Audience: Developers building Sapho micro apps

When building applications in Sapho, developers will have the need to move apps between servers. This tutorial explains how to do this task for two different scenarios:

  1. You built an app on a development server and you need to move it to a production server server
  2. You have the same app on 2 different servers, but the app on one server was modified extensively and you need a different server to have the up-to-date version of the app

Scenario 1

First, let’s assume you built an app on the development (server X) and you need to move it to a production server (server Y) so it can be used company-wide. Perform the following steps to make sure everything goes smoothly.

Step 1: Make sure both servers are running the same version of Sapho

You can check the Sapho version by looking at the number below the Sapho logo on any page of the builder.

This first step is very important and minimizes the risk of corrupting the app.

Step 2: Export the app

On the Micro Apps page of server X, hover over the app you want to export and click on the Export button. The Export App dialog is shown. If you want to include connection information with the exported app, then check “Include connector passwords with the app export.” Click Export.

Step 3: Import the app

On the Micro Apps page of server Y, click the Import App button at the top right of the page. Upload the .sapp file previously exported.

  • If you already have the connector associated with the app on server Y, the data auto-mapping should be successful. Click Next and then Finish.
  • If you don’t have a suitable existing connector on server Y and data auto-mapping is not successful, then set Use Existing Connector to No and click Create New Connector. If you checked “Include connector passwords with the app export.” during the last step, the New connector information should have pre-filled inputs. If you didn’t check that option, you will need to add the correct credentials. When done, click “Check Service”. If everything is okay, a green message will appear. Click Next and then Finish.

Step 4: Test the app in preview

Preview the app and click through the pages to check whether your app works correctly.
Note: If the theme used for the app from server X is not available on server Y or it is available under a different name and Sapho will not be able to look it up, the default theme is going to be used.

Step 5: Publish the app

Return to the Micro Apps page. Hover over your recently imported app and click on the rocket icon to publish the app. The Publish App dialog is opened. Modify the shortcut if needed and click Publish.

That’s it, your app is now LIVE!

Scenario 2

The second use case for this tutorial is when you have the same app on 2 different servers, but the app on server A was modified extensively and you need server B to have the up-to-date version of the app as well. Many of the following steps will be similar to the use case above; however, there are some important additional steps.

Step 1: Make sure both servers run on the same version of Sapho

You can check the Sapho version by looking at the number below the Sapho logo on any page of the builder. This first step is very important and minimizes the risk of corrupting the app.

Step 2: Export the app

On the Micro Apps page of server A, hover over the app you want to export and click on the Export button. The Export App dialog is shown. If you want to include connection information with the exported app, then check “Include connector passwords with the app export.” Click Export.

Step 3: Unpublish the old version of the app

On the Micro Apps page of server B, open the old version of the app for editing. Go to Settings and rename it – for example, “JIRA (old)”. Then go to the Publish section and click Unpublish App.

Step 4: Import the app

Return to the Micro Apps page of server B. Click the Import App button at the top right of the page. Upload the .sapp file previously exported.

  • If data auto-mapping was successful, click Next and then Finish.
  • If data auto-mapping wasn’t successful, you will get an error describing the problem. Read it carefully and you will know what you need to fix. For example, if you get an error about missing columns or tables in a JDBC connector, first make the necessary changes to the corresponding database. Then go to the Connectors page, edit that connector and click Update Connector. Now try to import the app again.

Step 5: Test the app in preview

Preview the app and click through the pages to check whether your app works correctly.
Note: If the theme used for the app from server A is not available on server B or it is available under a different name and Sapho will not be able to look it up, the default theme is going to be used.

Step 6: Publish the new app

Return to the Micro Apps page. Hover over the new version of the app and click on the rocket icon to publish the app. The Publish App dialog is opened. Modify the shortcut if needed and click Publish.

Please note that the newly imported app resets all cards for all users. In addition, users must reset their notification preferences. This issue will be addressed in Sapho 3.2

Step 7: Optional – delete old app

If you think the old app is not going to be used anymore, delete it.

 

We hope that this tutorial will allow developers to spend less time fixing corrupted apps and more time streamlining the business processes of their company!