Update Syntropy Agent

Below are examples of how to update Syntropy Agent. It's worth doing this periodically to make sure all is up-to-date and working as expected.

Update Syntropy Agent (Docker)

To update Syntropy Agent running in docker need to pull a new image.

sudo docker pull syntropynet/agent:stable
sudo docker stop syntropy-agent
sudo docker rm syntropy-agent
// Syntropy API Key is Required
sudo docker run --network="host" --restart=on-failure:10 \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE -v /var/run/docker.sock:/var/run/docker.sock:ro \
--device /dev/net/tun:/dev/net/tun --name=syntropy-agent \
-e SYNTROPY_NETWORK_API='docker' \
-e SYNTROPY_API_KEY=<<agent_token>> -d syntropynet/agent:stable

Update Syntropy Agent (Ansible)

To update Syntropy Agent with Ansible, need to run the playbook again.

ansible-playbook syntropy-agent.yaml -f 10
---
hosts: all
# tasks file for syntropy-agent
tasks:
    - name: pull an image
    docker_image:
        name: syntropynet/agent:stable
        force_source: yes

    - name: Stop and remove old container
    docker_container:
        name: syntropy-agent
        state: absent
        image: syntropy-agent

    - name: Create Syntropy agent container and connect to network
    docker_container:
        name: syntropy-agent
        restart_policy: unless-stopped
        image: syntropynet/agent:stable
        network_mode: "host"
        purge_networks: no
        env:
        SYNTROPY_API_KEY: <<agent_token>>
        SYNTROPY_NETWORK_API: docker
        volumes:
        - /var/run/docker.sock:/var/run/docker.sock:ro
        devices:
        - "/dev/net/tun:/dev/net/tun"
        capabilities:
        - net_admin
        - sys_module

Update Syntropy Agent (Pip)

To update Syntropy Agent using Pip execute this command.

sudo pip3 install syntropy-agent --upgrade

Service needs to be restarted to run on an updated version.


Did this page help you?