Difference between revisions of "Configuration Options"

From Telstar Wiki
Jump to navigation Jump to search
(Created page with "# Using Docker Compose __*** Please note TELSTAR as an application is still under development and subject to change. ***__ The following docker-compose yaml file can be used to manage the TELSTAR application and associated *mongo* database. version: "3.8" services: telstar-01: container_name: "telstar-server" image: "johnnewcombe/telstar" command: "server --port 6512 --install" # install to the primary database ports:...")
 
Tag: Manual revert
 
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
# Using Docker Compose
== Container Types ==


__*** Please note TELSTAR as an application is still under development and subject to change. ***__
The same Telstar image is used to host different container types, for example a the Telstar image can be used to create videotex server container and an API server container. The first argument passed to the container determines the specific configuration of the container. Currently the container supports the following values;


The following docker-compose yaml file can be used to manage the TELSTAR application and associated *mongo* database.


    server          Creates the standard videotex server container
    api            Creates an API server allowing the videotex system to be managed using a restful API.


    version: "3.8"
For example the following Docker run command starts a videotex server listening on port 6502 (see TCP Port below) with an initial set of example system pages.
    services:
      telstar-01:
        container_name: "telstar-server"
        image: "johnnewcombe/telstar"
        command: "server --port 6512 --install" # install to the primary database
        ports:
          - target: 6512
            published: 6512
        networks:
          - telstar-network
        volumes:
          - type: volume
          source: telstar-volume
          target: /opt/telstar/volume
        depends_on:
          - mongodb
        environment:
          - TELSTAR_SERVER=AUSTEN
      mongodb:
        container_name: "telstar-mongo"
        image: "mongo"
        ports:
          - target: 27017
            published: 27017
        networks:
          telstar-network:
        environment:
          - MONGO_INITDB_ROOT_USERNAME=mongoadmin
          - MONGO_INITDB_ROOT_PASSWORD=secret
    networks:
      telstar-network:
        name: telstar-network
    volumes:
      telstar-volume:
        name: telstar-volume


The following docker-compose file starts three TELSTAR servers all talking to the same database server, however the third TELSTAR server (telstar-server-03) uses the *secondary* database. This *secondary* database collection is typically used to test content before publishing it to the primary database collection. In addition the TELSTAR API is launced as a separate container.
    docker run --rm -d --name telstar-server --network telstar-network -p 6512:6512 -v telstar-volume:/opt/telstar/volume johnnewcombe/telstar server --port=6502 --init
   
== TCP Port Number ==


     version: "3.8"
The ''--port'' argument must be specified for the Telstar server and API containers. The port parameter specifies the TCP port number that the server or api application should be listening on. This can be any suitable port.
    services:
 
      telstar-01:
== Optional Arguments ==
        container_name: "telstar-server-01"
 
        build: .
The following is a list of optional arguments for both the Telstar server and Telstar API containers.
        image: "johnnewcombe/telstar"
 
        command: "server --port 6512 --install" # install to the primary database
     --init                              This will create/recreate the basic telstar content.
        ports:
 
          - target: 6512
The ''--init'' parameter, when starting a videotex server will create/recreate the standard telstar system pages along with some example gateway pages. If this parameter is used when starting an API server, it will create an API user using the userid '''"2222222222"''' and password '''"1234"'''.
            published: 6512
 
        networks:
== Environment Variables ==
          - telstar-network
 
        volumes:
The full description of each of these can be found below.
          - type: volume
 
          source: telstar-volume
    Name                                  | Default
          target: /opt/telstar/volume
    -----------------------------------------------------------------------------------------
        depends_on:
    TELSTAR_API_HOST                      | 0.0.0.0
          - mongodb
    TELSTAR_PAD_HOST                      | 0.0.0.0
        environment:
    TELSTAR_PAD_DLE                        | 0x10
          - TELSTAR_SERVER=AUSTEN
    TELSTAR_SERVER_HOST                    | 0.0.0.0
      telstar-02:
    TELSTAR_SERVER_DISPLAY_NAME            | DUKE
        container_name: "telstar-server-02"
    TELSTAR_HIDE_PAGE_ID                  | FALSE
        image: "johnnewcombe/telstar"
    TELSTAR_HIDE_COST                      | FALSE
        command: "server --port 6513"
    TELSTAR_DISABLE_VERTICAL_ROLLOVER      | TRUE
        ports:
    TELSTAR_EDITTF_TITLE_ROWS              | 4
          - target: 6513
    TELSTAR_DBCON                          | mongodb://mongoadmin:secret@telstar-mongo:27017
            published: 6513
    TELSTAR_DBCOLLECTION                  | SECONDARY
        networks:
    TELSTAR_START_PAGE                    | 99
          - telstar-network
    TELSTAR_LOGIN_PAGE                    | 990
        volumes:
    TELSTAR_MAIN_INDEX_PAGE                | 0
          - type: volume
    TELSTAR_REQUIRES_AUTHENTICATION        | FALSE
            source: telstar-volume
    TELSTAR_ROOT_USER_ID                  | 0
            target: /opt/telstar/volume
    TELSTAR_PARITY                        | FALSE
        depends_on:
    TELSTAR_VOLUME_DIRECTORY              | /opt/telstar/volume/
          - mongodb
    TELSTAR_DEFAULT_NAV_MESSAGE            | [B][n][Y]Select item or[W]*page# : [_+]
        environment:
    TELSTAR_DEFAULT_PAGE_NOT_FOUND_MESSAGE | [B][n][Y]Page not Found :[W]
          - TELSTAR_SERVER=ELIOT
    TELSTAR_DEFAULT_HEADER_TEXT            | [G]T[R]E[C]L[B]S[W]T[M]A[Y]R
      telstar-03:
 
        container_name: "telstar-server-03"
