OSDN Git Service

Regular updates
[twpd/master.git] / vagrant.md
1 ---
2 title: Vagrant
3 category: Devops
4 layout: 2017/sheet
5 intro: |
6  [Vagrant](http://vagrantup.com) lets you build isolated virtual environments for your apps.
7 ---
8
9 ### Get started
10
11 Add some base boxes:
12 {: .-setup}
13
14 ```bash
15 vagrant box add precise64 http://files.vagrantup.com/precise64.box
16 ```
17
18 Work it:
19
20 ```bash
21 mkdir test_box
22 cd test_box
23 vagrant init precise64
24 ```
25
26 Run it:
27
28 ```bash
29 vagrant up
30 vagrant ssh
31 ```
32
33 To stop, use one of the following:
34
35 ```bash
36 vagrant ssh        # then: sudo shutdown -h now
37 vagrant suspend
38 vagrant destroy    # !!
39 ```
40
41 ### Also see
42
43 * [Vagrant website](http://vagrantup.com) _(vagrantup.com)_
44 * [Vagrantfile cheatsheet](./vagrantfile)