Page History
...
- JOC Cockpit comes preinstalled from a Docker® container image.
- Before running the JOC Cockpit container the following requirements should be met:
- Either the embedded H2® database can be used or an external database should be made available and accessible - see the JS7 - Database article for more information.
- Volumes are created for persistent JOC Cockpit configuration data and log files.
- A container network or similar mechanism is made available to enable network access between JOC Cockpit, Controller instance(s) and Agents.
- Initial operation for JOC Cockpit includes:
- registering the Controller instance(s) and Agents that are used in the job scheduling environment.
- optionally registering a JS7 Controller cluster.
...
This video explains the installation of JOC Cockpit for Docker® containersfrom container images.
Widget Connector | ||
---|---|---|
|
...
--network
The above example makes use of a Docker container network - created, for example, using thedocker network create js7
command - to allow network sharing between containers. Note that any inside ports used by Docker containers are visible within a Docker container network. Therefore a JOC a JOC Cockpit instance running for the inside port4446
can be accessed with the container's hostname and the same port within the Docker container network.--publish
The JOC Cockpit has been configured to listen to the HTTP port4446
. An outside port of the Docker container's host is mapped to the JOC the JOC Cockpit inside HTTP port. This mapping is required to allow direct access to the JOC the JOC Cockpit user interface from its outside port .--env=RUN_JS_JAVA_OPTIONS
This allows any Java options to be injected into the JOC Cockpit container. Preferably this is used to specify memory requirements of the JOC Cockpit, for example, with-Xmx256m
. For details see JS7 - FAQ - Which Java Options are recommended--env=RUN_JS_USER_ID
Inside the container the JOC Cockpit is running for thejobscheduler
user account. In order to access, for example, log files created by the JOC Cockpit, which are mounted to the Docker container's host, it is recommended that users map the account that starts the container to thejobscheduler
account inside the container. TheRUN_JS_USER_ID
environment variable accepts the User ID and Group ID of the account that will be mapped. The example above makes use of the current user, for details see JS7 - Running Containers for User Accounts.--mount
The following volume mounts are suggested:config
: The configuration folder allows specification of individual settings for JOC Cockpit operation - see the sections below and the JS7 - JOC Cockpit Configuration Items article. This includes specifying the connection to the JS7 - Database. In addition users can store their versions of the following files in the volume for the configuration directory.hibernate.cfg.xml
: used for the database connection, see next section.joc.properties
: holds general settings, see JS7 - JOC Cockpit Configuration Items.log4j2.xml
: log configuration, see JS7 - Logging.start.ini
: Jetty start-up configuration, see JS7 - JOC Cockpit Configuration Items.*.p12
: keystore and truststore files for JS7 - JOC Cockpit HTTPS Connections.
logs
: In order to make JOC Cockpit log files persistent they have to be written to a volume that is mounted for the container. Users are free to adjust the volume name from thesrc
attribute. However, the value of thedst
attribute should not be changed as it reflects the directory hierarchy inside the container.Docker offers Containers offer a number of ways of mounting or binding volumes to containers including, for example, creation of local directories and binding them to volumes like this:
Code Block language bash title Example how to create Docker volumes linenumbers true # example to map volumes to directories on the Dockercontainer's host prior to running the JOC Cockpit container mkdir -p /home/sos/js7/js7-joc-primary/config /home/sos/js7/js7-joc-primary/logs docker volume create --driver local --opt o=bind --opt type=none --opt device="/home/sos/js7/js7-joc-primary/config" js7-joc-primary-config docker volume create --driver local --opt o=bind --opt type=none --opt device="/home/sos/js7/js7-joc-primary/logs" js7-joc-primary-logs
There are alternative ways of achieving this. As a result users have a access to the directories
/var/sos-berlin.com/js7/joc/resources/joc
and/var/log/sos-berlin.com/js7/joc
inside the container and data in both locations should be persistent. If volumes are not created before running the container then they will be mounted automatically. However, users should have access to data in the volumes, e.g. by access to/var/lib/docker/volumes/js7-joc-primary-config
etc.
...
It is necessary that a time service is operated on the docker container's host which runs the JOC Cockpit in order to synchronize the system clock's time.
...