On-Premise Deployment

Reference Documentation for on-premise deployment of Servoy Cloud applications

Overview

Servoy Cloud Applications have the flexibility to be deployed within your on-premise infrastructure. This can be done based on environment properties and using any of the following methods:

  • Docker deployment

  • WAR file deployment

Docker deployment

1. CCC Configuration Parameters

Configure Docker pull commands by using your namespace-related parameters.

Look for placeholders in the commands marked as ${parameter-name} and replace them with the corresponding values

Command parameters

Command parameters are accessible via the Docker Information dialog within the Cloud Control Center. You can access this dialog from the following locations:

  • Current Package context menu in the Pipelines view

  • Artifacts tab in the Package Details

Parameter names:

  • namespace-name

  • region-name

  • docker-repo-name

AWS Parameters

Access AWS parameters through the Credentials menu in the Cloud Control Center, including:

  • AWS Access Key ID

  • AWS Secret Access Key

Remote Environment Token

To view remote environment metrics in Servoy Cloud, the Remote Environment token is required. This token connects to Servoy Cloud and synchronizes environment metrics like logs and performance data for analysis in the Cloud Control Center.

To obtain the Remote Environment token, navigate to the Credentials menu in the Cloud Control Center.

2. Pre-requisites

  • Docker

  • AWS CLI

3. Install requirements

Installation Commands

curl "https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/0.5.0/linux-amd64/docker-credential-ecr-login" -o docker-credential-ecr-login

chmod +x docker-credential-ecr-login

sudo mv docker-credential-ecr-login /usr/local/bin/

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

unzip awscliv2.zip

sudo ./aws/install

aws configure

4. Configuration settings

Linux and Mac

vi ~/.docker/config.json

Windows

code .docker/config.json

General

Edit the config.json file, adding other configuration settings:

{
 #OTHER CONFIG SETTINGS
    "credHelpers": {
        "428597928572.dkr.ecr.${region-name}.amazonaws.com": "ecr-login"
    }
}

5. Pull docker image

To pull the Docker image, execute the following commands:

For Authentication

Generate a login password for Amazon ECR:

aws ecr --region  get-login-password | docker login --password-stdin --username AWS 428597928572.dkr.ecr..amazonaws.com

Pull Command

Fetch the specific Docker image using:

docker pull 428597928572.dkr.ecr..amazonaws.com//:latest

6. Running the docker image

To run the docker image the basic call is:

docker run -d --name servoy  -p 8080:8080 -e "ENVIRONMENT=onprem" -e "DB_POSTGRES_PASSWORD=${MY_POSTGRES_PASSWORD}" -e "DB_POSTGRES_SERVER=${MY_POSTGRES_URL}" -e "DB_POSTGRES_PORT=5432" -v "${PATH_TO_STORE_SERVOY_FILES}:/usr/local/servoy" 428597928572.dkr.ecr.${region-name}.amazonaws.com/${namespace-name}/${docker-repo-name}:latest

To connect to Servoy Cloud, Remote Environments must have the following properties: -e "ENVIRONMENT=onprem" -e "REMOTE_ENVIRONMENT_TOKEN=${token from Credentials section in CCC}"

In this sample it is running connected to a postgres server, the following -e options can be used when you are starting your docker container:

Docker Env PropertyDefault valueDescription

TOMCAT_USERNAME

admin

Tomcat username

TOMCAT_PASSWORD

Test123456789

Tomcat Password

JAVA_XMS

256m

Java min memory setting for tomcat

JAVA_XMX

3g

Java max memory setting for tomcat

CERTIFICATE_NAME

Certificate file name to use tomcat with SSL

CERTIFICATE_PASS

Certificate file password to load the certificate file

DB_POSTGRES_SERVER

dev-postgresql-service

Postgres Server URL

DB_POSTGRES_USERNAME

postgres

Postgres Username

DB_POSTGRES_PASSWORD

Postgres Password

DB_POSTGRES_PORT

5432

Postgres Port

DB_MSSQL_SERVER

dev-mssql-service

MSSQL Server URL

DB_MSSQL_USERNAME

sa

MSSQL Username

DB_MSSQL_PASSWORD

MSSQL Password

DB_MSSQL_PORT

1433

MSSQL Port

DB_MYSQL_SERVER

dev-mysql-service

MYSQL Server URL

DB_MYSQL_USERNAME

root

MYSQL Username

DB_MYSQL_PASSWORD

MYSQL Password

DB_MYSQL_PORT

3306

MYSQL Port

SERVOY_TESTING_MODE

false

Property to enable servoy E2E testing

REMOTE_ENVIRONMENT_TOKEN

Remote Environment Token, accessible from Credentials menu in CCC

TIMEZONE

Etc/UTC

Set the timezone of the Servoy Application Server

When using CERTIFICATE_NAME & CERTIFICATE_PASS you should create an extra volume map the certificate folder -v ${MY_CERTS}:/usr/local/servoy-certificate

Last updated