🔜AWS Marketplace Usage Instructions

This page serves as a comprehensive guide for setting up and installing Retable, a Unix-based application for data management. It outlines the system prerequisites, and installation steps for modules.

Contents

Introduction

Retable is designed to operate exclusively in UNIX environments. All commands provided here have been tested on Unix-based EC2 instances, regardless of the specific OS chosen.

The Retable application comprises three main modules: API, UI, and Socket. Ensure all prerequisites are met before starting the application. Note that the API module is resource-intensive and requires the most allocation. Therefore, allocate a larger portion of your resources to the API module. The sequence for starting the modules should begin with the API, which depends on PostgreSQL and Redis connections.

Prerequisites

Docker

Ensure Docker is installed on your machine. You can download it from the Docker website.

Database

A running PostgreSQL Database (minimum version 13) is required. Based on the Retable App's API module usage, a minimum of 8 GB RAM and 2 CPU cores is recommended. You may need to increase the server specifications if necessary. The app uses two databases: one for meta-information and the other for storing table data.

Example database creation commands:

sqlCopy codeCREATE DATABASE rtbl_meta;
CREATE DATABASE rtbl_data;

When the API module starts, it creates an admin user if one does not already exist. Set the admin email and password in the API environment file. This admin information is used to access the app and invite other users.

Specify database connection information (user, password, database names, port, etc.) in the environment file. More details are available in the API Module Environment File Section.

The API module requires TCP connection to the database server. Configure your security group to allow traffic between the API and the Database on the specified port.

Redis

A running Redis Server (minimum version 6) is needed for collaborative functionalities and scheduled automations.

Specify the connection information in the environment file. More details are available in the API Module Environment File Section.

The API module needs TCP connection to the Redis server. Configure your security group to allow traffic between the API and Redis on the specified port.

Attachments

To store attachments, set up an AWS S3 Bucket. The API module requires the Bucket Region, Access Key, and Bucket Name, which should be configured in the API environment file. Ensure proper access permissions are set for the bucket. More information is available in the API Module Environment File Section.

The attachment limit per file is 100MB. If you exceed this limit, please contact us.

E-Mails

An SMTP server is necessary for sending emails, which is crucial for inviting users to your app. Ensure that the SMTP server details are correctly configured.

Installation

  1. Prepare your database: Ensure your PostgreSQL database is set up and ready. More information.

  2. Create the environment file (app_api_env):

    • Create a file named app_api_env in your project directory.

    • Add the required environment variables in the format KEY=VALUE, each on a new line.

  3. Obtain the Docker image:

    • Access the Amazon ECR repository XXX/retable/rtbl-api.

    • Authenticate Docker to your ECR registry following AWS ECR documentation.

  4. Run the Docker container:

    • Navigate to the directory where your app_api_env file is located.

    • Replace <image_tag> with the desired Docker image tag.

    • Execute the command:

    docker run --env-file ./app_api_env -p 4000:4000 XXX/retable/rtbl-api:<image_tag>
    • This command sets up and runs a containerized application with the necessary environment variables and port configurations. Make sure to replace <image_tag> with the actual tag of the image you want to deploy.

Api Module Environment File:

KeyDescription

ADMIN_USER_EMAIL

Email address of the admin user. This user will be created automatically when Product run

ADMIN_USER_PASSWORD

Password of the admin user

DB_HOST

Hostname of the Postgres Database Server

DB_PORT

Port nubmer of the Database Server

DB_USER

Username of the Database User

DB_PWD

Password of the Database User

DB_SSL

[will be filled]

REDIS_HOST

Hostname of the Redis Server

REDIS_PORT

Port number of the Redis Server

REDIS_PASSWORD

Password of the Redis Server

DB_SSL_CERT_PATH

[will be filled]

BASE_URL

