Introduction

In the JS7 - Deployment process a Deployment Descriptor specifies

  • which JS7 products of JOC Cockpit, Controller instances and Agents should be installed,
  • where to install each JS7 product,
  • which installation options to use, for example the installation directory,
  • which configuration options to use, for example port usage.

Deployment Descriptors are specified from files in JSON format and include instructions, for example to deploy a larger number of Agents on target hosts.

The Deployment Descriptor Schema is used to validate Deployment Descriptors. Validation proves that the descriptor is formally valid and includes the elements require for successful deployment.

Deployment Descriptor

Deployment Descriptors are specified from .json files.

  • Users are strongly encouraged to validate their .json files against the Deployment Descriptor Schema.
  • A Deployment Descriptor can include Agents, Controllers and JOC Cockpit instances individually or as a combination.

Deployment Descriptor Schema

Download

Download: https://www.sos-berlin.com/JOC/2.5.2/inventory/schemas/deploymentDescriptor/deploymentDescriptor-schema.json

Schema Sections

The JSON Deployment Descriptor Schema is made up of a number of sections.


descriptor: required

  • descriptorId : string, required
    • The unique identifier of a Deployment Descriptor.
  • title: string, optional
    • Explains the purpose of the descriptor.
  • account: string, optional
    • JOC Cockpit user account that created the descriptor.
  • scheduled: date-time, optional
    • The Planned deployment date.
  • created: date-time, optional
    • The export date of the descriptor.

license: optional

This section is required if the Controller and/or JOC Cockpit are operated as a Cluster that is subject to the JS7 - License.

Any relative paths specified are prepended the config directory of the Deployment Area.

  • licenseKeyFile: string, required
  • licenseBinFile: string, required
    • Path to the Java .jar file that holds binary code for clustering of JS7 products.

agents: optional

An array of Agent configuration objects is specified.

  • controllerRefs[]: object, required
    • Agents are dedicated to a Controller. The element specifies a reference to a Controller.
    • controllerId: object, required
      • The unique identifier of the Controller to which Agents are dedicated.
    • members[]: object, required
      • The list of Agents that should be used with the given Controller.
      • agentId: object, required
        • The unique identifier of an Agent is specified. The identifier is used when the Agent is registered with a Controller.
        • Any number of Agent configurations using unique Agent IDs can be specified.

agents.controllerRefs[].members[].target: optional

  • target: object, optional
    • connection: object, required
      • host: string, required
        • The hostname/FQDN to which the Agent should be deployed.
      • port: number, optional
        • The port number used for SSH connections, default: 22.
    • authentication
      • method: string, required
        • Supported authentication methods include public/private key. The value publickey has to be specified.
      • user: string, required
      • keyFile: string, optional
        • The path to the private key file of the user account connecting to the target host, for example /home/sos/.ssh/id_rsa.
    • forceSudo: boolean, optional
    • packagingLocation: string, required
      • The path to a directory on the target host to which the deployment tarballs will be stored during rollout.
    • execPre: string, optional
      • Holds a command that will be executed on the target host before extraction of deployment tarballs has been performed.
      • Deployment scripts provide shell functions to start and to stop the systemd service for the Agent.
      • Specifying the command StopService will stop the Agent's systemd service. Users are free to specify commands at their will.
    • execPost: string, optional
      • Holds a command that will be executed on the target host after extraction of deployment tarballs has been performed.
      • Deployment scripts provide shell functions to start and to stop the systemd service for the Agent.
      • Specifying the command StartService will start the Agent's systemd service. Users are free to specify commands at their will.
    • makeService: boolean, optional
      • Specifies that a systemd service should be created or renewed for JS7 products such as the Agent. This includes that a service file will be created and will be stored to the relevant systemd service file directory. In addition, the service will be enabled for automated start-up and shutdown of the JS7 product.
    • serviceName: string, optional
      • Specifies the name of the systemd service and its corresponding service file that will be created if the makeService setting is active.
      • The Agent's systemd service file is created in the Agent's <home>/bin directory with the file name agent_<http-port>.service. By default the file will be copied to the systemd's /usr/lib/systemd/system directory with the file name js7_agent_<http-port>.service which results in the corresponding systemd service name. Users who wish to use a different service name can use this setting. If the indicated service name does not include the .service extension then it will be added.
    • serviceDir: string, optional
      • Specifies the location of the systemd directory for service files. By default the /usr/lib/systemd/system directory will be used. An alternative location is the /etc/systemd/system directory. Users are free to specify the systemd directory that is in place on the target host.

agents.controllerRefs[].members[].media: required

  • media: object, required
    • release: object, required
      • The JS7 release number, for example 2.5.0.
    • tarball: string, required
      • Path to the .tar.gz installation file as downloaded from the SOS Web Site.
      • Any relative paths specified are prepended the release directory of the Deployment Area, see JS7 - Deployment Area - Directory Layout.

