Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The database connection is configured after initial start of the JOC Cockpit container.

When using the H2® embedded database then you can skip the following chapters as this database runs in pre-configured mode inside the container.

Check the JDBC Driver

JS7 ships with a number of JDBC Drivers.

  • For use with H2®, MariaDB®, MySQL®, Oracle®, PostgreSQL® JDBC Drivers are included with JS7.
    • For details about JDBC Driver versions see JS7 - Database.
    • Should you have good reason to use a different version of a JDBC Driver then you can apply the JDBC Driver version of your choice.
  • For use with Microsoft SQL Server®
    • it is required to download the JDBC Driver as it cannot be bundled with open source software due to license conflicts.
  • You can download a JDBC Driver from the vendor's site and store the resulting *.jar file(s) with the following location:
    • Location in the container: /var/sos-berlin.com/js7/joc/resources/joc/lib
    • Consider to access this directory from the volume that is mounted when running the container, e.g. from a local folder /home/sos/js7/js7-joc-primary/config/lib.
    • Consider the JS7 - Database article for details about the proceeding.

Configure the Database Connection

...

Code Block
languagebash
titleAdd Example how to add a Database Schema and Account for MySQL
linenumberstrue
# add database
CREATE DATABASE js7 CHARACTER SET utf8 COLLATE utf8_general_ci;
# add account
CREATE USER 'jobscheduler'@'%' IDENTIFIED BY 'jobscheduler';
GRANT ALL ON js7.* TO 'jobscheduler'@'%';

...

By default JOC Cockpit checks on startup if database objects exist and otherwise creates them on-the-fly.

However, users can force execution of a script to create required objects in the database and to populate database tables.creation of database objects by executing the following script:

Code Block
languagebash
titleCreate Database Objects
linenumberstrue
# create database objects
 docker exec -ti js7-joc-primary /bin/sh -c /opt/sos-berlin.com/js7/joc/install/joc_install_tables.sh

...

  • docker exec -ti is the command that connects to the JOC Cockpit container js7-joc-primary.
  • js7-joc-primary is the name of the JOC Cockpit container as specified with the above docker run command.
  • /bin/sh -c runs a shell inside the container and executes a script to install and to populate database objects required for operation of JOC Cockpit.
  • Note that there is no harm in re-running the script a number of times as it will not remove existing data from the database.

Log Files

Access to log files is essential to identify problems during installation and operation of containers.

...

Performing Initial Operation

Info

For initial operation, the JOC Cockpit is used to make Controller instances and Agent instances known to your job scheduling environment.

Find general information about initial operation from the following article:

Find below additional information for initial operation with containers.

...

  • This dialog allows to specify of the Primary Controller instance, Secondary Controller instance and .Agent Cluster Watcher.
    • You can add a title for each Controller instance that will become visible with the JS7 - Dashboard View.
    • Primary and Secondary Controller instances require a URL as seen from JOC Cockpit.
    • In addition, each Controller instance can be added a URL from which it is accessible by its partner cluster member.
      • Typically the URL used between Controller instances is the same as the URL used by JOC Cockpit.
      • Should you operate e.g. a proxy server between Primary and Secondary Controller instances then the URL for a given Controller instance to access its partner cluster member might be different from the URL used by JOC Cockpit.
  • The URL of the Controller instance has to match the hostname and port that the Controller instance is operated for.
    • Should you use a Docker network then all containers will "see" each other and all inside container ports are accessible within the network.
      • In the above example a Docker network js7 was used and the Primary Controller container was started with the hostname js7-controller-primary. The Secondary Controller was started with the hostname js7-controller-secondary.
      • The port 4444 is the inside HTTP port of the Controller instance that is visible in the Docker network.
    • Should you not use a Docker network then it is up to you how decide how to map hostnames:
      • The Controller container could be accessible from the Docker host, i.e. you would specify the hostname of the Docker host. 
      • The outside HTTP port of the Controller instane instance has to be used that was specified with the --publish option when starting the Controller container.
  • The Agent Cluster Watcher is required for operation of a Controller cluster. The Agent is contacted by Controller cluster members to verify the cluster status should no direct connection between Controller cluster members be available.
    • Note that the example above makes use of an Agent that by default is configured for use with HTTP connections. 
    • For use of the Agent's hostname and port the same applies as for Controller instances.

...

Configure the JOC Cockpit

Note that it is not necesary required to configure the JOC Cockpit - it runs out-of-the-box. The default configuration specifies that:

...