-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* master: Bump version to 1.4.0 website: Fix "Install Packer" url Fix sidebar border website: Move media-related properties to _media_queries.less website: Fix indentation Fix footer at bottom Added website sources test/unit: Move common cases to the shared example driver: Use most recent DHCP lease when determining IP
- Loading branch information
Showing
61 changed files
with
9,929 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module VagrantPlugins | ||
module Parallels | ||
VERSION = '1.4.0.rc1' | ||
VERSION = '1.4.0' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Website: docs | ||
./build | ||
./Rakefile | ||
|
||
.DS_Store | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "less", "~> 2.2.2" | ||
gem "middleman", "~> 3.2.0" | ||
gem "middleman-deploy", "~> 1.0" | ||
gem "rack-contrib", "~> 1.1.0" | ||
gem "redcarpet", "~> 2.2.2" | ||
gem "therubyracer", "~> 0.12.0" | ||
gem "thin", "~> 1.5.0" | ||
|
||
group :development do | ||
gem "highline", "~> 1.6.15" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: bundle exec thin start -p $PORT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Vagrant Parallels Documentation | ||
|
||
There are sources for documentation pages: | ||
http://parallels.github.io/vagrant-parallels/docs/ | ||
|
||
This is a [Middleman](http://middlemanapp.com) project, which builds a static | ||
site from these source files. | ||
|
||
## Contributions Welcome! | ||
|
||
If you find a typo or you feel like you can improve the HTML, CSS, or | ||
JavaScript, we welcome contributions. Feel free to open issues or pull | ||
requests like any normal GitHub project, and we'll merge it in. | ||
|
||
## Running the Site Locally | ||
|
||
Running the site locally is simple. Clone this repo and run the following | ||
commands: | ||
|
||
``` | ||
$ bundle | ||
$ bundle exec middleman server | ||
``` | ||
|
||
Then open up `localhost:4567`. Note that some URLs you may need to append | ||
".html" to make them work (in the navigation and such). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'middleman-gh-pages' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
set :css_dir, 'stylesheets' | ||
set :js_dir, 'javascripts' | ||
set :images_dir, 'images' | ||
|
||
# Use the RedCarpet Markdown engine | ||
set :markdown_engine, :redcarpet | ||
set :markdown, fenced_code_blocks: true | ||
|
||
set :relative_links, true | ||
|
||
# Use relative URLs | ||
activate :relative_assets | ||
|
||
# Build-specific configuration | ||
configure :build do | ||
activate :asset_hash | ||
activate :minify_css | ||
activate :minify_javascript | ||
end | ||
|
||
activate :deploy do |deploy| | ||
deploy.remote = "origin" | ||
deploy.method = :git | ||
deploy.branch = "gh-pages" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
require "rack" | ||
require "rack/contrib/not_found" | ||
require "rack/contrib/response_headers" | ||
require "rack/contrib/static_cache" | ||
require "rack/contrib/try_static" | ||
|
||
require File.expand_path("../lib/redirect_to_docs", __FILE__) | ||
|
||
# Properly compress the output if the client can handle it. | ||
use Rack::Deflater | ||
|
||
# Redirect the homepage to the latest documentation | ||
use HashiCorp::Rack::RedirectToDocs | ||
|
||
# Set the "forever expire" cache headers for these static assets. Since | ||
# we hash the contents of the assets to determine filenames, this is safe | ||
# to do. | ||
use Rack::StaticCache, | ||
root: "build", | ||
urls: ["/images", "/javascripts", "/stylesheets"], | ||
duration: 2, | ||
versioning: false | ||
|
||
# For anything that matches below this point, we set the surrogate key | ||
# for Fastly so that we can quickly purge all the pages without touching | ||
# the static assets. | ||
use Rack::ResponseHeaders do |headers| | ||
headers["Surrogate-Key"] = "page" | ||
end | ||
|
||
# Try to find a static file that matches our request, since Middleman | ||
# statically generates everything. | ||
use Rack::TryStatic, | ||
root: "build", | ||
urls: ["/"], | ||
try: [".html", "index.html", "/index.html"] | ||
|
||
# 404 if we reached this point. Sad times. | ||
run Rack::NotFound.new(File.expand_path("../build/404.html", __FILE__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module SidebarHelpers | ||
# This helps by setting the "current" class for sidebar nav elements | ||
# if the YAML frontmatter matches the expected value. | ||
def sidebar_current(expected) | ||
current = current_page.data.sidebar_current | ||
if current == expected | ||
#|| sidebar_section == expected | ||
return " class=\"current\"" | ||
else | ||
return "" | ||
end | ||
end | ||
|
||
# This returns the overall section of the documentation we're on. | ||
def sidebar_section | ||
current = current_page.data.sidebar_current | ||
return "" if !current | ||
current.split("-")[0] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module HashiCorp | ||
module Rack | ||
# This redirects to the latest version of the docs. | ||
class RedirectToDocs | ||
def initialize(app) | ||
@app = app | ||
end | ||
|
||
def call(env) | ||
if env["PATH_INFO"] =~ /^\/$/ | ||
headers = { | ||
"Content-Type" => "text/html", | ||
"Location" => "/docs/", | ||
"Surrogate-Key" => "page" | ||
} | ||
message = "Redirecting to new URL..." | ||
|
||
return [301, headers, [message]] | ||
end | ||
|
||
@app.call(env) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<h2>Page Not Found</h4> | ||
|
||
<p> | ||
Sorry, the page you tried to visit doesn't exist. This could be our fault, | ||
and if so we'll fix that up right away. Please go back, or go back | ||
<a href="/">home</a> to get back on track. | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
page_title: "Creating a Base Box" | ||
sidebar_current: "boxes-base" | ||
--- | ||
|
||
# Creating a Base Box | ||
|
||
<div class="alert alert-warn"> | ||
<p> | ||
<strong>Warning: Advanced Topic!</strong> Creating a base box can be a | ||
time consuming and tedious process, and is not recommended for new | ||
Vagrant users. If you're just getting started with Vagrant, we | ||
recommend trying to find <a href="https://atlas.hashicorp.com/parallels"> | ||
existing base boxes</a> to use first. | ||
</p> | ||
</div> | ||
|
||
This page documents the box format so that you can create your own base boxes | ||
manually. | ||
|
||
Prior to reading this page, please check out the [basics of the Vagrant | ||
box file format](http://docs.vagrantup.com/v2/boxes/format.html). | ||
|
||
## Contents | ||
A Parallels base box is a compressed archive of the necessary contents of | ||
a Parallels "pvm" file. Here is an example of what is contained in such a box: | ||
|
||
``` | ||
$ tree | ||
. | ||
├── Vagrantfile | ||
├── box.pvm | ||
│ ├── NVRAM.dat | ||
│ ├── VmInfo.pvi | ||
│ ├── config.pvs | ||
│ └── harddisk.hdd | ||
│ └── ... | ||
└── metadata.json | ||
``` | ||
|
||
`config.pvs` and `.hdd` files are strictly required for a Parallels virtual | ||
machine. | ||
|
||
There is also the "metadata.json" file used by Vagrant itself. This file | ||
contains nothing but the defaults which are documented on the [box format] | ||
(http://docs.vagrantup.com/v2/boxes/format.html) page. | ||
|
||
## Installed Software | ||
|
||
Base boxes for the Parallels provider should have the following software | ||
installed, as a bare minimum: | ||
|
||
- SSH server with key-based authentication setup. If you want the box to work | ||
with default Vagrant settings, the SSH user must be set to accept the [insecure | ||
keypair](https://github.com/mitchellh/vagrant/blob/master/keys/vagrant.pub) | ||
that ships with Vagrant. | ||
|
||
- [Parallels Tools](http://download.parallels.com/desktop/v9/ga/docs/en_US/ | ||
Parallels%20Desktop%20User's%20Guide/32791.htm) so that things such as shared | ||
folders can function. There are many other benefits to installing the tools, | ||
such as networking configuration and device mapping. | ||
|
||
## Optimizing the Box Size | ||
|
||
Prior to packaging up a box, you should shrink the hard drives as much as | ||
possible. This can be done with `prl_disk_tool`: | ||
|
||
``` | ||
$ prl_disk_tool compact /path/to/harddisk.hdd | ||
``` | ||
|
||
## Packaging | ||
|
||
Remove any extraneous files from the "pvm" folder and package it. Be sure to | ||
compress the tar with gzip (done below in a single command) since Parallels | ||
hard disks are not compressed by default. | ||
|
||
``` | ||
$ cd /path/to/my/box.pvm/.. | ||
$ tar cvzf custom.box ./box.pvm ./Vagrantfile ./metadata.json | ||
``` |
Oops, something went wrong.