question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Tunneling Context to Fab

See original GitHub issue

Description

This would be very helpful for me because it would make it very easy to for example connect to a remote MySQL server using my command line MySQL client.

We could use a “with” context statement, something like:

with tunnel(local=3307, remote=3306):
    local('mysql --port=3007 --host=localhost' mydb < db/dbdump.sql')

This would eliminate the need to upload mysql dump file to the server just to be able to run import.

Another application could be for administering Cherokee web servers.

Cherokee web admin by default is only accessible from the server that it’s running on. So you want to access the admin you have to tunnel into the server and access the admin interface using a local port. This could also be simplified with this functionality.

with tunnel(local=9090, remote=9090):
   sudo('cherokee-admin')
   prompt('Stop cherokee admin?')

That last line would keep the tunnel open until it’s closed by providing input.


Originally submitted by Taras Mankovski (tarasm) on 2009-11-02 at 09:30am EST

Relations

  • Related to #38: Implement tunnelling

Issue Analytics

  • State:open
  • Created 12 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
bitprophetcommented, Apr 9, 2016

#939 is still in a release bucket, I just punted it from the upcoming 1.11 because I needed to cut some stuff, but it’ll get priority for the next feature cycle. (And it looks like #1218 supersedes #939 so I’ll probably end up merging that & crediting #939 in the changelog.)

0reactions
naphthalenecommented, Apr 8, 2016

Is there any plan to resolve this issue? There are two outstanding pull requests that together resolve this, but they haven’t been reviewed? Any way we could speed this along? #939, #1218

I’ve been using the code in #1218 with no problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Context Managers - Fabric documentation
fabric.context_managers. cd (path)¶. Context manager that keeps directory state when calling remote operations. Any calls to run , sudo , get , or...
Read more >
Python ssh tunneling over multiple machines with agent
A little context is in order for this question: I am making an application that copies files/folders from one machine to another in...
Read more >
Atomic-scale control of tunneling in donor-based devices
However, critical challenges in atomically precise fabrication have ... is also widely used in the context of quantum dots, where the tunnel ......
Read more >
Fabrication of on-chip probes for double-tip scanning ... - arXiv
Fabrication of on-chip probes for double-tip scanning tunneling microscopy. Authors:Maarten Leeuwenhoek, Freek Groenewoud, Kees van Oosten, ...
Read more >
Fabrication methods of single-molecule junctions. ( a )...
Quantum Dots, Tunneling and Kondo effect | ResearchGate, the professional network ... electrical junctions in the context of various theoretical frameworks, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found