agents.controllerRefs[].members[].installation: required

  • installation: object, required
    • home: object, required
      • Path to the directory to which the Agent should be installed, for example /opt/sos-berlin.com/js7/agent.
    • data: string, required
      • Path to the Agent's configuration directory, for example /var/sos-berlin.com/js7/agent.
    • homeOwner: string, optional
    • dataOwner: string, optional
    • runUser: string, optional
    • httpPort: number, conditional
      • The HTTP port is used to control the Agent in the localhost network by its Instance Start Script.
      • Use of the port can be limited by specifying <network-interface>:<port>, for example: localhost:4445.
      • One of HTTP Port and/or HTTPS Port has to be specified.
    • httpsPort: number, conditional
      • The HTTPS port is used for access of a Controller to the Agent.
      • Use of the port can be limited by specifying <network-interface>:<port>, for example: jobs.example.com:4445.
      • One of HTTP Port and/or HTTPS Port has to be specified.
    • javaHome: string, optional
      • Path to a Java JDK that is used to operate the Agent, see Which Java versions is JobScheduler available for?
      • If this setting is omitted then the Agent will try to identify the location of Java from the JAVA_HOME environment variable on the target host.
    • javaOptions: string, optional
      • Specifies the Java options used for the Agent, for example heap space settings as -Xmx256m., see JS7 - FAQ - Which Java Options are recommended.
      • If this setting is omitted then the Agent will try to identify Java options from the JAVA_OPTIONS environment variable on the target host.

agents.controllerRefs[].members[].configuration: optional

Any relative paths specified are prepended the config directory of the Deployment Area, see JS7 - Deployment Area - Directory Layout.

  • configuration: object, optional
    • certificates: object, optional
      • keyStore: string, required
        • Path to a PKCS12 keystore that holds the Agents private key and Server Certificate.
      • keyStorePassword: string, required
        • Password for access to the Agent's keystore.
      • keyPassword: string, required
        • Password for access to the Agent's private key (same as keyStorePassword when using a PKCS12 keystore).
      • keyAlias: string, optional
        • The alias name of the Agent's private key. The setting is relevant only should more than one private key be included in the Agent's keystore.
      • trustStore: string, required
        • Path to a PKCS12 truststore that holds the Root CA Certificate and optionally Intermediate CA Certificate(s).
      • trustStorePassword: string, required
        • Password for access to the truststore.
      • The intention for use of passwords for access to keystore and truststore is not targeted at implementing some level of secrecy. Instead, it is intended to allow verification that the keystore and truststore have not been tampered or changed accidentally. The passwords are used when retrieving keys and certificates to verify integrity of the keystore/truststore.
    • templates: array, optional
      • <config-directory>: string, required
        • Any directories specified will be copied to the Agent's data directory. Specified directories have to use config and/or config/private sub-directories as the final part of the directory hierarchy.
        • Any files and sub-directories of the specified directories will be copied to the Agent's data directory.
        • Any number of configuration directories can be specified by repeatedly using the element.
    • files: object, optional
      • agentConf: string, optional
        • Path to a configuration file that will be copied to the Agent's config configuration directory with the  agent.conf file name.
      • privateConf: string, optional
        • Path to a configuration file that will be copied to the Agent's config/private configuration directory with the  private.conf file name.

controllers: optional

An array of Controller configuration objects is specified. Relevant settings correspond to the agents.controllerRefs[].members[] sections.

  • controllerId: object, required
    • The unique identifier of a Controller is specified. If a Controller Cluster is operated then both Primary and Secondary Controller instances use the same Controller ID.
    • Any number of Controller configurations using unique Controller IDs can be specified.
  • jocRef: object, optional
    • The unique identifier of a JOC Cockpit standalone instance or cluster that is used to manage the Controller.
  • <instance-type>: object, required
    • If a Controller Cluster is operated then separate nodes are added to the Deployment Descriptor indicating the primary and secondary instance type.
    • For a Standalone Controller a single instance type primary is specified.
    • target: see agents
    • media: see agents
    • installation: see agents
    • configuration: see agents
      • certificates: object, optional
        • cert: string, optional
          • Path to the certificate file (.crt, .pem) that holds the Controller instance's base64 encoded Server Certificate.

joc: optional

