Tip: Command Line Tools
Hey fans! This is the first of a series of tips that will go over some skills that will help you in your personal and or professional work in devops.
Tools Needed
Windows - Cygwin, Gitbash, Powershell
Linux - Terminal
MacOs - Terminal
Scenario - You need to test how your application will handle a remote service becoming unavailable
- Run an ssh tunnel, you can use
Windows
plink.exe -L 8080:localhost:8080 user@remote-host.example.com
Linux/Mac Os
ssh -D 8080 -C -N user@remote-host.example.com
- Run your application on localhost pointing to the remote service url as (localhost:8080/contextpath).
- Test to make sure all is well with the connection.
- Disconnect the ssh tunnel and watch how your application handles the failed connections.
- If your application barfs, it's time to look at circuit breakers (saving this for another topic).
Find out more: