Manage multi-instance deployment
Last updated
Was this helpful?
Last updated
Was this helpful?
UI Bakery supports multi-instance deployment and synchronization.
Key considerations include:
Apps must be connected to a Git repository and synchronized through it.
Data sources and roles used in the apps need to be manually synchronized.
This guide describes the deployment of two UI Bakery instances in your setup, but it is also applicable to multiple instances.
To synchronize your app and import it into another instance, you need to ensure that the new instance has an identical list of data sources with the same data source IDs as the original instance.
To do so, follow the steps below:
In the Original Instance:
Open the settings of the Data source you want to synchronize.
Copy the data source ID next to the Data Source name.
In the Second Instance:
Start connecting a new data source, entering its name and other required details.
Click on the ID field next to the Data Source name to make it editable.
Paste the data source ID copied from the first instance and click Connect Datasource.
Data source ID can only be specified during the creation of the data source.
If you have existing data sources with different IDs, consider deleting them and creating new ones from scratch. Once the ID is correctly specified, the app will automatically start working with the new data source.
When using roles to manage page visibility, it is crucial to maintain identical role IDs across all instances.
Follow the steps below for effective roles synchronization:
In the Original Instance:
Open the settings of the role you want to synchronize.
Copy role ID in the upper right corner.
In the Second Instance:
Navigate to Users & Permissions, switch to the Roles tab and click Add Custom Role.
Enter role name and set its permissions.
Click on the ID field in the upper right corner to make it editable.
Paste the role ID copied from the first instance.
Finally, click Create role.
Contrary to data sources, role IDs can be modified for existing roles. This allows assigning custom IDs to built-in roles like Admin, User, and Editor.
However, caution is advised when editing role IDs. Incorrect modifications can lead to pages not displayed properly within the app. It is generally recommended to avoid altering role IDs unless absolutely necessary.
Once you have manually synchronized data sources and roles, you can proceed to importing your app using Git.
To do so, follow the steps below:
Upon app creation, choose the Import from Git option in the Create new menu.
Enter the Git repository URL.
Next, copy the SSH key suggested by UI Bakery and create a new key in the Deploy keys settings of your Git provider. For GitHub, follow the steps below:
Open your repository settings and open the Deploy keys tab.
Here, click Add deploy key and paste the SSH key you've copied before.
Select the Allow write access checkbox and then click Add key.
Next, go back to UI Bakery and click Import app.
Now the app is connected to the Git repository and can be pulled and deployed when new changes are available.
When developing a new feature, make sure to follow these guidelines.
Once the feature is deployed on the current instance and ready to be rolled out to another instance, pull the changes from the Git repository. If new user roles or data sources have been added to your instance, ensure they are in sync across all instances.