An array of JOC Cockpit configuration objects is specified. Relevant settings correspond to the agents.controllerRefs[].members[] sections.

  • members[]: object, required
    • The list of JOC Cockpit cluster or standalone instances is specified.
    • clusterId: object, required
      • The unique identifier of a JOC Cockpit cluster is specified. If a JOC Cockpit Cluster is operated then all JOC Cockpit instances use the same JOC Cockpit Cluster ID.
      • A Cluster ID is specified for a standalone JOC Cockpit instance too.
    • instances[]: object, required
      • The list of JOC Cockpit instances that are members of the JOC Cockpit Cluster.
      • instanceId: object, required
        • Within a JOC Cockpit Cluster the JOC Cockpit instances are assigned a unique Instance ID that counts from 0 to 99. The sequence of numbers specifies the ordering in which available JOC Cockpit instances are displayed in the JOC Cockpit Dashboard.
      • target: see agents
      • media: see agents
      • installation: see agents
      • configuration: see agents
        • certificates: object, optional
          • cert: string, optional
            • Path to the certificate file (.crt, .pem) that holds the JOC Cockpit instance's base64 encoded Server Certificate.

joc.members[].instances[].installation: required

The following settings are available in addition to what is stated with the agents.controllerRefs[].members[].installation section.

  • installation: object, required
    • setupDir: string, required
      • Path to the directory to which the JOC Cockpit .tar.gz installation file is extracted. The directory is required to extract the installation file and to run the JOC Cockpit installer.
      • If this setting is omitted then a temporary directory will be used.
    • isUser: boolean, optional
      • Specifies that the JOC Cockpit installation will be performed for a user account, not for the root account. This setting corresponds to the -u switch that can be used when manually installing JOC Cockpit, for example using ./setup.sh -u joc_install.xml.
    • isPreserveEnv: boolean, optional
      • Specifies that during JOC Cockpit installation environment variables of the user account performing installation are passed to sudo
      • This corresponds to use of the sudo -E switch, for example using ./setup.sh -u -E joc_install.xml.
    • title: string, optional
      • The title is used in the JOC Cockpit dashboard view and serves to distinguish a number of JOC Cockpit instances operated as a cluster.
    • securityLevel: string, optional
    • dbmsConfig: string, optional
      • Path to a Hibernate configuration file that specifies access to the DBMS. See JS7 - Database for Hibernate example files.
    • dbmsDriver: string, optional
      • Path to a JDBC Driver *.jar file for access to the DBMS. See JS7 - Database for JDBC Drivers that ship with JS7.
    • dbmsInit: string, optional
      • Specifies the point in time when objects will be created in the database.
      • One of the options byInstaller, byJoc, off can be used.

joc.members[].instances[].configuration: optional

The following settings are available in addition to what is stated with the agents.controllersRefs[].members[].configuration section.

Any relative paths specified are prepended the config directory of the Deployment Area, see JS7 - Deployment Area - Directory Layout.

  • configuration: object, optional
    • certificates: object, optional
      • cert: string, optional
        • Path to the certificate file (.crt, .pem) that holds the JOC Cockpit instance's base64 encoded Server Certificate.
    • responseDir: string, optional
      • The response directory can hold any files required when running the JOC Cockpit setup. The files and folders of the response directory will be copied to the JOC Cockpit' setupDir directory before running the installer.
    • startFiles: object, optional
      • The Jetty Servlet Container used with JOC Cockpit by default ships for HTTP connections. For use with HTTPS connections a number of configuration files are used that hold SSL related settings. All files are stored to the JETTY_BASE/start.d directory:
        • http.ini: enables/disables the Jetty HTTP module, specifies the port and optionally the network interface for HTTP connections.
        • https.ini: enables/disables the Jetty HTTPS module.
        • ssl.ini: specifies the port and optionally the network interface for HTTPS connections. In addition settings related to keystores and truststores are available.
      • httpIni: string, optional
        • Specifies the path to the http.ini file that should be copied to JOC Cockpit's JETTY_BASE/start.d directory.
        • When using HTTPS connections it is recommended to deploy a copy of the file that disables the HTTP module as HTTPS is not an invite to users to fall back to use of a less secure protocol.
        • Settings for port and network interface in this file will be updated from corresponding elements in the joc.<joc-id>.installation section.
      • httpsIni: string, optional
        • Specifies the path to the https.ini file that should be copied to JOC Cockpit's JETTY_BASE/start.d directory.
        • When using HTTPS connections it is recommended to deploy a copy of the file that enables the HTTPS module.
      • sslIni: string, optional
        • Specifies the path to the ssl.ini file that should be copied to JOC Cockpit's JETTY_BASE/start.d directory.
        • When using HTTPS connections it is recommended to deploy a copy of the file that specifies the SSL port and optionally the network interface. In addition, the file holds settings for the keystore and truststore used by Jetty.
        • Settings for port, network interface, keystore and truststore in this file will be updated from corresponding elements in the installation and configuration sections.
    • files: object, optional
      • jocProperties: string, optional
        • Specifies the path to the joc.properties file that should be copied to JOC Cockpit's JETTY_BASE/resources/joc directory.
        • Settings for keystore and truststore in this file will be updated from corresponding elements in the configuration section.

Resources



  • No labels