Create a 2-VMs architecture
[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 * SSH into a VM::
19
20     vagrant ssh gateway
21     vagrant ssh testvm
22
23 * Destroy a VM::
24
25     vagrant destroy
26
27 * Apply salt configuration (in an SSH session)::
28
29     sudo salt-call --local state.highstate
30
31 * Apply a specfic .sls file::
32
33     sudo salt-call --local state.sls common.packages
34
35 * List the current grains::
36
37     sudo salt-call --local grains.ls
38     sudo salt-call --local grains.items
39
40
41 Random notes during the development of the project
42 --------------------------------------------------
43
44 * Architecture: a test VM is installed with a fully functionnal mailing system.  It is connected to a `gateway` VM which filters almost everything:
45
46     - HTTP communications are forwarded (to allow installing packets)
47     - emails are never forwarded but stored on the VM
48     - every other TCP and UDP ports are filtered
49