cheatsheets/vagrant.md

44 lines
645 B
Markdown
Raw Permalink Normal View History

2013-10-14 02:36:58 +00:00
---
title: Vagrant
2015-11-24 05:11:34 +00:00
category: Devops
2017-10-18 12:33:52 +00:00
intro: |
[Vagrant](http://vagrantup.com) lets you build isolated virtual environments for your apps.
2013-10-14 02:36:58 +00:00
---
2013-08-24 07:43:10 +00:00
### Get started
Add some base boxes:
2017-10-18 12:33:52 +00:00
{: .-setup}
2013-08-24 07:43:10 +00:00
2017-10-18 12:33:52 +00:00
```bash
vagrant box add precise64 http://files.vagrantup.com/precise64.box
```
2013-08-24 07:43:10 +00:00
Work it:
2017-10-18 12:33:52 +00:00
```bash
mkdir test_box
cd test_box
vagrant init precise64
```
2013-08-24 07:43:10 +00:00
Run it:
2017-10-18 12:33:52 +00:00
```bash
vagrant up
vagrant ssh
```
2013-08-24 07:43:10 +00:00
To stop, use one of the following:
2017-10-18 12:33:52 +00:00
```bash
vagrant ssh # then: sudo shutdown -h now
vagrant suspend
vagrant destroy # !!
```
2013-08-24 07:43:10 +00:00
2017-10-18 12:33:52 +00:00
### Also see
2013-08-24 07:43:10 +00:00
2017-10-18 12:33:52 +00:00
* [Vagrant website](http://vagrantup.com) _(vagrantup.com)_
* [Vagrantfile cheatsheet](./vagrantfile)