From 7dd5b16218dc460daadaba0db33b742666ed3744 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Wed, 12 Nov 2014 17:12:13 -0500 Subject: [PATCH] Add preliminary website for pushes --- website/docs/source/layouts/layout.erb | 9 ++++ website/docs/source/v2/push/atlas.html.md | 56 ++++++++++++++++++++ website/docs/source/v2/push/ftp.html.md | 62 +++++++++++++++++++++++ website/docs/source/v2/push/index.html.md | 59 +++++++++++++++++++++ 4 files changed, 186 insertions(+) create mode 100644 website/docs/source/v2/push/atlas.html.md create mode 100644 website/docs/source/v2/push/ftp.html.md create mode 100644 website/docs/source/v2/push/index.html.md diff --git a/website/docs/source/layouts/layout.erb b/website/docs/source/layouts/layout.erb index 688b7507d..0631ad128 100644 --- a/website/docs/source/layouts/layout.erb +++ b/website/docs/source/layouts/layout.erb @@ -288,6 +288,15 @@ <% end %> + >Push + + <% if sidebar_section == "push" %> + + <% end %> + >Other <% if sidebar_section == "other" %> diff --git a/website/docs/source/v2/push/atlas.html.md b/website/docs/source/v2/push/atlas.html.md new file mode 100644 index 000000000..0d6347345 --- /dev/null +++ b/website/docs/source/v2/push/atlas.html.md @@ -0,0 +1,56 @@ +--- +page_title: "Vagrant Push - Atlas Strategy" +sidebar_current: "push-atlas" +description: |- + Atlas is HashiCorp's commercial offering to bring your Vagrant development + environments to production. The Vagrant Push Atlas strategy pushes your + application's code to HashiCorp's Atlas service. +--- + +# Vagrant Push + +## Atlas Strategy + +[Atlas][] is HashiCorp's commercial offering to bring your Vagrant development +environments to production. You can read more about HashiCorp's Atlas and all +its features on [the Atlas homepage][Atlas]. The Vagrant Push Atlas strategy +pushes your application's code to HashiCorp's Atlas service. + +The Vagrant Push Atlas strategy supports the following configuration options: + +- `app` - The name of the application in [HashiCorp's Atlas][Atlas]. If the + application does not exist, it will be created with user confirmation. + +- `exclude` - Add a file or file pattern to exclude from the upload, relative to + the `dir`. This value may be specified multiple times and is additive. + `exclude` take precedence over `include` values. + +- `include` - Add a file or file pattern to include in the upload, relative to + the `dir`. This value may be specified multiple times and is additive. + +- `dir` - The base directory containing the files to upload. By default this is + the same directory as the Vagrantfile, but you can specify this if you have + a `src` folder or `bin` folder or some other folder you want to upload. + +- `vsc` - If set to true, Vagrant will automatically use VCS data to determine + the files to upload. Uncommitted changes will not be deployed. + + +### Usage + +The Vagrant Push Atlas strategy is defined in the `Vagrantfile` using the +`atlas` key: + +```ruby +config.push.define "atlas" do |push| + push.app = "username/application" +end +``` + +And then push the application to Atlas: + +```shell +$ vagrant push +``` + +[Atlas]: https://atlas.hashicorp.com/ "HashiCorp's Atlas Service" diff --git a/website/docs/source/v2/push/ftp.html.md b/website/docs/source/v2/push/ftp.html.md new file mode 100644 index 000000000..54a2e1427 --- /dev/null +++ b/website/docs/source/v2/push/ftp.html.md @@ -0,0 +1,62 @@ +--- +page_title: "Vagrant Push - FTP & SFTP Strategy" +sidebar_current: "push-ftp" +description: |- + +--- + +# Vagrant Push + +## FTP & SFTP Strategy + +Vagrant Push FTP and SFTP strategy pushes the code in your Vagrant development +environment to a remote FTP or SFTP server. + +The Vagrant Push FTP And SFTP strategy supports the following configuration +options: + +- `host` - The address of the remote (S)FTP server. If the (S)FTP server is + running on a non-standard port, you can specify the port after the address + (`host:port`). + +- `username` - The username to use for authentication with the (S)FTP server. + +- `password` - The password to use for authentication with the (S)FTP server. + +- `passive` - Use passive FTP (default is true). + +- `secure` - Use secure (SFTP) (default is false). + +- `destination` - The root destination on the target system to sync the files + (default is `/`). + +- `exclude` - Add a file or file pattern to exclude from the upload, relative to + the `dir`. This value may be specified multiple times and is additive. + `exclude` take precedence over `include` values. + +- `include` - Add a file or file pattern to include in the upload, relative to + the `dir`. This value may be specified multiple times and is additive. + +- `dir` - The base directory containing the files to upload. By default this is + the same directory as the Vagrantfile, but you can specify this if you have + a `src` folder or `bin` folder or some other folder you want to upload. + + +### Usage + +The Vagrant Push FTP and SFTP strategy is defined in the `Vagrantfile` using the +`ftp` key: + +```ruby +config.push.define "ftp" do |push| + push.host = "ftp.company.com" + push.username = "username" + push.password = "password" +end +``` + +And then push the application to the FTP or SFTP server: + +```shell +$ vagrant push +``` diff --git a/website/docs/source/v2/push/index.html.md b/website/docs/source/v2/push/index.html.md new file mode 100644 index 000000000..224787ca6 --- /dev/null +++ b/website/docs/source/v2/push/index.html.md @@ -0,0 +1,59 @@ +--- +page_title: "Vagrant Push" +sidebar_current: "push" +description: |- + Vagrant Push is a revolutionary +--- + +# Vagrant Push + +As of version 1.8, Vagrant is capable of deploying or "pushing" application code +running as part of the Vagrant VM to a remote such as an FTP server or +[HashiCorp's Atlas][Atlas]. + +Pushes are defined in an application's `Vagrantfile` and are invoked using the +`vagrant push` subcommand. Much like other components of Vagrant, each Vagrant +Push plugin has its own configuration options. Please consult the documentation +for your Vagrant Push plugin for more information. Here is an example Vagrant +Push configuration section in a `Vagrantfile`: + +```ruby +config.push.define "ftp" do |push| + push.host = "ftp.company.com" + push.username = "..." + # ... +end +``` + +When the application is ready to be deployed to the FTP server, just run a +single command: + +```shell +$ vagrant push +``` + +Much like [Vagrant Providers][], Vagrant Push also supports multiple backend +declarations. Consider the common scenario of a staging and QA environment: + +```ruby +config.push.define "staging", strategy: "ftp" do |push| + # ... +end + +config.push.define "qa", strategy: "ftp" do |push| + # ... +end +``` + +In this scenario, the user must pass the name of the Vagrant Push to the +subcommand: + +```shell +$ vagrant push staging +``` + +Vagrant Push is the easiest way to deploy your application. You can read more +in the documentation links on the sidebar. + +[Atlas]: https://atlas.hashicorp.com/ "HashiCorp's Atlas Service" +[Vagrant Providers]: /v2/providers/index.html "Vagrant Providers"