From 881c3a6e78dddc6752bf7bc5c24efca1cbf16bff Mon Sep 17 00:00:00 2001 From: Jeff Escalante Date: Thu, 28 May 2020 12:47:24 -0400 Subject: [PATCH] apply changes to provisioning guide --- .../intro/getting-started/provisioning.mdx | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/website/pages/intro/getting-started/provisioning.mdx b/website/pages/intro/getting-started/provisioning.mdx index 2adf11cbe..fb5010487 100644 --- a/website/pages/intro/getting-started/provisioning.mdx +++ b/website/pages/intro/getting-started/provisioning.mdx @@ -23,8 +23,25 @@ so that the guest machine can be repeatably created and ready-to-use. ## Installing Apache We will just setup [Apache](http://httpd.apache.org/) for our basic project, -and we will do so using a shell script. Create the following shell script -and save it as `bootstrap.sh` in the same directory as your Vagrantfile: +and we will do so using a shell script. First, we need to add some html content +which will be served by the Apache webserver. This will act as our DocumentRoot +folder. To do this create a subdirectory named `html` in the project root +directory. In the `html` directory create a html file named `index.html`. +For example: + +```html + + + +

Getting started with Vagrant!

+ + +``` + +The script below will symlink our shared folder `/vagrant` so that apache serves +the `html` folder when accessing the root page locally. Now, create the +following shell script and save it as `bootstrap.sh` in the same directory as +your Vagrantfile: ```bash #!/usr/bin/env bash @@ -52,28 +69,14 @@ The "provision" line is new, and tells Vagrant to use the `shell` provisioner to setup the machine, with the `bootstrap.sh` file. The file path is relative to the location of the project root (where the Vagrantfile is). -We also need to add some html content which will be served by the Apache webserver. -To do this create a subdirectory named `html` in the project root directory. -In the `html` directory create a html file named `index.html`. -For example: - -```html - - - -

Getting started with Vagrant!

- - -``` - ## Provision! After everything is configured, just run `vagrant up` to create your machine and Vagrant will automatically provision it. You should see the output from the shell script appear in your terminal. If the guest machine is already running from a previous step, run `vagrant reload --provision`, -which will quickly restart your virtual machine, skipping the initial -import step. The provision flag on the reload command instructs Vagrant to +which will quickly restart your virtual machine, skipping the initial import +step. The provision flag on the reload command instructs Vagrant to run the provisioners, since usually Vagrant will only do this on the first `vagrant up`.