Giter Club home page Giter Club logo

sublime-vagrant's Introduction

Sublime-vagrant

Implements common Vagrant commands.

  • Init Create a new Vagrantfile in the root directory of your project.
  • Status: Will show the status of this project's VM
  • Up: Starts this project's VM
  • Provision: Runs configured provisioners
  • Halt: Forcefully suspends the VM
  • Suspend: Suspends the VM
  • Resume: Resumes the VM
  • Reload: Reloads Vagrantfile (equivalent to halt then up)
  • Destroy: Destroys the VM. Be careful, you won't be asked to confirm.
  • Destroy & Up: Destroys the VM and starts it again. Useful for resetting to a known position.
  • Rsync: Rsync files from host to guest.

Settings

You can set up a different vagrant path if your Vagrant binary is not installed in the default location, or you're using Sublime-Vagrant on a windows machine.

{
    "vagrant_path": "/usr/bin/vagrant",
    "vagrantfile_path": "/vagrant",
    "additional_args": ['-h', '-v'],
    "output_to_window": true
}

By default Sublime-Vagrant will scan your first open folder and traverse up from there looking for a Vagrantfile, alternatively you may provide the "vagrantfile_path" setting which allows you to manually specify a relative path.

There are very few additional arguments you can pass to Vagrant so by default there are none in the setting file.

Contributors

If you submit any bug fixes or improvements, don't forget to add yourself to the list of contributors.

sublime-vagrant's People

Contributors

stubbs avatar timcooper avatar fxdgear avatar jbrooksuk avatar benmatselby avatar robotdisco avatar adamjgray avatar salgnt avatar

Stargazers

Joe Gasewicz avatar David Zhou avatar Саша Черных avatar Daniel Sposito avatar Thiago Marinho avatar Andrey avatar Arthur Alvim avatar DIEGO Araujo avatar Ian Douglas avatar Ayoub Allali avatar Chris Walz avatar Tom Hensel avatar Fillipe Amorim avatar  avatar Tim Duckworth avatar Barry Carlyon avatar Dídac Sabatés avatar Jacob Gabriel avatar CASSIUS avatar Koichi Shiraishi avatar  avatar  avatar Brandon avatar Joseph Chiocchi avatar Riccardo D'Angelo avatar  avatar Rowland Watkins avatar Sebastian avatar  avatar Niji avatar Gary Smith avatar roz avatar  avatar Masahiro Ueno avatar Tor Røttum avatar  avatar John Deatherage avatar Tom Bamford avatar Vasiliy Yorkin avatar Paul Canham avatar Joel Jucá avatar Masakazu Ishibashi avatar Brandon Summers avatar

Watchers

 avatar Aftab Naveed avatar James Cloos avatar

sublime-vagrant's Issues

How to use Vagrant

I just installed Vagrant Plugin, but I don't see any option in menu to start Vagrant, where can I find those commands to be executed?

[Bug] CR symbol in ends of the lines in Windows

1. Summary

I get CR break type in ends of lines.

I get normal break type behavior in any Windows terminal.

2. Expected behavior

No CR in ends of lines.

3. Actual behavior

For example, I run vagrant status command:

CR in thee end

4. Settings

My User/Vagrant.sublime-settings file:

{
    "output_to_window": true,
    "vagrant_path": "C:\\HashiCorp\\Vagrant\\bin\\vagrant.exe"
}

5. Steps to reproduce

I reproduce the problem in a version of Sublime Text without plugins and user settings.

I install Vagrant via Package Control → I restart Sublime Text → I run any Vagrant command → I get CR symbol in line ends output.

If I run same command in Windows terminal (ConEmu, for example), I don't get the problem.

6. Environment

Operating system and version:
Windows 10 Enterprise LTSB 64-bit EN
Sublime Text:
Build 3126
Vagrant
1.9.1

Thanks.

[Feature request] Custom Vagrant command

1. Request

It would be nice, if would be possible to use custom Vagrant commands in Vagrant Sublime Text plugin.

2. Justification

