Skip to content
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

Fixes docker scripts for demo to work properly #66

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mdjunior
Copy link
Contributor

Context

The demo using docker-compose needs tweaking to work properly. This PR addresses current issues by providing a solution to using the demo.

Steps to use demo

To start the demo, you need create a builded versions after clonning repo:

make release

After it, we can run the demo:

cd docker
make install

To configure gsh-client:

../dist/darwin/amd64/gsh target-add local http://localhost:8000 -s

Now, you need crate a user with email admin@example.com. Please, check that we are using macOS keychain to store credentials.

../dist/darwin/amd64/gsh login -s keychain

Configure a role to allow the ssh access to docker with gsh-agent (attention, this is a very permissive role):

../dist/darwin/amd64/gsh role-add docker -s 172.16.0.0/12 -d 172.16.0.0/12 -u root
../dist/darwin/amd64/gsh role-assign docker admin@example.com

Check the gsh-agent docker IP using docker inspect gsh_target_machine. After that, change the IPs in the following command to get the SSH call to connect to the target docker.

../dist/darwin/amd64/gsh h -d -u root -p 22000 -s 172.23.0.1 172.23.0.5   

The command will look like:

ssh -i /Users/manoel.junior/.gsh/certs/local/RDaaz8s9z4oU5r2Iocqy4W1SSkBPeq9l -i /Users/manoel.junior/.gsh/certs/local/RDaaz8s9z4oU5r2Iocqy4W1SSkBPeq9l-cert.pub -l root -p 22000 172.20.0.5

Remove the destination IP at the end and put it as localhost since docker is forwarding the port to your computer.

ssh -i /Users/manoel.junior/.gsh/certs/local/RDaaz8s9z4oU5r2Iocqy4W1SSkBPeq9l -i /Users/manoel.junior/.gsh/certs/local/RDaaz8s9z4oU5r2Iocqy4W1SSkBPeq9l-cert.pub -l root -p 22000 localhost 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant