Install build-essential to build pfixtools
[vagrant-mail.git] / test-vagrant-salt / NOTES.rst
1 Notes about vagrant-salt usage
2 ==============================
3
4 Documentation links
5 -------------------
6
7 * https://docs.saltstack.com/en/latest/topics/tutorials/quickstart.html
8   Salt masterless quickstart
9
10
11 Quick commands
12 --------------
13
14 * Start a VM::
15
16     vagrant up
17
18 * Start a VM using libvirt provider instead of VirtualBox::
19
20     vagrant up --provider=libvirt
21
22 * SSH into a VM::
23
24     vagrant ssh gateway
25     vagrant ssh testvm
26
27 * Destroy a VM::
28
29     vagrant destroy
30
31 * Sync files and re-run salt::
32
33      vagrant rsync testvm && vagrant provision testvm
34
35 * Apply salt configuration (in an SSH session)::
36
37     sudo salt-call --local state.highstate
38
39 * Apply a specfic .sls file::
40
41     sudo salt-call --local state.sls common.packages
42
43 * List the current grains::
44
45     sudo salt-call --local grains.ls
46     sudo salt-call --local grains.items
47
48 * List the current pillar items::
49
50     sudo salt-call --local pillar.items
51
52
53 Random notes during the development of the project
54 --------------------------------------------------
55
56 * Architecture: a test VM is installed with a fully functionnal mailing system.  It is connected to a `gateway` VM which filters almost everything:
57
58     - HTTP communications are forwarded (to allow installing packets)
59     - emails are never forwarded but stored on the VM
60     - every other TCP and UDP ports are filtered
61