Base URL to reach the whole application (ex: https://yourdomain.retable.io

SHARE_URL

[will be filled]

AWS_BUCKET_UID

Your AWS Access Key (change this naming)

AWS_BUCKET_PWD

Your AWS Secret Access Key (change this naming)

AWS_BUCKET_REGION

Your AWS S3 Bucket Region (ex: eu-west-1)

AWS_BUCKET_S3

Your AWS S3 Bucket name (change this naming)

META_BASE_URL

Base Endpoint to reach the API

Example format of the environment file:

ADMIN_USER_EMAIL=admin@retable.io
ADMIN_USER_PASSWORD=!.!-RetableRocks-!.!

DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PWD=super_secret_pwd
DB_SSL=true
DB_SSL_CERT_PATH=eu-west-2-bundle.pem

REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=super_secret_pwd2

BASE_URL=https:\/\/retable.yourdomain.io
SHARE_URL=https:\/\/retable.yourdomaion.io\/v1\/go

AWS_BUCKET_UID=bucket_uid
AWS_BUCKET_PWD=bucket_pwd
AWS_BUCKET_REGION=eu-west-1
AWS_BUCKET_S3=retable_aws_s3_bucket

META_BASE_URL=https:\/\/retable-api.yourdomaion.io
  • Pull Api module docker image with this command:

docker pull XXX/retable/rtbl-api:<image_tag>
  • To run the the Image

docker run --env-file ./app_env -p 4000:4000 XXX/retable/rtbl-api:<image_tag>

Socket Module

  1. Ensure your Redis is ready:

  2. Create the environment file (app_socket_env):

    • Create a file named app_socket_env in your project directory.

    • Add the required environment variables to this file. Each variable should be on a new line in the format KEY=VALUE.

  3. Obtain the Docker image:

    • Make sure you have access to the Amazon ECR repository XXX/retable/rtbl-socket.

    • Authenticate Docker to your ECR registry. This typically involves running a command to get a temporary login token, which you can find in the AWS ECR documentation.

  4. Run the Docker container:

    • Open a terminal and navigate to the directory where your app_socket_env file is located.

    • Replace <image_tag> with the desired tag of the Docker image you want to run.

    • Execute the command:

    docker run --env-file ./app_api_env -p 4000:4000 XXX/retable/rtbl-socket:<image_tag>
    • This command sets up and runs a containerized application with the necessary environment variables and port configurations. Make sure to replace <image_tag> with the actual tag of the image you want to deploy.

Socket Module Environment File:

KeyDescription

REDIS_HOST

Hostname of the Redis

REDIS_PORT

Port number of the Redis Server

REDIS_PASSWORD

Password of the Redis Server

PORT

Port of your Socket Http & Websocket Server

META_API_BASE_ENDPOINT

Base URL of your Api Module

Example format of the environment file:

REDIS_HOST=myredis.host
REDIS_PORT=6379
REDIS_PASSWORD=redisserverpass

PORT=4500

META_API_BASE_ENDPOINT=https:\/\/retable-api.yourdomaion.io

UI

  1. Ensure your Api and Socket is ready:

  2. Create the environment file (app_ui_env):

    • Create a file named app_ui_env in your project directory.

    • Add the required environment variables to this file. Each variable should be on a new line in the format KEY=VALUE.

  3. Obtain the Docker image:

    • Access the Amazon ECR repository XXX/retable/rtbl-ui.

    • Authenticate Docker to your ECR registry following AWS ECR documentation.

  4. Run the Docker container:

    • Navigate to the directory where your app_ui_env file is located.

    • Replace <image_tag> with the desired Docker image tag.

    • Execute the command:

    docker run --env-file ./app_api_env -p 4000:4000 XXX/retable/rtbl-ui:<image_tag>
    • This command sets up and runs a containerized application with the necessary environment variables and port configurations. Make sure to replace <image_tag> with the actual tag of the image you want to deploy.

UI Module Environment File:

KeyDescription

REACT_APP_API_PATH

Api Module Base Enpdoint

REACT_APP_BASE_URL

Base URL that you access your application

REACT_APP_SHARE_URL

Same with the REACT_APP_BASE_URL

REACT_APP_SOCKET_PATH

Socket Module Base Endpoint

Example format of the environment file:

REACT_APP_API_PATH=https:\/\/retable-api.yourdomaion.io\/v1
REACT_APP_BASE_URL=https:\/\/yourdomain.io
REACT_APP_SHARE_URL=https:\/\/yourdomain.io
REACT_APP_SOCKET_PATH=https:\/\/retable-socket.yourdomain.io

Last updated

© 2023 Retable Limited | All product and company names and logos are trademarks of their respective owners