Agent is the component that connects your private infra-structure with Hoop. It act as a proxy connecting to a central gateway exposing any services in the scope of its network.
The agent can be installed in any Unix system. It requires an authentication key that is exposed as an environment variable:
In order to deploy it, the agent can run in two modes: as a standalone process (standard) or next to any running application (embedded), each one has its own advantages.
The standard mode runs the agent in a standalone process, it's recommended when you wish to connect to multiple kinds of resources in a single agent or having a more stable connection within your workloads. It's recommend if you wish to connect to:
- Port-Forward Internal Services
- Container Platforms (kubectl, aws ecs, etc)
- Act as a Jump Host
To create and run an agent in the standard mode, use the hoop admin command line issuing the command below:
export HOOP_DSN=$(hoop admin create agent dev) hoop start agent
The embedded mode is recommended when the context of a runtime application is needed. The agent could run in the background as another process in the operating system, or in a separated process close to the underline main application. This mode is recommended if you wish to:
- Execute ad-hoc tasks (rake tasks, django-admin, elixir mix tasks)
- Interactive console access
- Access REPL language environments (rails console, elixir, clojure, etc)
To create and run an agent in the embedded mode, use the hoop admin command line issuing the command below:
export HOOP_DSN=$(hoop admin create agent prod --mode embedded) hoop start agent
Authentication Keys (DSN)
To connect to a hoop gateway the agent requires an authentication key. Each one of them can be revoked any time, allowing to disconnect every resource that is associated with it.
- scheme - the protocol scheme to connect http(s) or grpc(s)
- name - the name of the authentication key
- auth-key - the authentication key
- host - the hostname or ip address of the gateway
- port - the port to connect to
- mode - the execution mode: standard or embedded
We recommend naming these resources with the name of your environment or the context of the network, examples:
Use the hoop command line to manage agent keys.
hoop admin create agent homolog
hoop admin create agent prod --mode embedded
Revoke a Key
hoop admin delete agent homolog
hoop admin get agents
DockerHerokuKubernetesUnix / Linuxplain text
UID NAME MODE VERSION HOSTNAME PLATFORM STATUS 22ab1d2f-... default standard unknown 5601881aa15e linux/arm64 ONLINE 7850eb2d-... homolog standard - - - -