Page History
...
The following Deployment Descriptors ship with the Deployment Area:
js7.deploy
desc
standalone
standalone-agent-http-2022-12-04.json
standalone-agent-https-2022-12-04.json
standalone-controller-http-2022-12-04.json
standalone-controller-https-2022-12-04.json
standalone-joc-http-2022-12-04.json
standalone-joc-https-2022-12-04.json
standalone-joc-controller-agent-https-2022-12-04.json
Deployment Descriptors for use with Controller and JOC Cockpit Cluster Instances
...
The following Deployment Descriptors ship with the Deployment Area:
js7.deploy
desc
cluster
cluster-agent-http-2022-12-04.json
cluster-agent-https-2022-12-04.json
cluster-controller-http-2022-12-04.json
cluster-controller-https-2022-12-04.json
cluster-joc-http-2022-12-04.json
cluster-joc-https-2022-12-04.json
cluster-joc-controller-agent-https-2022-12-04.json
Adjusting the Deployment Descriptor
...
- The
descriptor.descriptorId
element identifies the descriptor. The identifier is similarly used as the name of the Deployment Package. Identifiers can be made up from lowercase and uppercase letters, can include digits, underscores and hyphens. The file name of the Deployment Descriptor is not relevant. - The
agents.agent_001
element specifies the unique Agent nameagent_001
.- Agent names can be made up from lowercase and uppercase letters, can include digits, underscores and hyphens. Users are free to choose Agent names, for example from the hostname or FQDN that the Agent is operated for, for example using element names such as
agents.centostest-primary
,agents.centostest-secondary.sos
etc. - Any number of Agents can be specified in a Deployment Descriptor.
- Agent names can be made up from lowercase and uppercase letters, can include digits, underscores and hyphens. Users are free to choose Agent names, for example from the hostname or FQDN that the Agent is operated for, for example using element names such as
- The
target
section specifies theconnection
andauthentication
details for the target host to which the Agent should be deployed.- Deployment is performed using
scp
andssh
commands that will use the indicated SSHhost
andport
. - Authentication makes use of public/private key specifying the
user
account and the location of the privatekeyFile
. This setting can be omitted if the private key file matches one of the known names such as id_rsa. - For automated deployment It is required that the deployment user account can connect to the target host without use of a password but with a private key only.
- The
packageLocation
element specifies the location where the Deployment Package tarball will be stored.
- Deployment is performed using
- The
media
section specifies therelease
number and the location of the JS7 installation tarball for the Agent. TheDEP_RELEASE
environment variable from theenv.sh
script can be used to specify the directory in which the installation tarball is available. - The
installation
section specifies installation options for the Agent:- The Agent's
home
directory has to be specified. Adata
directory can optionally be specified, if it is omitted then<home>var_<http-port>
is assumed. - The Agent's HTTP port can be specified that defaults to port 4445.
- The location of the Java JDK on the target host can be specified with the
javaHome
element. If this setting is omitted, then the
- The Agent's
Templating
Creating the Deployment Package
xxx
Running the Deployment Packaging Script
consists of
- the installation of
...
- Consider that the
target.user
account has permissions to create the directories. - By default the directories and files of the extracted Deployment Package are owned by the deployment account specified with the
target.user
element. Should a different account be used on the target host then- the owner account of the
home
directory can be specified with theinstallation.homeOwner
element. - the owner account of the
data
directory can be specified with theinstallation.dataOwner
element. - the run-time account of the Agent's service/daemon can be specified with the
installation.runUser
element.
- the owner account of the
- The Agent's HTTP port can be specified that defaults to port 4445.
- The location of the Java JDK on the target host can be specified with the
javaHome
element.- The location of Java will be added to the Agent's Start Script in
<home>/bin/agent_<http-port>.sh
and to the systemd service file in<home>/bin/agent_<http-port>.service
. - If this setting is omitted, then the Java location is determined by the run-time account, for example from its OS profile settings.
- The location of Java will be added to the Agent's Start Script in
- Consider that the
Creating the Deployment Package
With the Deployment Descriptor being available the Deployment Package can be created from a script.
The Deployment Packaging script performs the following steps:
- install the JS7 components according to the Deployment Descriptor
- create a deployment tarball of the installed files. If different home and data directories are used then a tarball for each directory will be created.
- create a Deployment Script that will transfer and extract the deployment tarball on the target host.
Running the Deployment Packaging Script
The Deployment Packaging Script is available from the js7.deploy/bin
directory.
The script can be parameterized like this:
--deploy-desc
: specifies the location of the Deployment Descriptor,--make-dirs
: specifies that new sub-directories should be created if they do not exist.
Find more details about parameterization from the JS7 - Deployment Packaging article.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
${DEP_BIN}/js7_create_deployment_package.sh \
--deploy-desc=${DEP_DESC}/standalone/standalone-agent-http-2022-12-04 \
--make-dirs |
Output of the script can look like this:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
-- begin of log --------------
/home/sos/js7.dep/bin/js7_create_deployment_package.sh --deploy-desc=/home/sos/js7.dep/desc/standalone/standalone-agent-http-2022-12-04.json --make-dirs
-- begin of output -----------
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
.. creating deployment package for Agent ID: agent_001
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
.... creating install script: /home/sos/js7.dep/work/tmp/js7_deploy_package_install_17858.sh
.... running install script: /home/sos/js7.dep/work/tmp/js7_deploy_package_install_17858.sh
-- begin of log --------------
/home/sos/js7.dep/bin/js7_install_agent.sh --real-path-prefix=/home/sos/js7.dep/work/agents/agent_001 --release=2.5.0 --tarball=/home/sos/js7.dep/release/2.5.0/js7_agent_unix.2.5.0.tar.gz --home=/home/sos/js7.dep/work/agents/agent_001/opt/sos-berlin.com/js7/agent-standalone --data=/home/sos/js7.dep/work/agents/agent_001/var/sos-berlin.com/js7/agent-standalone --http-port=31445 --java-home=/opt/java/jdk8u202-b08 --make-dirs
-- begin of output -----------
.. using tarball: /home/sos/js7.dep/release/2.5.0/js7_agent_unix.2.5.0.tar.gz
.. extracting tarball to temporary directory: /tmp/js7_install_agent_18024.tmp
.. creating Agent home directory: /home/sos/js7.dep/work/agents/agent_001/opt/sos-berlin.com/js7/agent-standalone
.. creating Agent data directory: /home/sos/js7.dep/work/agents/agent_001/var/sos-berlin.com/js7/agent-standalone
.. copying files from extracted tarball directory: /tmp/js7_install_agent_18024.tmp/agent to Agent home: /home/sos/js7.dep/work/agents/agent_001/opt/sos-berlin.com/js7/agent-standalone
.. creating Agent data directory: /home/sos/js7.dep/work/agents/agent_001/var/sos-berlin.com/js7/agent-standalone
.. copying files to Agent data directory: /home/sos/js7.dep/work/agents/agent_001/var/sos-berlin.com/js7/agent-standalone
.. copying Agent Instancee Start Script /home/sos/js7.dep/work/agents/agent_001/opt/sos-berlin.com/js7/agent-standalone/bin/agent_instance.sh-example to /home/sos/js7.dep/work/agents/agent_001/opt/sos-berlin.com/js7/agent-standalone/bin/agent_31445.sh
.. copying /home/sos/js7.dep/work/agents/agent_001/opt/sos-berlin.com/js7/agent-standalone/bin/agent.service-example to /home/sos/js7.dep/work/agents/agent_001/opt/sos-berlin.com/js7/agent-standalone/bin/agent_31445.service
.. updating Agent Instance Start Script: /home/sos/js7.dep/work/agents/agent_001/opt/sos-berlin.com/js7/agent-standalone/bin/agent_31445.sh
.. updating Agent systemd service file: /home/sos/js7.dep/work/agents/agent_001/opt/sos-berlin.com/js7/agent-standalone/bin/agent_31445.service
-- end of log ----------------
.... creating installation deployment package file: tar -cf /home/sos/js7.dep/archive/standalone-agent-http-2022-12-04/agents/agent_001/js7_deploy_agent_unix.agent_001.2.5.0.install.tar -C /home/sos/js7.dep/work/agents/agent_001/opt/sos-berlin.com/js7 agent-standalone
.... installation deployment package ready: /home/sos/js7.dep/archive/standalone-agent-http-2022-12-04/agents/agent_001/js7_deploy_agent_unix.agent_001.2.5.0.install.tar.gz
.... creating configuration deployment package file: tar -cf /home/sos/js7.dep/archive/standalone-agent-http-2022-12-04/agents/agent_001/js7_deploy_agent_unix.agent_001.2.5.0.config.tar -C /home/sos/js7.dep/work/agents/agent_001/var/sos-berlin.com/js7 agent-standalone
.... configuration deployment package ready: /home/sos/js7.dep/archive/standalone-agent-http-2022-12-04/agents/agent_001/js7_deploy_agent_unix.agent_001.2.5.0.config.tar.gz
.... install script for deployment package ready: /home/sos/js7.dep/archive/standalone-agent-http-2022-12-04/agents/agent_001/run_install_agent.sh
.... job script for deployment package ready: /home/sos/js7.dep/archive/standalone-agent-http-2022-12-04/agents/agent_001/run_deploy_agent.sh
.... creating JS7 import file: tar -cf /home/sos/js7.dep/archive/standalone-agent-http-2022-12-04/js7_import.tar *
.... JS7 import file ready: /home/sos/js7.dep/archive/standalone-agent-http-2022-12-04/js7_import.tar.gz
.. Deployment run file ready: /home/sos/js7.dep/archive/standalone-agent-http-2022-12-04/run_deploy.sh
-- end of log ---------------- |
As a result the Deployment Package is available from the following directory hierarchy:
js7.deploy
archive
standalone-agent-http-2022-12-04
(directory name created from the Deployment Descriptor ID)agents
(sub-directory for Agent deployments)agent_001
(sub-directory for specific Agent identified by its Agent ID)js7_deploy_agent_unix.agent_001.2.5.0.config.tar.gz
(tarball of the Agent's configuration directory)js7_deploy_agent_unix.agent_001.2.5.0.install.tar.gz
(tarball of the Agent's installation directory)run_deploy_agent.sh
(Deployment Script)run_install_agent.sh
(Installer Wrapper Script)
js7_import.tar.gz
(tarball for import into JS7 JOC Cockpit, includes workflow and schedule for automated deployment)run_deploy.sh
(Deployment Wrapper Script, includes calls toagents/agent_001/run_deploy_agent.sh
and similar scripts per JS7 component included)
Basically the run_deploy.sh
script can be used to transfer the Agent's tarballs for configuration and installation directories to the target host.
Running Deployment Packages
xx