Add iptables rules to testvm
[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 * Apply salt configuration (in an SSH session)::
32
33     sudo salt-call --local state.highstate
34
35 * Apply a specfic .sls file::
36
37     sudo salt-call --local state.sls common.packages
38
39 * List the current grains::
40
41     sudo salt-call --local grains.ls
42     sudo salt-call --local grains.items
43
44 * List the current pillar items::
45
46     sudo salt-call --local pillar.items
47
48
49 Random notes during the development of the project
50 --------------------------------------------------
51
52 * Architecture: a test VM is installed with a fully functionnal mailing system.  It is connected to a `gateway` VM which filters almost everything:
53
54     - HTTP communications are forwarded (to allow installing packets)
55     - emails are never forwarded but stored on the VM
56     - every other TCP and UDP ports are filtered
57