Vagrant Mosh

Vagrant plugin to use Mosh to connect to box
Alternatives To Vagrant Mosh
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Vagrant Parallels979
3a month ago85May 22, 202312mitRuby
Vagrant Parallels Provider
Landrush666
53 years ago38May 06, 201954mitRuby
A Vagrant plugin that provides a simple DNS server for Vagrant guests
Vagrant Proxyconf494
53 years ago34July 03, 202018mitRuby
Vagrant plugin that configures the virtual machine to use proxies
Awesome Vagrant484
3 years ago2
A curated list of awesome Vagrant resources, plugins, tutorials and other nice things.
Vagrant Bindfs455
73 months ago54September 21, 2021mitRuby
A Vagrant plugin to automate bindfs mount in the VM
Vagrant Disksize407
24 years ago4October 26, 201824mitRuby
Vagrant plugin to resize disks in VirtualBox
Vagrant Vbox Snapshot383
157 years ago10November 24, 20158mitRuby
Vagrant plugin that wraps "VBoxManage snapshot"
Vagrant Vmware Esxi359
a year ago37July 02, 20225gpl-3.0Ruby
A Vagrant plugin that adds a vmware ESXi provider support.
Jenkins Bootstrap Shared320
a month ago3apache-2.0Groovy
Jenkins as immutable infrastructure made easy. A repository of shared scripts meant to be used as a git submodule. Packing Jenkins, plugins, and scripts into immutable packages and images.
Wpdistillery274
4 years ago3otherShell
WordPress Setup runner for Scotch Box
Alternatives To Vagrant Mosh
Select To Compare


Alternative Project Comparisons
Readme

vagrant-mosh Gem Version

Vagrant plugin to connect to box using Mosh.

Installation

$ vagrant plugin install vagrant-mosh

Usage

Just use it as you would normally use ssh command:

$ vagrant mosh

Notes

  1. You have to install Mosh both on host and box by yourself.
  2. Plugin has been tested to work with VirtualBox, AWS and DigitalOcean.
  3. If you are using VirtualBox, it's required to use private/public network (that is because we need to have remote IP address from the box).

Testing

Unfortunately, it's not that easy to write automated tests for it. The test should probably just run vagrant mosh, execute command in box and assert the result, but the way Mosh works doesn't allow to just execute the process.

Discussion on #mosh:

p0deje: can anybody help me run mosh programmatically?
p0deje: I want to run mosh from Ruby script, execute command and return
p0deje: the script works fine for SSH, but not for Mosh
p0deje: script itself is at https://gist.github.com/p0deje/c5dbfa0d137e8c11d3f5
chris2: i guess expect doesnt like mosh's efficient redrawing
...
chris2: perhaps you can work around by running mosh in tmux and exporting the output of tmux...
chris2: anyway, you need something that understands ANSI sequences

To test it manually, there is a Vagrantfile which helps you do that:

# start all boxes
$ bundle exec rake box:add
$ bundle exec vagrant up

$ bundle exec vagrant mosh static_ip   # test VirtualBox static IP networking
$ bundle exec vagrant mosh dynamic_ip  # test VirtualBox DHCP networking

# remove all boxes
$ bundle exec vagrant destroy
$ bundle exec rake box:remove

Also, it's possible to test remote providers (if you have DigitalOcean account):

$ export DIGITALOCEAN_TOKEN="your_token"
$ bundle exec vagrant up digitalocean
$ bundle exec vagrant mosh digitalocean
$ bundle exec vagrant destroy digitalocean

TODO

  1. Try to forward UDP ports rather finding remote IP address of the box.
  2. Add tests.
  3. Refactor to work as action.

Contributing

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally. (no automated tests exist at the moment)
  • Commit, do not mess with Rakefile, version, or history. If you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull.
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2015 Alex Rodionov. See LICENSE.md for details.

Popular Plugin Projects
Popular Vagrant Projects
Popular Libraries Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Ruby
Plugin
Vagrant
Virtualbox
Ip Address
Digitalocean