Migrate to Servoy Cloud
This guide will walk you through how to get started with Servoy Cloud
Overview
To migrate your existing workspace to Servoy Cloud we should set up some things to get everything working. This guide will explain how to migrate your repository and set up folder structure and properties file contents to have a successful migration.
Key Points Covered
Repository migration to Servoy Cloud
jenkins-custom folder
servoy.properties.template file
Migrate Existing GIT Repository
To migrate your existing GIT repository to Servoy Cloud, you must first have a namespace. If you do not have a namespace, follow these steps to create one.
Step 1: Get clone URL of Servoy Cloud Repository
Log into Cloud Control Center and navigate to Repositories.
Click on the Clone button to get the clone URL of the Servoy Cloud Repository
Step 2: Migrate GIT Repository
To migrate a repository with the name origin
to the Servoy Cloud repository, open a command line and run the following:
Add the new repo location with the clone URL from Servoy Cloud
Then push the workspace content to the new location. This will prompt a credentials dialog, please use the Servoy Cloud login credentials.
Run this command for each branch of the repository you are migrating to Servoy Cloud.
Finally remove the old one
Your Servoy Cloud Repository is now set up and you can proceed with setting up your folder and file structure.
jenkins-custom folder
Folder definition
When first migrating to Servoy Cloud, it is required to have a folder named jenkins-custom
This folder is where you place and define the custom settings needed to build your project on Servoy Cloud. It can contain your custom plugins/beans/driver etc. and your servoy.properties.template
file. It will also contain your TiNG test scripts (E2E) that are needed to run for this build.
Folder location
The jenkins-custom folder can be located anywhere in your workspace, most logic location would be in the root of your workspace.
When having multiple jenkins-custom folders, the first one will always be selected.
Folder structure
The jenkins-custom
folder should have the following structure:
Structure notes
File / Folder | Notes |
---|---|
servoy.properties.template | File containing all params from |
custom-jars | Structure will be copied to the Servoy application server on build time. Please note files that exist will be overwritten. |
e2e-test-scripts/cypress.config.json | File containing custom settings that are used when running the E2E tests. |
web.xml | Custom web.xml that can be used for generating the war file |
context.xml | Custom context.xml that can be used for generating the war file |
log4j.xml | Custom log4j.xml that can be used for generating the war file |
rewrite.config |
servoy.properties.template file
File definition
The servoy.properties.template
file is the template file used to create a servoy.properties
file. This template file contains all the properties needed to build your project on Servoy Cloud.
Database setup
Servoy Cloud will auto create the databases based on the properties and params defined in the servoy.properties.template file.
Therefore, the file should contain server properties with some corresponding params for the DB urls.
PARAM | |
---|---|
DB_POSTGRES_SERVER | |
DB_POSTGRES_USERNAME | |
DB_POSTGRES_PASSWORD | |
DB_POSTGRES_PORT | |
DB_MSSQL_SERVER | |
DB_MSSQL_USERNAME | |
DB_MSSQL_PASSWORD | |
DB_MSSQL_PORT | |
DB_MYSQL_SERVER | |
DB_MYSQL_USERNAME | |
DB_MYSQL_PASSWORD | |
DB_MYSQL_PORT | |
DB_NAME_SUFFIX |
This translates to the following jenkins.properties.template sample.
If you have defined several database servers in your Servoy Developer, the file must contain the set of properties for each database server.
You must also include the property ServerManager.numberOfServers
specifying the number of servers defined.
Template file basic sample
The sample below has 2 database servers defined: repository_server and example_data.
Please note there is a difference in serverName
and URL
for each set of properties.
Special handling properties
Some properties in the servoy.properties.template
are handled differently:
Normally you would not want to set any of these properties.
Servoy Property name | Handled in servoy cloud |
---|---|
servoy.FileServerService.defaultFolder | When not in the servoy.properties.template the value will be set to: servoy.FileServerService.defaultFolder=${SERVOY_DEFAULT_UPLOAD_LOCATION} |
directory.jasper.report | When not in the servoy.properties.template the value will be set to: directory.jasper.report=${SERVOY_DEFAULT_UPLOAD_LOCATION}/reports |
directories.jasper.extra | When not in the servoy.properties.template the value will be set to: directory.jasper.extra=${SERVOY_DEFAULT_UPLOAD_LOCATION}/reports |
servoy.server.start.rmi=true | When this is set in the property file smartclient properties will be set in to match Servoy Cloud Configuration |
servoy.log.clientstats | When not in the servoy.properites.template the value will be set to: servoy.log.clientstats=false |
server.x.connectionValidationType=1 | All DB Server connectionValidationTypes will be updated to connectionValidationType=3 |
servoy.ngclient.testingMode | This property will be overwritten to false and can only be used in combination with E2E |
servoy.jnlpCodebaseOverride | This property will be overwritten to servoy.jnlpCodebaseOverride=${SERVOY_JNLP_CODEBASE} |
amqpbroadcaster.virtualhost | This property will be overwritten to amqpbroadcaster.virtualhost=${AMQP_VHOST} |
amqpbroadcaster.tlsprotocols | This property will be overwritten to amqpbroadcaster.tlsprotocols=${AMQP_TLSPROTOCOLS} |
amqpbroadcaster.port | This property will be overwritten to amqpbroadcaster.port=${AMQP_PORT} |
amqpbroadcaster.password | This property will be overwritten to amqpbroadcaster.password=${AMQP_PASSWORD} |
amqpbroadcaster.username | This property will be overwritten to amqpbroadcaster.username=${AMQP_USERNAME} |
amqpbroadcaster.hostname | This property will be overwritten to amqpbroadcaster.hostname=${AMQP_HOSTNAME} |
Note: SERVOY_DEFAULT_UPLOAD_LOCATION
will resolve to a persistent storage in Servoy Cloud. This folder is the sole persistent storage.
In the servoy.properties.template file you can also use CUSTOM_ properties.
To create custom properties:
Create the custom property in Cloud Control Center
Place the full key in the
servoy.properties.template
like ${CUSTOM_MY_PROP}.
To ensure dynamic value resolution within the servoy.properties.template
, use placeholders in the format of ##key##
or ${key}
. These placeholders are automatically resolved with their corresponding values when generating the WAR file, providing a flexible way to incorporate variable data into your application configuration.
Last updated