-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(agent,pkg): add connector mode to agent #3115
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
henrybarreto
force-pushed
the
feat/agent_connector
branch
from
September 20, 2023 17:36
0325d6d
to
56531c9
Compare
henrybarreto
force-pushed
the
improvement/tunnel_as_agent_property
branch
3 times, most recently
from
September 20, 2023 20:55
187b9aa
to
ecc0f48
Compare
henrybarreto
force-pushed
the
feat/agent_connector
branch
2 times, most recently
from
September 20, 2023 21:31
8a39840
to
98c0e38
Compare
henrybarreto
force-pushed
the
improvement/tunnel_as_agent_property
branch
from
September 20, 2023 22:22
ecc0f48
to
92a53e6
Compare
henrybarreto
force-pushed
the
feat/agent_connector
branch
2 times, most recently
from
September 20, 2023 22:33
ba5eaf1
to
601d7ae
Compare
henrybarreto
force-pushed
the
improvement/tunnel_as_agent_property
branch
from
September 20, 2023 22:34
92a53e6
to
c9a1c1a
Compare
henrybarreto
force-pushed
the
feat/agent_connector
branch
5 times, most recently
from
September 21, 2023 15:10
e701a30
to
3e1f348
Compare
henrybarreto
force-pushed
the
feat/agent_connector
branch
5 times, most recently
from
September 21, 2023 17:30
bec4518
to
fea1e19
Compare
henrybarreto
force-pushed
the
improvement/tunnel_as_agent_property
branch
2 times, most recently
from
September 21, 2023 17:39
74ffec9
to
fbb157c
Compare
henrybarreto
force-pushed
the
feat/agent_connector
branch
from
September 21, 2023 17:42
fea1e19
to
915cdb4
Compare
henrybarreto
force-pushed
the
improvement/tunnel_as_agent_property
branch
from
September 21, 2023 19:23
fbb157c
to
aa256f6
Compare
henrybarreto
force-pushed
the
feat/agent_connector
branch
from
September 21, 2023 19:24
915cdb4
to
49429fd
Compare
henrybarreto
force-pushed
the
improvement/tunnel_as_agent_property
branch
from
September 21, 2023 19:42
aa256f6
to
7f1b7a0
Compare
henrybarreto
force-pushed
the
feat/agent_connector
branch
from
October 9, 2023 14:14
3987683
to
b260ea4
Compare
henrybarreto
force-pushed
the
feat/agent_connector
branch
6 times, most recently
from
October 11, 2023 14:07
6bc9227
to
f3df040
Compare
henrybarreto
changed the base branch from
master
to
fix/ssh_stderr_from_agent
October 11, 2023 14:07
henrybarreto
force-pushed
the
feat/agent_connector
branch
3 times, most recently
from
October 11, 2023 14:14
1bbe4dd
to
bbc781a
Compare
henrybarreto
force-pushed
the
feat/agent_connector
branch
from
October 13, 2023 13:09
bbc781a
to
71537c1
Compare
henrybarreto
force-pushed
the
feat/agent_connector
branch
6 times, most recently
from
October 13, 2023 18:48
0055571
to
bab99af
Compare
What is the ShellHub Connector? ShellHub Connector is a new kind of ShellHub Agent that turns [Docker](https://www.docker.com/) containers into ShellHub Devices. It instances a new ShellHub Agent, in memory, for each container running, redirecting the SSH IO, connections in general, and authentication credentials to its file system. > As most of the containers don't have passwords set for its users per default, it rejects the connection every time for users without credentials. What is working now? The initial implementation has support for these kinds of connections: - [x] Shell - [x] Exec - [x] Heredoc Running Connector To initialize the ShellHub Connector, enter the `agent/` directory, build and run the agent's binary with *connector* sub command. ```sh go build -ldflags "-X main.AgentVersion=latest" -o agent-native && SERVER_ADDRESS="http://localhost/" PRIVATE_KEYS="/tmp/shellhub/" TENANT_ID="00000000-0000-4000-0000-000000000000" ./agent-native connector ``` Environmental variables To configure the ShellHub Connector, you can/must provide these environmental variables. - SERVER_ADDRESS (**required**) Set the ShellHub server address of the agent will use to connect - PRIVATE_KEYS (**required**) Specify the path to store the devices/containers private keys. If not provided, the agent will generate a new one. - TENANT_ID (**required**) Sets the account tenant ID used during communication to associate the devices to a specific tenant. - KEEPALIVE_INTERVAL Determine the interval to send the keep alive message to the server. This has a direct impact on the bandwidth used by the device when in idle state. Docker notes As this implementation uses the Docker Client, you can override the environment variables provided for Docker in order to change some behaviors, but the ShellHub Connector doesn't guarantee its right operation with these changes. Check [Docker Client documentation about this](https://pkg.go.dev/github.com/docker/[email protected]+incompatible/client# FromEnv) for more information.
henrybarreto
force-pushed
the
feat/agent_connector
branch
from
October 13, 2023 19:16
bab99af
to
d85f2ec
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Epic
kind/feature
New feature or request
status/ready-for-testing
status/require-tests
status/work-in-progress
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the ShellHub Connector?
ShellHub Connector is a new kind of ShellHub Agent that turns
Docker containers into ShellHub Devices. It instances
a new ShellHub Agent, in memory, for each container running, redirecting the SSH
IO, connections in general, and authentication credentials to its file system.
What is working now?
The initial implementation has support for these kinds of connections:
Running Connector
To initialize the ShellHub Connector, enter the
agent/
directory, build andrun the agent's binary with connector sub command.
Environmental variables
To configure the ShellHub Connector, you can/must provide these environmental
variables.
SERVER_ADDRESS (required) Set the ShellHub server address of the agent will
use to connect
PRIVATE_KEYS (required) Specify the path to store the devices/containers
private keys. If not provided, the agent will generate a new one.
TENANT_ID (required) Sets the account tenant ID used during communication
to associate the devices to a specific tenant.
KEEPALIVE_INTERVAL Determine the interval to send the keep alive message to
the server. This has a direct impact on the bandwidth used by the device when
in idle state.
Docker notes
As this implementation uses the Docker Client, you can override the environment
variables provided for Docker in order to change some behaviors, but the
ShellHub Connector doesn't guarantee its right operation with these changes.
Check Docker Client documentation about this for more information.
UI