The default settings for the settings above are stored in the ''telstar.yaml'' configuration file which is stored in the ''/opt/telstar'' directory of the respective container. It is recommended that Telstar is run in a Docker container in which case the above environment variables should be used to override the standard configuration file.
        image: "johnnewcombe/telstar"
 
        command: "server --port 6514 --install" # install to the secondary database
=== TELSTAR_API_HOST ===
        ports:
 
          - target: 6514
This is for future use and can be ignored the default setting is:
            published: 6514
 
        networks:
    0.0.0.0
          - telstar-network
 
        volumes:
=== TELSTAR_PAD_HOST ===
          - type: volume
 
            source: telstar-volume
This is for future use and can be ignored the default setting is:
            target: /opt/telstar/volume
 
        depends_on:
    0.0.0.0
          - mongodb
 
        environment:
=== TELSTAR_PAD_DLE ===
          - TELSTAR_SERVER=HARDY
 
          - TELSTAR_DBCOLLECTION=SECONDARY
This is the Data Link Escape character used to exit a Gateway connection, the default value is:
      telstar-api:
 
        container_name: "telstar-api"
    0x10 (Ctrl P)
        image: "johnnewcombe/telstar"
 
        command: "api --port 8001 --init"
=== TELSTAR_SERVER_HOST ===
        ports:
 
          - target: 8001
This is for future use and can be ignored the default setting is:
            published: 8001
 
        networks:
    0.0.0.0
          - telstar-network
 
        depends_on:
=== TELSTAR_SERVER_DISPLAY_NAME ===
          - mongodb
 
     environment:
This is the display name of the viewdata server and is used in place of the [SERVER] placeholder tag, see [[Frames]] for more details on placeholder tags. The default value is:
      - TELSTAR_API_USERID=0 # User 0 has access to all pages
 
      - TELSTAR_API_PASSWORD=telstarapisecret
    DUKE
      - TELSTAR_COOKIE_SECRET=<place yout secret here> # define this for yourself and keep it secret!
   
      mongodb:
=== TELSTAR_HIDE_PAGE_ID ===
        container_name: "telstar-mongo"
 
        image: "mongo"
Setting this value to true will hide the Page ID displayed in the top line header of the frame. The default value is:
        ports:
 
          - target: 27017
    FALSE
            published: 27017
 
        networks:
=== TELSTAR_HIDE_COST ===
          telstar-network:
 
        environment:
Setting this value to true will hide the frame cost displayed in the top line header of the frame. The default value is:
          - MONGO_INITDB_ROOT_USERNAME=mongoadmin
 
          - MONGO_INITDB_ROOT_PASSWORD=secret
    FALSE
     networks:
 
      telstar-network:
=== TELSTAR_DISABLE_VERTICAL_ROLLOVER ===
        name: telstar-network
 
     volumes:
Setting this value to true will enable Vertical Rollover. The default value is:
      telstar-volume:
 
        name: telstar-volume
    TRUE
 
Vertical Rollover is used as a means for Telstar to move the cursor to a point on the screen in the most efficient way possible. For example to get to the start of the bottom row, it may be quicker to send the commands HOME followed by VT. This would cause a vertical rollover to the bottom row. Not all clients currently support this correctly.
 
 
=== TELSTAR_EDITTF_TITLE_ROWS ===
 
The https://edit.tf frame editor can be used to create pages and titles. When used to create a title, the number of rows taken fron the edit.tf data can be specified with this variable. The default settings is:
 
    4
   
=== TELSTAR_DBCON ===
 
 
This is the database connection and points to a mongo Docker container on the Docker telstar-network, see [[Installing Telstar]]. The default value is:
 
    mongodb://mongoadmin:secret@telstar-mongo:27017
 
=== TELSTAR_DBCOLLECTION ===
 
