Versions Compared

Key

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

...

  • Security is the basic reason why the JS7 deployment scripts ship as shell scripts and not from a high level programming language that might require installation and updates. Transparency and adjustability are key. Users are free to modify deployment scripts at their will and to request changes within the scope of SOS professional services.
  • The source of JS7 installation tarballs is a major concern. Basically the installer scripts for JS7 components offer to download components on demand from the SOS Web Site. Users are discouraged to make use of this feature for automated deployment. Instead, the JS7 components should be separately downloaded and checked that no tampered versions of the files have been download.
  • Good understanding of the deployment process and of the working of deployment scripts is key.

...

Deployment Steps

...

Deployment is an operation that is performed by the following steps:

...

  • archive (holds Deployment Packages)
    • <deployment-descriptor> (specifies the Deployment Descriptor)
      • agents (holds Agent Deployment Packages)
        • <agent-id>(specifies the Agent ID)
          • js7_deploy_agent_unix.<agent-id>.<release>.config.tar.gz (Deployment Package for the Agent's configuration directory)
          • js7_deploy_agent_unix.<agent-id>.<release>.install.tar.gz (Deployment Package for the Agent's installation directory)
          • run_deploy_agent.sh (deployment script)
          • run_install_agent.sh (wrapper script for the parameterized call to js7_install_agent.sh)
        • <agent-id>(specifies the Agent ID)
        • ...
      • controllers (holds Controller Deployment Packages)
        • <controller-id> (specifies the Controller ID)
          • <instance-type> (specifies the type of the Controller instance which is primary or secondary
            • js7_deploy_controller_unix.<controller-id>.<instance-type>.<release>.config.tar.gz (Deployment Package for the Controller instance's configuration directory)
            • js7_deploy_controller_unix.<controller-id>.<instance-type>.<release>.install.tar.gz (Deployment Package for the Controller instance's installation directory)
            • run_deploy_controller.sh (deployment scriptDeployment Script)
            • run_install_controller.sh (wrapper script Wrapper Script for the parameterized call to the js7_install_controller.sh Installer Script)
          • <instance-type> (specifies the type of the Controller instance which is primary or secondary
        • <controller-id> (specifies the Controller ID)
        • ...
      • joc (holds JOC Cockpit Deployment Packages)
        • <joc-id>(specifies the JOC Cockpit ID)
          • <instance-type> (specifies the type of the JOC Cockpit instance which is primary or secondary
            • js7_deploy_joc_linux.<joc-id>.<instance-type>.<release>.config.tar.gz (Deployment Package for the JOC Cockpit instance's configuration directory)
            • js7_deploy_joc_linux.<joc-id>.<instance-type>.<release>.install.tar.gz (Deployment Package for the JOC Cockpit instance's installation directory)
            • run_deploy_joc.sh (deployment scriptDeployment Script)
            • run_install_joc.sh (wrapper script Wrapper Script for the parameterized call to the js7_install_joc.sh) Installer Script.
          • <instance-type> (specifies the type of the JOC Cockpit instance which is primary or secondary
        • <joc-id>(specifies the JOC Cockpit ID)
        • ...
      • js7_import_tar.gz (holds the Deployment Workflow for import to JS7 JOC Cockpit)
      • run_deploy.sh (wrapper script Wrapper Script to run all run_deploy_*.sh deployment scripts Deployment Scripts for Agent, Controller and JOC Cockpit instances)
    • <deployment-descriptor> (specifies the Deployment Descriptor)
    • ...
  • bin (holds executable files, preferably individual scripts, deployment scripts and installer scripts Deployment Scripts and Installer Scripts available from JS7 - Download)
  • ca  (holds the Certificate Authority as explained from  JS7 - How to create self-signed Certificates, not used if an external Certificate Authority is in place)
    • certs (holds CA-signed Certificates)
    • csr (holds Certificate Signing Requests)
    • private (holds Private Keys)
  • config (holds configuration files)
    • agents (holds Agent configuration files)
      • instances (holds configuration files specific for an Agent)
        • <agent-id>(specifies the Agent ID for directories and files that are specific to an Agent)
          • config (general configuration)
            • private (specific configuration)
              • trusted-pgp-keys (optionally holds PGP public key files and keyring files used for signing, see JS7 - Deployment of Scheduling Objects)
                • <pgp-public-key> (public key file or keyring file)
                • <pgp-public-key> (public key file or keyring file)
                • ...
              • trusted-x509-keys (optionally holds X.509 certificate files used for signing, see JS7 - Deployment of Scheduling Objects)
                • <x509-certificate> (X.509 certificate file)
                • <x509-certificate> (X.509 certificate file)
                • ...
              • https-keystore.p12 (optional default location and file name of a PKCS12 keystore)
              • https-truststore.p12 (optional default location and file name of a PKCS12 truststore)
              • private.conf (optional configuration file, for example to specify keystore, truststore and Distinguished Names of Controller certificate, see JS7 - Agent Configuration Items)
              • log4j2.xml (optional log configuration file, see JS7 - Log Levels and Debug Options)
            • agent.conf (optional configuration file, see JS7 - Agent Configuration Items)
        • <agent-id>(specifies the Agent ID for directories and files that are specific to an Agent)
        • ...
      • templates (holds configuration files that act as templates for a number of Agents)
        • <template-name> (an arbitrary directory name for templates can be used)
        • <template-name> (an arbitrary directory name for templates can be used)
        • ...
    • certs (holds certificate files for deployment with Agents and Controllers)
      • ca  (optional Root Certificate Authority used for self-signed certificates)
        • <root-ca-certificate> (the Root CA Certificate file, frequently available with a .pem, .crt extension)
      • server (Server Authentication Certificates)
        • <server-certificate>(Server Certificate file, frequently available with a .pem, .crt extension)
        • <server-certificate>(Server Certificate file, frequently available with a .pem, .crt extension)
        • ...
      • client (Client Authentication Certificates)
        • <client-certificate>(Client Certificate file, frequently available with a .pem, .crt extension)
        • <client-certificate>(Client Certificate file, frequently available with a .pem, .crt extension)
        • ...
    • controllers (holds Controller configuration files)
      • instances (holds configuration files specific for a Controller instance)
        • <controller-id>.<controller-type>(specifies the Controller ID for directories and files that are specific to a Controller instance with the instance type being primary or secondary)
          • config (general configuration)
            • private (specific configuration)
              • trusted-pgp-keys (optionally holds PGP public key files and keyring files used for signing, see JS7 - Deployment of Scheduling Objects)
                • <pgp-public-key> (public key file or keyring file)
                • <pgp-public-key> (public key file or keyring file)
                • ...
              • trusted-x509-keys (optionally holds X.509 certificate files used for signing, see JS7 - Deployment of Scheduling Objects)
                • <x509-certificate> (X.509 certificate file)
                • <x509-certificate> (X.509 certificate file)
                • ...
              • https-keystore.p12 (optional default location and file name of a PKCS12 keystore)
              • https-truststore.p12 (optional default location and file name of a PKCS12 truststore)
              • private.conf (optional configuration file, for example to specify keystore, truststore and Distinguished Names of JOC Cockpit certificate, see JS7 - Controller Configuration Items)
              • log4j2.xml (optional log configuration file, see JS7 - Log Levels and Debug Options)
            • controller.conf (optional configuration file, see JS7 - Controller Configuration Items)
        • <controller-id>.<controller-type>(specifies the Controller ID for directories and files that are specific to a Controller)
        • ...
      • templates (holds configuration files that act as templates for a number of Controllers)
        • <template-name> (an arbitrary directory name for templates can be used)
        • <template-name> (an arbitrary directory name for templates can be used)
        • ...
    • joc  (holds JOC Cockpit configuration files)
      • instances (holds configuration files that are specific for a JOC Cockpit instance)
        • <server>.<instance-type> (holds configuration files for a JOC Cockpit instance running on a specific server with the instance type being primary or secondary)
          • resources (optionally holds configuration files such as the joc.properties file, keystore, truststore files etc.)
          • response (holds response files, mainly the joc_install.xml response file, that are copied to the JOC Cockpit's setup directory)
        • <server>.<instance-type> (holds configuration files for a JOC Cockpit instance running on a specific server with the instance type being primary or secondary)
        • ...
      • templates (holds configuration files that act as templates for a number of JOC Cockpit instances)
        • <template-name> (an arbitrary directory name for templates can be used)
          • resources (optionally holds configuration files such as the joc.properties file, keystore, truststore files etc.)
          • response (holds response files, mainly the joc_install.xml response file, that are copied to the JOC Cockpit's setup directory)
        • <template-name> (an arbitrary directory name for templates can be used)
        • ...
  • desc (holds Deployment Descriptors)
    • <deployment-descriptor>.json (Deployment Descriptor .json file)
    • <deployment-descriptor>.json (Deployment Descriptor .json file)
    • ...
  • logs (holds log files)
    • deployment_package.<deployment-descriptor>.<host>.<timestamp>.log (Packaging Script log files)
    • install_js7_agent.<host>.<timestamp>.log (Agent Installer log files)
    • install_js7_controller.<host>.<timestamp>.log (Controller Installer log files)
    • install_js7_joc.<host>.<timestamp>.log (JOC Cockpit Installer log files)
  • release  (holds the installation tarballs for JS7 releases)
    • ... (users can apply an arbitrary directory hierarchy at this level)
      • js7_agent_unix.<release>.tar.gz (JS7 Agent installation tarball as download from the SOS Web Site)
      • js7_controller_unix.<release>.tar.gz (JS7 Controller installation tarball as download from the SOS Web Site)
      • js7_joc_linux.<release>.tar.gz (JS7 JOC Cockpit installation tarball as download from the SOS Web Site)
  • work (the working area is preferably used to perform installation of JS7 components during packaging)
    • agents (directory for Agent installation during packaging)
      • <agent-id>(specifies the Agent ID for directories and files that are specific to an Agent)
        • ... (sub-directories used for Agent installation)
      • <agent-id>(specifies the Agent ID for directories and files that are specific to an Agent)
      • ...
    • controllers (directory for Controller installation during packaging)
      • <controller-id>(specifies the Controller ID for directories and files that are specific to a Controller)
        • ... (sub-directories used for Controller installation)
      • <controller-id>(specifies the Controller ID for directories and files that are specific to a Controller)
      • ...
    • tmp (temporary files are written to this directory, if the --keep-work switch is used when invoking the JS7 - Deployment Packaging Script then files will remain in this directory which suggests cleanup by the user)
  • env.sh (Environment Script, see next chapter)

...

Environment Script: env.sh

The Environment Script initializes a number of environment variables that map to directories as explained above.

...

Use of the env.sh Environment Script brings benefits when adding your own scripts to the ./bin folder that , for example to create individual deployment packages like this:

...

  • The example of an individual script to create deployment packages Deployment Packages makes use of existing environment variables to apply individual directories or to fall back to the default directory layout.
  • Use of set -e is recommended in order not to proceed execution of scripts in case of errors.
  • Use of environment variables from the above example allows to execute the script from any working directory.

...