Installing the weeve agent
A step-by-step guide to installing the weeve agent.
The weeve Agent is the edge software that is responsible for executing the deployed Edge Applications. It can be installed on edge hardware like gateways, industrial computers or smart machines and turns them into weeve Edge—Nodes, a manageable asset in the weeve Manager. The minimal requirements for hardware and operating system to run the weeve agent are the following and include a working connection to the internet.
Before starting with the installation process, getting to know the hardware and software requirements for the weeve Agent is recommended.
Ensure you have the latest version of the Docker Engine installed on the Edge Hardware before installing the weeve Agent.
You can follow these instructions: https://docs.docker.com/engine/install/
Log into your account in the weeve Manager web UI and navigate to Nodes. Then click on "+ Register Node" and input all the necessary information. After clicking "Submit" you will be shown the ID of the newly registered node and offered the option to download the configuration file. If you want to create the file manually fill the following json schema:
{
"Password": "",
"Broker": "tls://mapi-prod.weeve.network:8883",
"NodeId": "<NodeID shown on the screen>",
"NodeName": "<name you chose for the node>"
}
If you have an old version of the weeve Agent running which was not installed with the package manager, please remove all instances with the instructions below before installing the weeve Agent via apt.
On Debian-based systems you can install the production ready version of weeve-agent using the apt manager. For this
agent-conf.json
configuration file needs to be placed in /etc/weeve-agent/agent-conf.json
.curl -fsSL http://weeve-agent-ppa.s3.amazonaws.com/weeve.gpg | sudo gpg --dearmor -o /usr/share/keyrings/weeve.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/weeve.gpg] http://weeve-agent-ppa.s3.amazonaws.com stable main" | \
sudo tee /etc/apt/sources.list.d/weeve-agent.list
sudo apt update
sudo apt install weeve-agent
To update the weeve Agent to the latest version run the following commands:
sudo apt update
sudo apt install weeve-agent
Optionally you can also update the weeve Agent to a specific version by specifying the version number:
sudo apt update
sudo apt install weeve-agent=<version>
The available versions can be listed by running
apt-cache madison weeve-agent
.To uninstall the weeve Agent run the following commands:
sudo apt remove weeve-agent
- binary and dependencies should go in this specific path
/usr/local/bin
- enable docker on start-up
systemctl enable docker
- Following commands are to add rule to SELinux, allowing the binary to be executed:
sudo ausearch -c '(ux_amd64)' --raw | audit2allow -M my-uxamd64
sudo semodule -X 300 -i my-uxamd64.pp
- Following command is to change permissions of the specific directory:
/sbin/restorecon -v /usr/local/bin/<name-of-the-binary>
Curl and run the installer:
curl -sO http://weeve-agent-dev.s3.amazonaws.com/weeve-agent-installer.sh
sh weeve-agent-installer.sh --configpath <path-to-config-file> --release dev
Answer the questions in the following prompt. Voila, the weeve agent is installed and you can check it's status with
systemctl status weeve-agent.service
.To remove the agent installation execute this one-liner:
curl -sO http://weeve-agent-dev.s3.amazonaws.com/weeve-agent-uninstaller.sh && sh weeve-agent-uninstaller.sh
The installer script can take the following optional parameters:
Parameter | Required | Description | Possible Values | Default |
---|---|---|---|---|
configpath | true | Path to the JSON file with node configuration | | |
release | true | Name of platform the node should be registered with | prod, dev | |
test | false | If specified, build the agent from local sources | | false |
broker | false | URL of the MQTT broker to connect | | |
loglevel | false | Level of log verbosity | debug, info, warning, error | info |
heartbeat | false | Time period between heartbeat messages (sec) | | 10 |
Last modified 3mo ago