Skip to content

berttejeda/bert.docs.vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents generated with DocToc

Vagrant Labs

This repository contains a set of interactive documents for learning vagrant.

These are neatly packaged, self-contained HTML files bearing the .hta file extension, which elevates the documents to full-blown applications on the Windows platform.

As such, these documents are meant to be executed from a Windows host, but you can simply rename the document(s) to .html for viewing content on non-Windows operating systems.

Of course, you can use whatever file extension of your choosing when rebuilding the document(s).

Added Bonus: With the files renamed/built as .html you can drop these on a web server and leverage the same level of access granted to the .hta's so long as you are accessing them via Internet Explorer (with ActiveX enabled).

Lab 1

In Lab 1, you will make use of Vagrant for setting up a localized lab for a hands-on vagrant learning experience.

Here's what's covered:

  • What is vagrant?
  • How to install Vagrant on Windows/Linux/MacOS
  • How to prepare a test environment for Vagrant

Lab 1 - Download

For your convenience, I've generated Lab 1 as both a .hta and a .html.

Simply right click either of the below links, choose Save link as and launch:

Modifying/Rebuilding the Document(s)

Requirements

If you want to make changes to the content and rebuild the documents, you'll need to install some requirements:

  • optional:
    • python 2.7+ (only if you plan on installing pandoc python module, i.e. pip install pandoc)
    • cmder(full version is best, as it ships with git-bash)
    • ansible-taskrunner # Don't worry, we're just utilizing the tasks command in bash mode, so no ansible needed!
  • mandatory:
    • pandoc
    • pp (Pre-compiled binaries available for Windows and Linux)

HowTo

To re-build the document, you'll need to grab a copy of the tasks command, which you can install by following the below directions:

Once you've installed/downloaded the tasks command, invoking the build script can be done as follows:

  • From a powershell terminal
    &tasks run -s 'lab1/vagrant-lab1.markdown' 'lab1/includes/*.md' -o lab1/vagrant-lab1.hta -r https://github.com/berttejeda/bert.docs.git -t lab1/templates/vagrant-lab1.html ---make build
    • Invoking the command above with the --dry flag will result in a noop run, and will display something similar to:
      C:\ProgramData\chocolatey\bin\pp.exe -D VERSION_STRING=19.08.08.00 -D vagrant_machine=default lab1/vagrant-lab1.markdown lab1/includes/vagrant.introduction.md lab1/includes/vagrant.lab.md | C:\ProgramData\chocolatey\bin\pandoc.exe -o lab1/vagrant-lab1.hta -c /tmp/bert.docs/_common/templates/default.css -H /tmp/bert.docs/_common/templates/header.html --template lab1/templates/vagrant-lab1.html -V VERSION_STRING=19.08.08.00 -V docroot=/tmp/bert.docs --self-contained --standalone
  • From git-bash/cmder/cygwin, etc
    tasks run -s 'lab1/vagrant-lab1.markdown' 'lab1/includes/*.md' -o lab1/vagrant-lab1.hta -r https://github.com/berttejeda/bert.docs.git -t lab1/templates/vagrant-lab1.html ---make build
    • Invoking the command above with the --dry flag will display something similar to:
      pp -D VERSION_STRING=19.08.08.00 -D vagrant_machine=default lab1/vagrant-lab1.markdown lab1/includes/vagrant.introduction.md lab1/includes/vagrant.lab.md | pandoc -o lab1/vagrant-lab1.hta -c /tmp/bert.docs/_common/templates/default.css -H /tmp/bert.docs/_common/templates/header.html --template lab1/templates/vagrant-lab1.html -V VERSION_STRING=19.08.08.00 -V docroot=/tmp/bert.docs --self-contained --standalone