Besides the commands that are already available in this plugin, there are other Vagrant commands. Also, users may use Vagrant plugins. Now users needs input not-included Vagrant commands in terminal, not Sublime Text. It may spend a time.

3. Desirable behavior

Ctrl+Shift+PVagrant: Custom Command → quick panel open → user print any Vagrant command → Enter → command successful run.

4. Examples on other apps

It implemented in Git plugin.

Ctrl+Shift+PGit: Custom Command

CustomCommand1

Quick panel open →

CustomCommand2

user prints any git command → Enter → command successful run.


Thanks.

Using thread module directly is a bad idea

The threading module is a much better way of handling concurrency than the thread module. While the latter works, the former feels cleaner.

Multiprocessing is better than both of them due to the way CPython is implemented but Sublime Text doesn't have the best of supports for it.

Consider this issue a request to stop using the thread module and use the threading module instead.

Does not work on Windows

On Windows there is no /usr/bin/vagrant. There should be a way to specify an executable via settings.

PATH is (probably) ignored when interacting with Vagrant

I use the Parallels Desktop provider for Vagrant. This provider requires access to prlctl, which is a commandline manager for Parallels VMs.

However, when I try to check the status of my VM via vagrant status from the command pallete, I get the following error to the Sublime console:

/usr/bin/vagrant status
The provider 'parallels' that was requested to back the machine
'top-secret' is reporting that it isn't usable on this system. The
reason is shown below:

Vagrant could not detect Parallels Desktop! Make sure it is properly installed.
Vagrant uses the `prlctl` binary that ships with Parallels Desktop, and requires
this to be available on the PATH. If Parallels Desktop is installed, please find
the `prlctl` binary and add it to the PATH environmental variable.

However, from my Terminal, I see prlctl as being available and working with Vagrant and Parallels from Terminal works as usual:

which prlctl
/usr/local/bin/prlctl

