Pular para o conteúdo principal
Version: 3.25

Install Network Connector

The Network Connector installation and configuration is divided into two steps:

  1. Network Connector Server Configuration
  2. Installing and configuring the Network Connector Agent

The Server needs to be configured only once.

The Agent must be installed and configured on all networks where senhasegura does not have access.

[VÍDEO] Network Connector

Configure Network Connector Server

The configuration of the Network Connector Server is performed on the senhasegura instances using the orbit network-connector command.

Type orbit network-connector --help to see all available options for this command.

IMPORTANT

For clustered installations, you need to perform Network Connector Server configuration on all nodes. To do this, repeat the steps above on each cluster node.

Requirements
  • Access with sudo on the senhasegura server.
  • Open the port TCP/51445 to allow Agents to communicate with senhasegura server.

To configure Network Connector Server, follow these steps:

  1. Access each senhasegura instance of the cluster via terminal
  2. Type the following command:
sudo orbit network-connector setup
  1. Type Y to proceed and wait for the success message

Check below the messages you may see when configuring the Network Connector Server:

TypeMessage
Successsenhasegura Network Connector Server is ready!

Use this fingerprint in senhasegura Network Connector Agents setup: FINGERPRINT.

In case you need it, instructions for starting senhasegura Network Connector Agents are available in our help center.

See at https://d.senhasegura.io/skme2rugfyizbw9

NOTE: If this environment is in cluster mode, run "sudo orbit network-connector setup" on secondary nodes as well.
ErrorCan't continue setup.

This node is a Secondary in cluster and senhasegura Network Connector Server needs to be initialized in Primary node.

Please run "sudo orbit network-connector setup" in Primary node first.
ErrorWhoops! An error was found in application setup.

Check if application database is running and file replication between nodes is working without errors.
ErrorWhoops! An error was found.

Unable to determine which fingerprint senhasegura Network Connector Agents needs to connect in this Server, try again later.
ErrorWhoops! Could not replicate settings to cluster nodes.

Check if all cluster nodes are available and file replication is working and try again.

Add Network Connector Agent

After activating the Network Connector Server, access the senhasegura web interface and follow the steps below:

  1. Access the options on Devices ➔ Settings ➔ Network Connector ➔ Connectors. You will find a registered connector
  2. In the Action column, click the Change icon
  3. Click on the Agents tab
  4. Add all the agents you want to install, filling in the Name and Port fields. The port must be between 30000 and 30999
  5. Finally, click on the Save button

Get Network Connector Fingerprint

It is necessary to have the fingerprint during the Network Connector configuration process to install the agents. To copy the fingerprint, follow the steps below:

  1. Log into the senhasegura web interface
  2. Access the Devices ➔ Settings ➔ Network Connector ➔ Connectors
  3. In the Action column, click on the Details option.
  4. When the window opens, click on the fingerprint icon
  5. Finally, copy the displayed value

Install Network Connector Agent

Requirements
  • Basic knowledge about Docker
  • Basic knowledge of Docker compose
  • The installed Compose must be the Compose standalone
  • Linux server (any distribution) with Docker installed and, at least, 1 vCPU and 1GB of memory
Recomendation

When installing Docker Compose in Linux distros, we highly recommend using the Linux Standalone binary.

IMPORTANT

Do not install the Network Connector Agent on senhasegura instances.

To install the Network Connector Agent, follow these steps:

  1. Provision a Linux machine with Docker installed on the network where you want senhasegura to have access
  2. Create a file (vim docker-compose.yml) with the Agent settings as shown below:
---
version: "3"

# Parameters of senhasegura Network Connector agent
x-network-connector-agent-variables: &network-connector-agent-variables
SENHASEGURA_FINGERPRINT: "CHANGEME" # Fingerprint of Network Connector Server
SENHASEGURA_AGENT_PORT: CHANGEME
SENHASEGURA_AGENT_SECONDARY: no

# Common settings for any senhasegura Network Connector agent
x-common-settings: &common-settings
image: "registry.senhasegura.io/network-connector/agent:latest"
restart: unless-stopped
networks:
- senhasegura-network-connector

services:
# Settings to connect in senhasegura primary instance
senhasegura-network-connector-agent-primary:
<<: *common-settings
environment:
<<: *network-connector-agent-variables
SENHASEGURA_ADDRESS: CHANGEME
SENHASEGURA_PORT: 51445

# Settings to connect in senhasegura second instance
senhasegura-network-connector-agent-secondary-001:
<<: *common-settings
environment:
<<: *network-connector-agent-variables
SENHASEGURA_ADDRESS: CHANGEME
SENHASEGURA_PORT: 51445

# Settings to connect in senhasegura third instance
senhasegura-network-connector-agent-secondary-002:
<<: *common-settings
environment:
<<: *network-connector-agent-variables
SENHASEGURA_ADDRESS: CHANGEME
SENHASEGURA_PORT: 51445

networks:
senhasegura-network-connector:
driver: bridge

The following fields must be changed:

  • SENHASEGURA_FINGERPRINT: See Get Network Connector Fingerprint section
  • SENHASEGURA_AGENT_PORT: Insert a port betewen 30000 e 30999. Choose one that is not in use
  • SENHASEGURA_AGENT_SECONDARY(optional): Insert yes or no to activate a secondary agent, which will be used in case the primary one is unavailable.
  • SENHASEGURA_ADDRESS: senhasegura IP instance address

Standalone Installation

Remove the following snippet from the file if your environment has only one senhasegura instance:

# Settings to connect in senhasegura second instance
senhasegura-network-connector-agent-secondary-001:
<<: *common-settings
environment:
<<: *network-connector-agent-variables
SENHASEGURA_ADDRESS: CHANGEME
SENHASEGURA_PORT: 51445

# Settings to connect in senhasegura third instance
senhasegura-network-connector-agent-secondary-002:
<<: *common-settings
environment:
<<: *network-connector-agent-variables
SENHASEGURA_ADDRESS: CHANGEME
SENHASEGURA_PORT: 51445

Cluster Installation

Add the following snippet if your senhasegura is in cluster mode for each instance:

# Settings to connect in senhasegura second instance
senhasegura-network-connector-agent-secondary-001:
<<: *common-settings
environment:
<<: *network-connector-agent-variables
SENHASEGURA_ADDRESS: CHANGEME
SENHASEGURA_PORT: 51445
IMPORTANT

Change the instance number in the senhasegura-network-connector-agent-secondary-001 line according to the number of instances in your cluster.

  1. Finally, run the command sudo docker-compose up -d to start the Agent container
TIP

You can see the Agent logs using the sudo docker-compose logs -f command.


Next steps

After setting up the Network Connector Server and installing the Agents, you need to configure the devices to use Network Connector.