2015-12-02 14:23:39 +00:00
#+TITLE : Vagrant layer
2015-06-10 16:44:30 +00:00
2019-05-02 21:49:30 +00:00
#+TAGS : layer|tool
2015-06-10 16:44:30 +00:00
[[file:img/vagrant.png ]]
2019-05-07 20:05:06 +00:00
* Table of Contents :TOC_5_gh:noexport:
2017-05-22 14:16:12 +00:00
- [[#description ][Description ]]
- [[#features ][Features: ]]
- [[#install ][Install ]]
- [[#layer ][Layer ]]
- [[#vagrant ][Vagrant ]]
- [[#testing ][Testing ]]
2018-10-23 14:18:21 +00:00
- [[#key-bindings ][Key bindings ]]
2015-06-10 16:44:30 +00:00
* Description
This layer adds support for working with Vagrant using [[https://github.com/ottbot/vagrant.el ][vagrant.el ]] and
[[https://github.com/dougm/vagrant-tramp ][vagrant-tramp ]].
2015-06-10 21:16:01 +00:00
** Features:
2020-06-21 22:04:52 +00:00
- Manage boxes (under the ~SPC a t v~ prefix)
2018-09-19 03:54:47 +00:00
- Remote editing on Vagrant boxes via Tramp
2015-06-10 16:44:30 +00:00
* Install
** Layer
2016-01-06 05:21:55 +00:00
To use this configuration layer, add it to your =~/.spacemacs= . You will need to
add =vagrant= to the existing =dotspacemacs-configuration-layers= list in this
file.
2015-06-10 16:44:30 +00:00
*Note:* Since vagrant files are written in =ruby= it is recommended
to install the =ruby= layer as well.
** Vagrant
2020-10-03 18:48:37 +00:00
Follow the [[https://www.vagrantup.com/docs/installation#installing-vagrant ][Installing Vagrant ]] and [[https://www.vagrantup.com/intro/getting-started/index.html ][Getting Started ]] guides in
2019-05-26 20:58:52 +00:00
Vagrant's documentation.
2015-06-10 16:44:30 +00:00
** Testing
2019-05-26 20:58:52 +00:00
If you'd like to test this layer out in a simple way (for example to
2017-04-25 15:42:58 +00:00
make sure you have Vagrant configured correctly) there is a [[https://gist.github.com/anonymous/578279337caf180298cd91c61be995bc ][Vagrantfile ]]
2015-06-10 16:44:30 +00:00
in this directory.
2018-10-23 14:18:21 +00:00
* Key bindings
2015-06-10 16:44:30 +00:00
2020-06-21 22:04:52 +00:00
| Key binding | Description |
|---------------+------------------------------------------------------------------------------------------------|
| ~SPC a t v D~ | destroy a box |
| ~SPC a t v e~ | edit the =Vagrantfile= |
| ~SPC a t v H~ | halt (shut down) a box |
| ~SPC a t v p~ | (re)provision a box that is already up |
| ~SPC a t v r~ | resume a suspended box (you can also use =SPC V V= for this) |
| ~SPC a t v R~ | reload a box |
| ~SPC a t v s~ | view the status of running boxes in the current project |
| ~SPC a t v S~ | suspend a box |
| ~SPC a t v t~ | start a =vagrant-tramp-term= session - after start, edit files at =/vagrant:box_name:filename= |
| ~SPC a t v V~ | bring up a Vagrant box |