Upgrade Cyware Agent from Version 1.x to 2.x
Cyware Agent creates a secure and dedicated gateway to enable seamless automation between on-premise solutions deployed in a customer infrastructure and the Orchestrate application deployed in the public cloud. Analysts can upgrade Cyware Agent to the 2.x version to use the latest features and enhancements. Orchestrate supports the capability to upgrade the 1.x version of the agent installed on-premise to a 2.x version.
Before you Start
Ensure that the docker image package is present on your on-premise machine. For more info, see Prerequisites
Ensure that you have the root privileges.
Whitelist the following URL for the Cyware Agent to fetch app-specific pip packages.
packages.cyware.com
Steps
Use the following commands to upgrade the existing Cyware Agent on the machine where the agent is installed.
Run the following command to pull the docker images
docker pull prod.packages.cyware.com/co/<docker_image_name>
Run the following command to create a directory for Cyware Agent
mkdir -p /apps/cyware/cyware_agent
Run the following command to search the existing .env file:
sudo crontab -l
what is displayed??
For example, a sample path looks like
/usr/lib/python3.6/site-packages/csol_lite/
Run the following command to list all files and directories:
ls -a
Run the following command to create a directory
sudo mkdir -p /apps/cyware/cyware_agent/conf/
Run the following command to copy the .env file to the created directory
sudo cp .env /apps/cyware/cyware_agent/conf/
Go to the Cyware Agent directory using the following command:
cd /apps/cyware/cyware_agent/
Create a directory in apps
sudo mkdir apps in the /apps/cyware/cyware_agen
The .env file does not support the “ (quotation marks). If the quotation marks are present in the .env file, you must remove the quotation marks.
Add the AGENT_UNIQUE_ID = <unique_id> to the .env file.
Sample .env file CONNECTED_PRODUCT=CSOL NAME=Agent Name CRON=* * * * * MAX_COMMANDS=10 BASE_URL=http://host.docker.internal:8000/openapi/ ACCESS_ID=5a47a350-3690-43f0-9d23-a7c6e88445cd SECRET_KEY=f539e933-b982-4234-b95c-5716bc303002 CSOL_LITE_ID=726d978f-91ae-4bea-950a-7dc4f32bafb7 AGENT_UNIQUE_ID=7d5a5b45-5505-49e3-b6f9-f8b524d778a7
Use the installed directory path of Cyware Agent 1.x to copy the .env file to the
<new/mount/directory>/conf
folder.Run the following command to run the docker container
docker run --env-file=/apps/cyware/cyware_agent/conf/.env -v /apps/cyware/cyware_agent/apps:/app/integrations/apps -d --restart unless-stopped cyware_agent agent
Run the following command to stop the run of the Cyware Agent by editing the .env file
sudo crontab -e
Add a # (hash) before the cron expression in the .env file