The database is divided into two logical partitions, PRIMARY and SECONDARY. Typically PRIMARY would be used for a production system with SECONDARY being used for a test system. When adding pages to the database via the API, these would typically be send to the SECONDARY database, reviewed on a test system and then ''published'' to the PRIMARY database. The default value is:
 
    SECONDARY
 
=== TELSTAR_START_PAGE ===
 
The start page to be used by the system. This would typically be a welcome screen. The default value is:
 
    99
 
=== TELSTAR_LOGIN_PAGE ===
 
The login page to be used by the system. This would typically be a welcome screen set up as a response page. The default value is:
 
     990
 
=== TELSTAR_MAIN_INDEX_PAGE ===
 
The main index page to be used by the system. This would typically be the top level menu. The default value is:
 
    0
 
=== TELSTAR_REQUIRES_AUTHENTICATION ===
     
If set to true, the user is directed to the TELSTAR_LOGIN_PAGE, rather than the TELSTAR_START_PAGE. The default value is:
 
    FALSE
 
=== TELSTAR_ROOT_USER_ID ===
 
This is for future use and should be ignored. The Default value is:
 
    0
 
=== TELSTAR_PARITY ===
 
If set to true then 7bit Even Parity is invoked over the TCP connection. Typically this would not be required. The default value is:
 
    FALSE
 
=== TELSTAR_VOLUME_DIRECTORY ===
 
This is the folder within the container that is used for the Docker Volume. The default value is:
 
    /opt/telstar/volume/
 
=== TELSTAR_DEFAULT_NAV_MESSAGE ===
 
This is the default message to be used for navigation. This can be overridden on a frame by frame basis as required and can be specified using ''markup''.  See [[Frames]] for more details of this setting and details of ''markup'' text.
     [B][n][Y]Select item or[W]*page# : [_+]
 
=== TELSTAR_DEFAULT_PAGE_NOT_FOUND_MESSAGE ===
 
This is the default message to be used when a page is not found. This can be overridden on a frame by frame basis as required and can be specified using ''markup''.  See [[Frames]] for more details of this setting and details of ''markup'' text.
 
 
     [B][n][Y]Page not Found :[W]
 
=== TELSTAR_DEFAULT_HEADER_TEXT ===
 
This is the default top row header text for each frame. This can be overridden on a frame by frame basis as required and can be specified using ''markup''.  See [[Frames]] for more details of this setting and details of ''markup'' text.
 
    [G]T[R]E[C]L[B]S[W]T[M]A[Y]R

Latest revision as of 14:46, 16 May 2022

Container Types

The same Telstar image is used to host different container types, for example a the Telstar image can be used to create videotex server container and an API server container. The first argument passed to the container determines the specific configuration of the container. Currently the container supports the following values;


   server          Creates the standard videotex server container
   api             Creates an API server allowing the videotex system to be managed using a restful API.

For example the following Docker run command starts a videotex server listening on port 6502 (see TCP Port below) with an initial set of example system pages.

   docker run --rm -d --name telstar-server --network telstar-network -p 6512:6512 -v telstar-volume:/opt/telstar/volume johnnewcombe/telstar server --port=6502 --init
   

TCP Port Number

The --port argument must be specified for the Telstar server and API containers. The port parameter specifies the TCP port number that the server or api application should be listening on. This can be any suitable port.

Optional Arguments

The following is a list of optional arguments for both the Telstar server and Telstar API containers.

   --init                              This will create/recreate the basic telstar content.

The --init parameter, when starting a videotex server will create/recreate the standard telstar system pages along with some example gateway pages. If this parameter is used when starting an API server, it will create an API user using the userid "2222222222" and password "1234".

Environment Variables

The full description of each of these can be found below.

   Name                                   | Default
   -----------------------------------------------------------------------------------------
   TELSTAR_API_HOST                       | 0.0.0.0
   TELSTAR_PAD_HOST                       | 0.0.0.0
   TELSTAR_PAD_DLE                        | 0x10
   TELSTAR_SERVER_HOST                    | 0.0.0.0
   TELSTAR_SERVER_DISPLAY_NAME            | DUKE
   TELSTAR_HIDE_PAGE_ID                   | FALSE
   TELSTAR_HIDE_COST                      | FALSE
   TELSTAR_DISABLE_VERTICAL_ROLLOVER      | TRUE
   TELSTAR_EDITTF_TITLE_ROWS              | 4
   TELSTAR_DBCON                          | mongodb://mongoadmin:secret@telstar-mongo:27017
   TELSTAR_DBCOLLECTION                   | SECONDARY
   TELSTAR_START_PAGE                     | 99
   TELSTAR_LOGIN_PAGE                     | 990
   TELSTAR_MAIN_INDEX_PAGE                | 0
   TELSTAR_REQUIRES_AUTHENTICATION        | FALSE
   TELSTAR_ROOT_USER_ID                   | 0
   TELSTAR_PARITY                         | FALSE
   TELSTAR_VOLUME_DIRECTORY               | /opt/telstar/volume/
   TELSTAR_DEFAULT_NAV_MESSAGE            | [B][n][Y]Select item or[W]*page# : [_+]
   TELSTAR_DEFAULT_PAGE_NOT_FOUND_MESSAGE | [B][n][Y]Page not Found :[W]
   TELSTAR_DEFAULT_HEADER_TEXT            | [G]T[R]E[C]L[B]S[W]T[M]A[Y]R

