Page History
...
In the JS7 - Deployment process the a Deployment Descriptor specifies
- which JS7 components products of JOC Cockpit, Controller instances and Agents should be installed,
- where to install each JS7 componentproduct,
- 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 machineshosts.
The JS7 - Deployment Packaging Script makes use of the Deployment Descriptor to install and to package JS7 componentsproducts.
Deployment Descriptor
Deployment Descriptors are specified from .json files.
- Users should validate are strongly encouraged to validate their .json files against the Deployment Descriptor Schema, see JS7 - Deployment Descriptor JSON Schema.
- A Deployment Descriptor can include elements for Agents, Controllers and JOC Cockpit instances individually or as a combination.
Example for an Agent Deployment Descriptor:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "descriptor": { "descriptorId": "agent-http-2022-12-04", "title": "Install Agentsor update Agent for HTTP connections to release 2.5.0", "account": "sos", "scheduled": "2022-12-02T06:19:12+01:00", "created": "2022-11-30T23:19:12+01:00" }, "agentsversion": [ { "agent_001": { "target": { "connection": { "host": "centostest-primary", "port": 22 }, "authentication": { "method": "publickey", "user": "sos", "keyFile": "/home/sos/.ssh/sos_rsa" }, "location": "/tmp", "execPre": "systemctl stop js7.agent_001", "execPost": "systemctl start js7.agent_001" }, "media": { "release": "2.5.0", "tarball": "/mnt/releases/scheduler_setups/2.5.0/js7_agent_unix.2.5.0.tar.gz" }, "installation": { "home": "/opt/sos-berlin.com/js7/agent-primary", "data": "/var/sos-berlin.com/js7/agent-primary", "httpPort": "31445" } } }, ], "controllers": [ ] } |
Examples
Deployment Descriptor for Agents with HTTP Connections
The Deployment Descriptor specifies two Agents to be installed that make use of HTTP connections and do not require further parameterization.
Download: agent-http-2022-12-04.json
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "descriptor":"1.5.3", "agents": { "controllerRefs": [ { "descriptorIdcontrollerId": "agent-http-2022-12-04controller", "titlemembers": "Install Agents for HTTP connections to release 2.5.0",[ "account": "sos", "scheduled": "2022-12-02T06:19:12+01:00", { "created": "2022-11-30T23:19:12+01:00" }, "agentsagentId": [ { "agent_001": {, "target": { "connection": { "host": "centostest-primary", "port": 22 }, "authentication": { "method": "publickey", "user": "sos", "keyFile": "/home/sos/.ssh/sos_rsa" }, "locationpackageLocation": "/tmp", "execPre": "systemctl stop js7.agent_001", "execPost": "systemctl start js7.agent_001" }, "media": { "release": "2.5.03", "tarball": "/mnt/releases/scheduler_setups/2.5.03/js7_agent_unix.2.5.03.tar.gz" }, "installation": { "home": "/opt/sos-berlin.com/js7/agent-primary", "data": "/var/sos-berlin.com/js7/agent-primary", "httpPort": "31445" } } },] { "agent_002": { "target": { "connection": { "host": "centostest-secondary", "port": 22 }, "authentication": { "method": "publickey", "user": "sos", "keyFile": "/home/sos/.ssh/sos_rsa" }, "location": "/tmp", "execPre": "systemctl stop js7.agent_002", "execPost": "systemctl start js7.agent_002" }, "media": { "release": "2.5.0", "tarball": "/mnt/releases/scheduler_setups/2.5.0/js7_agent_unix.2.5.0.tar.gz" }, "installation": { "home": "/opt/sos-berlin.com/js7/agent-secondary", "data": "/var/sos-berlin.com/js7/agent-secondary", "httpPort": "32445" } } } ], "controllers": [ ] } |
Deployment Descriptor for Agents with HTTPS Connections
The Deployment Descriptor specifies the same Agents as from the previous example to be installed. This time the Agents make use of HTTPS connections and require certificates to be made available.
Download: agent-https-2022-12-04.json
...
title | Example for Deployment Descriptor |
---|---|
linenumbers | true |
collapse | true |
...
]
}
} |
Explanation:
- Section
descriptor
- This section includes metadata about the Deployment Descriptor.
- The
descriptorId
specifies the unique identifier of the Deployment Descriptor and is determines the Deployment Package.
- Section
agents
- This section can hold any number of Agents that should be deployed.
- Section
agents.controllerRefs[].<controller-id>
- This section specifies the list of Controllers to which related Agents are assigned. The Controller ID identifies the respective Controller.
- Section
agents.controllerRefs[].members[]
- This section specifies the related Agents that are identified by their respective Agent ID from the
agentId
property. The Agent ID will be used when registering the Agent to a Controller with JOC Cockpit. The Agent ID can be specified from mixed lowercase and uppercase letters including - minus and _ underscore characters. - Section
agents.controllerRefs[].members[].
target
- The information in this section is used to connect to the target host and to transfer the Deployment Package that holds the Agent installation..
- The Agent Deployment Package will be deployed to host
centostest-primary
using SSH with thesos
account and a private key file for authentication. The Deployment Package will be stored to the/tmp
directory on the target host. - Before extraction of the Deployment Package the Agent's systemd service will be stopped and after extraction it will be started using JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems. The
makeService
property specifies that the systemd service will be created automatically.
- Section
agents.controllerRefs[].members[].
media
- The Agent will be installed or updated to the indicated release using a copy of the tarball as offered from the JS7 - Download page.
- If a relative path is used - as in the example - then the path is prepended the
js7.deploy/release
directory. - If an absolute path is specified, for example a path to a mount point, then it will be used without changes.
- Section
agents.controllerRefs[].members[].installation
- The Agent's
- installation directory is
/opt/sos-berlin.com/js7/agent-
- installation directory is
- The Agent's
- This section specifies the related Agents that are identified by their respective Agent ID from the
...
primary
.- configuration directory is
/var/sos-berlin.com/js7/agent-
...
primary
.
- The Agent will use HTTP connections and will listen to port
31445
.
Resources
Links
Display children header |
---|