6.1 Starting at the End
Setup to Follow Along
Once your classroom VM is available connect using SSH.
1vagrant ssh
This VM is preloaded with a Salt configuration to build this server into a simple web server consisting of nginx serving a simple static website form /var/www/html.
Run Salt locally on this server using:
1sudo salt-call state.highstate
This command will take a while to run, during which nothing will appear to happen. On completion you will see results dumped to the screen.
On your host computer, open a web browser and visit http://localhost:35555. You will see a simple web site being served from the VM.
6.1.1 What did we just do?
When the VM was set up several things were preconfigured (if you’re curious—and you should be—check out sfs/classroom/provisioning/build on your host computer1).
- Some tools required for the setup scripts were installed.
- salt was installed using the bootstrap script we used in Chapter 5.1.
- Some salt configuration files where put in place.
- A set of files describing the configuration we want on our machine where copied from a Git repository.
- The website files where put in place.
You then logged into this prepared machine and used salt-call to instruct Salt to ensure that the machine was configured according to the specification copied during VM setup.
We will now spend the next few chapters learning how to set this up from scratch and in doing this we will learn a lot of the core ideas behind Salt’s configuration management functionality.