The default settings for the settings above are stored in the telstar.yaml configuration file which is stored in the /opt/telstar directory of the respective container. It is recommended that Telstar is run in a Docker container in which case the above environment variables should be used to override the standard configuration file.

TELSTAR_API_HOST

This is for future use and can be ignored the default setting is:

   0.0.0.0

TELSTAR_PAD_HOST

This is for future use and can be ignored the default setting is:

   0.0.0.0

TELSTAR_PAD_DLE

This is the Data Link Escape character used to exit a Gateway connection, the default value is:

   0x10 (Ctrl P)

TELSTAR_SERVER_HOST

This is for future use and can be ignored the default setting is:

   0.0.0.0

TELSTAR_SERVER_DISPLAY_NAME

This is the display name of the viewdata server and is used in place of the [SERVER] placeholder tag, see Frames for more details on placeholder tags. The default value is:

   DUKE
   

TELSTAR_HIDE_PAGE_ID

Setting this value to true will hide the Page ID displayed in the top line header of the frame. The default value is:

   FALSE

TELSTAR_HIDE_COST

Setting this value to true will hide the frame cost displayed in the top line header of the frame. The default value is:

   FALSE

TELSTAR_DISABLE_VERTICAL_ROLLOVER

Setting this value to true will enable Vertical Rollover. The default value is:

   TRUE

Vertical Rollover is used as a means for Telstar to move the cursor to a point on the screen in the most efficient way possible. For example to get to the start of the bottom row, it may be quicker to send the commands HOME followed by VT. This would cause a vertical rollover to the bottom row. Not all clients currently support this correctly.


TELSTAR_EDITTF_TITLE_ROWS

The https://edit.tf frame editor can be used to create pages and titles. When used to create a title, the number of rows taken fron the edit.tf data can be specified with this variable. The default settings is:

   4
   

TELSTAR_DBCON

This is the database connection and points to a mongo Docker container on the Docker telstar-network, see Installing Telstar. The default value is:

   mongodb://mongoadmin:secret@telstar-mongo:27017

TELSTAR_DBCOLLECTION

The database is divided into two logical partitions, PRIMARY and SECONDARY. Typically PRIMARY would be used for a production system with SECONDARY being used for a test system. When adding pages to the database via the API, these would typically be send to the SECONDARY database, reviewed on a test system and then published to the PRIMARY database. The default value is:

   SECONDARY

TELSTAR_START_PAGE

The start page to be used by the system. This would typically be a welcome screen. The default value is:

   99

TELSTAR_LOGIN_PAGE

The login page to be used by the system. This would typically be a welcome screen set up as a response page. The default value is:

   990

TELSTAR_MAIN_INDEX_PAGE

The main index page to be used by the system. This would typically be the top level menu. The default value is:

   0

TELSTAR_REQUIRES_AUTHENTICATION

If set to true, the user is directed to the TELSTAR_LOGIN_PAGE, rather than the TELSTAR_START_PAGE. The default value is:

   FALSE

TELSTAR_ROOT_USER_ID

This is for future use and should be ignored. The Default value is:

   0

TELSTAR_PARITY

If set to true then 7bit Even Parity is invoked over the TCP connection. Typically this would not be required. The default value is:

   FALSE

TELSTAR_VOLUME_DIRECTORY

This is the folder within the container that is used for the Docker Volume. The default value is:

   /opt/telstar/volume/

TELSTAR_DEFAULT_NAV_MESSAGE

This is the default message to be used for navigation. This can be overridden on a frame by frame basis as required and can be specified using markup. See Frames for more details of this setting and details of markup text.

   [B][n][Y]Select item or[W]*page# : [_+]

TELSTAR_DEFAULT_PAGE_NOT_FOUND_MESSAGE

This is the default message to be used when a page is not found. This can be overridden on a frame by frame basis as required and can be specified using markup. See Frames for more details of this setting and details of markup text.


   [B][n][Y]Page not Found :[W]

TELSTAR_DEFAULT_HEADER_TEXT

This is the default top row header text for each frame. This can be overridden on a frame by frame basis as required and can be specified using markup. See Frames for more details of this setting and details of markup text.

   [G]T[R]E[C]L[B]S[W]T[M]A[Y]R