Unfortunately I cannot help with a PR as I do not speak Python.:(

Let me know if I can provide additional information. Thanks for your help!

Host OS: Darwin Air.local 14.3.0 Darwin Kernel Version 14.3.0

Plugin does't detect already initialized boxes

I'm using the latest build of the Sublime Text 3 (3047). I installed the plugin, but I can't use other commands than "Vagrant init", which I don't want to use, because box has been already initialized.

Any suggestions?

Crashes Sublime Text 2 :(

Installing this package on OSX 10.8.2 on Sublime Text 2.0.1 Build 2217 means that everytime I open the command palette, Sublime Hangs and needs to be force quit.

Nothing shows in the console in Sublime.

Adding it to ignored_packages makes things work, taking it back out of ignored_packages breaks it again.

Any ideas?

Provider 'virtualbox' not found, possible issue with additional_args not working?

Hi

Just installed this on my OSX ST3 install as I've started using Vagrant and it seemed like an obvious thing to do..

I'm having issues however getting it to work, whenever I 'up' a box, the plugin fails to find the 'virtualbox' provider showing the following message before downloading then trying to (and failing) install the virtualbox provider.

==>  Provider 'virtualbox' not found. We'll automatically install it now...
The installation process will start below. Human interaction may be
     required at some points. If you're uncomfortable with automatically
     installing this provider, you can safely Ctrl-C this process and install
     it manually.

I know this is installed as if i do an 'up' in the same directory as this project, it completes fine; using the 'virtualbox' provider as follows:

My-MBP:Project1 username$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'minimal/trusty64'...

I've located my vagrant binary with: 'which vagrant' which points me to '/usr/local/bin/vagrant' which is then referenced in my plugin user config as follows:
"vagrant_path": "/usr/local/bin/vagrant",

I've tried adding custom parameters/arguments to force the provider as shown on vagrants site (https://www.vagrantup.com/docs/providers/basic_usage.html) with the following '--provider=virtualbox' however I cannot get the 'additional_args' config setting to work...

I've tried:
"additional_args": [--provider=virtualbox]
Which follows your example given but that errors out in Sublime with:

  • Error trying to parse settings: Unexpected character, expected a comma or closing bracket in Packages/User/Vagrant.sublime-settings:3:23

"additional_args": ["--provider=virtualbox"]
"additional_args": "--provider=virtualbox"
Which gets through Sublimes/plugin parser, however outputs into ST's console:

  • AttributeError: 'list' object has no attribute 'items'

"additional_args": {'--provider=virtualbox'}
"additional_args": {"--provider=virtualbox"}
Which gives the following ST error:

  • Error trying to parse settings: Expected value in Packages/User/Vagrant.sublime-settings:3:22

Interestingly, replacing --provider=virtualbox with -h or -v also fails on the same error which makes me think that there may be an underlying issue with the additional_args config parameter.

I'm not sure where to go else now... as Vagrant is running fine on my system running the same commands in the same place with the same Vagrantfile...

Any help would be greatly appreciated, I wish I could offer my assistance, but I've never touched Ruby before, so would be learning to try and fix. =(

A Vagrant manage view

Something like GitSavvy's status page, that allows one to see the current state and use key-bindings to perform actions, to manage the git repository.

It would be nice if something that can be re-used to manage the Vagrant Machines.

It's Big but would be awesome.

[Bug] vagrantfile_path setting don't work

1. Summary

It would be nice, if SublimeVagrant may find Vagrantfile in any sidebar folder, not exclusively in top sidebar folder.

2. Settings

My User/Vagrant.sublime-settings file:

{
    "output_to_window": true,
    "vagrant_path": "C:\\HashiCorp\\Vagrant\\bin\\vagrant.exe",
    "vagrantfile_path": "D:\\chocolatey-test-environment\\Vagrantfile"
}

chocolatey-test-environment sidebar folder — is folder with my Vagrantfile. Others folders — don't have Vagrantfile.

3. Expected behavior

If chocolatey-test-environment folder in top of my sidebar, Vagrant commands run successful.

Top

4. Actual behavior

But if chocolatey-test-environment folder not in top of my sidebar, Vagrant commands don't run.

Not top

I get in Sublime Text console:

Searching : D:\CriticMarkup
Unable to find Vagrantfile, found .git folder and assumed this is the root of your project.

SublimeVagrant don't see vagrantfile_path setting.

5. Steps to reproduce

I reproduce the problem in a version of Sublime Text without plugins and user settings.

If chocolatey-test-environment folder in top of my sidebar, I get expected behavior.

If chocolatey-test-environment folder not in top of my sidebar, I get expected behavior.

6. Environment

Operating system and version:
Windows 10 Enterprise LTSB 64-bit EN
Sublime Text:
Build 3126
Vagrant:
1.9.1

Thanks.

Plugin searches for Vagrantfile too often.

This plugin is searching for a Vagrantfile constantly according to my console. This shouldn't be happening. If it can't find the file it should fail silently and stop trying. There's some projects of mine where I choose not to include my Vagrantfiles and it's really annoying to constantly be taking hits to performance just for this plugin.

A command to run a single command in machine

There are often times when I would want to SSH into the machine, to run a single shell command, possibly to compile a single file. It would be nice if somehow we could allow for a single command to executed through vagrant ssh -c, making it a build-system-like thing.

It would then be possible to create a build-system target command, allowing this to be used as a build target. So much awesome!

additional_args throws AttributeError

Hi,

I'm having some trouble getting this plugin to work with additional_args. Here's my configuration:

Vagrant.sublime-settings:

[[[
{
"vagrant_path": "/usr/bin/vavgrant",
"additional_args": ["--provider=esxi"]
}
]]]

When I attempt to run any Vagrant command, I get:

[[[
AttributeError: 'list' object has no attribute 'items'
]]]

I'm guessing I have some syntax error in my configuration, the plugin expects a dictionary, but is receiving an array.

Any guidance appreciated!

Rowland

[Feature Request] Handle Multiple VMs

If I use the Vagrant Status command in a proj with multiple VMs, I get no popup, and see this in the Sublime console:

/usr/bin/vagrant status
Current machine states:

foo_vm             saved (virtualbox)
bar_vm             saved (virtualbox)
baz_vm            not created (virtualbox)

This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.