Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
ui: switch back to public onboarding
Browse files Browse the repository at this point in the history
This was left-over from a HashiCorp internal beta program.

Fixes #623
  • Loading branch information
pearkes committed Oct 19, 2020
1 parent c8647fa commit 9d9a320
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 67 deletions.
40 changes: 20 additions & 20 deletions ui/app/routes/onboarding/install/index.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import Route from '@ember/routing/route';
// import { UAParser } from 'ua-parser-js';
import { UAParser } from 'ua-parser-js';

export default class OnboardingInstallIndex extends Route {
// redirect() {
// const parser = new UAParser();
//
// switch (parser.getResult().os.name) {
// case 'Mac OS':
// return this.transitionTo('onboarding.install.homebrew');
// case 'Windows':
// return this.transitionTo('onboarding.install.chocolatey');
// case 'Debian':
// case 'Ubuntu':
// return this.transitionTo('onboarding.install.linux.ubuntu');
// case 'CentOS':
// return this.transitionTo('onboarding.install.linux.centos');
// case 'Fedora':
// return this.transitionTo('onboarding.install.linux.fedora');
// default:
// return this.transitionTo('onboarding.install.manual');
// }
// }
redirect() {
const parser = new UAParser();

switch (parser.getResult().os.name) {
case 'Mac OS':
return this.transitionTo('onboarding.install.homebrew');
case 'Windows':
return this.transitionTo('onboarding.install.chocolatey');
case 'Debian':
case 'Ubuntu':
return this.transitionTo('onboarding.install.linux.ubuntu');
case 'CentOS':
return this.transitionTo('onboarding.install.linux.centos');
case 'Fedora':
return this.transitionTo('onboarding.install.linux.fedora');
default:
return this.transitionTo('onboarding.install.manual');
}
}
}
70 changes: 45 additions & 25 deletions ui/app/templates/onboarding/install.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,57 @@
<IconTile @icon="download" />
<div class="onboarding-header-content">
<h1>Install the Waypoint CLI</h1>
<p>First, you'll need to install the Waypoint CLI.</p>
<p>First, you'll need to install the Waypoint CLI via Homebrew or a manual installation.</p>
</div>
</div>

<div class="onboarding-step">
<p>Waypoint uses both a client and a server to build, deploy, and release applications. Anyone using Waypoint to
deploy from their workstation will need to install Waypoint locally.</p>

<h2>Download the binary</h2>

<p>To install Waypoint, find the appropriate package for your system and download the zip archive.</p>

<p>
<ExternalLink href="https://go.hashi.co/waypoint-beta-binaries" class="button button--primary">
{{inline-svg "download" class="icon"}}
<span>Download</span>
</ExternalLink>
</p>
<hr />

<p>After downloading Waypoint, unzip the downloaded archive. Waypoint runs as a single binary named
<code>waypoint</code>. It is recommended that you move it to a directory in your <code>PATH</code>
to allow you to execute it from any directory.
<div class="onboarding-step">
<p>Anyone using Waypoint to deploy from their workstation needs to install it locally. The below
instructions guide you through that for various operating systems.
</p>

<p>For example:</p>
<p>
<code class="output">$ mv ~/Downloads/waypoint /usr/local/bin/</code>
</p>
<p><strong>Note:</strong> Due to the Waypoint beta currently being private, Homebrew, Linux packages, and Chocolatey
installation methods are not yet available.
</p>
<h2>Install Waypoint</h2>

<nav>
<ul>
<li>
<LinkTo @route="onboarding.install.manual">Manual installation</LinkTo>
</li>
<li>
<LinkTo @route="onboarding.install.homebrew">Homebrew on OS X</LinkTo>
</li>
<li>
<LinkTo @route="onboarding.install.chocolatey">Chocolatey on Windows</LinkTo>
</li>
<li>
<LinkTo @route="onboarding.install.linux">Linux</LinkTo>
</li>
</ul>
</nav>

{{outlet}}

<h2>Verify the installation</h2>

<p>After installing Waypoint, verify that the installation worked by opening a new terminal session and running the
command <code>waypoint</code>.</p>

<CopyableCode @ref="verify-waypoint">
<pre><code id="verify-waypoint">waypoint</code></pre>
</CopyableCode>

<pre><code class="output">usage: waypoint [-version] [-help] [-autocomplete-(un)install] &lt;command&gt; [&lt;args&gt;]

Common commands:
build Build a new versioned artifact from source.
deploy Deploy a pushed artifact.
...</code></pre>

<p>If you get an error that <code>waypoint</code> could not be found, your <code>PATH</code> environment variable was
not set up properly. Make sure that your <code>PATH</code> variable contains the directory where you installed
Waypoint.</p>
</div>

<hr />
Expand Down
3 changes: 2 additions & 1 deletion ui/app/templates/onboarding/install/homebrew.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<p>Homebrew is a free and open-source package management system for Mac OS X. Install the official <ExternalLink href="https://go.hashi.co/waypoint-beta-binaries">Waypoint formula</ExternalLink> from the terminal.</p>
<p>Homebrew is a free and open-source package management system for Mac OS X. Install the official <ExternalLink
href="https://go.hashi.co/waypoint-beta-binaries">Waypoint formula</ExternalLink> from the terminal.</p>

<CopyableCode @ref="brew-install">
<pre><code id="brew-install">brew install hashicorp/tap/waypoint</code></pre>
Expand Down
36 changes: 15 additions & 21 deletions ui/app/templates/onboarding/install/manual.hbs
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
<p>To install Waypoint, find the <ExternalLink href="https://go.hashi.co/waypoint-beta-binaries">appropriate package</ExternalLink> for your system and download it. Waypoint is packaged as a zip archive.</p>

<p>After downloading Waypoint, unzip the package. Waypoint runs as a single binary named <code>waypoint</code>. Any other files in the package can be safely removed and Waypoint will still function.</p>

<p>Make sure that the <code>waypoint</code> binary is available on your <code>PATH</code>. You can check the locations available on your path by running this command.</p>

<CopyableCode @ref="echo-path">
<pre><code id="echo-path">echo $PATH</code></pre>
</CopyableCode>

<pre><code class="output">/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</code></pre>

<p>The output is a list of locations separated by colons. You can make Waypoint available by moving the binary to one of the listed locations, or by adding Waypoint's location to your <code>PATH</code>.</p>

<div class="onboarding-tip">
<p><b>Tip (Linux-based or Mac):</b> Permanently add a new location to your path by editing your shell's settings file (usually called something like <code>~/.bashrc</code>, where the part of the file name after the <code>.</code> and before <code>rc</code> is the name of your shell). In that file you will see a line that starts with export <code>PATH=</code>, followed by a colon-separated list of locations. Add the location of the Waypoint binary to that list and save the file. Then reload your shell's configuration with the command source <code>~/.bashrc</code>, replacing <code>bash</code> with the name of your shell.</p>
</div>

<div class="onboarding-tip">
<p><b>Tip (Windows):</b> Add a location to your path via the GUI by navigating to <code>Environment Variables</code> in your system settings, and looking for the variable called <code>PATH</code>. You will see a semicolon-separated list of locations. Add the Waypoint binary's location to that list and then launch a new console window.</p>
</div>
<p>To install Waypoint, find the <ExternalLink href="https://releases.hashicorp.com/waypoint/">appropriate package
</ExternalLink> for your system and download it. Waypoint is packaged as a zip archive.</p>

<p>After downloading Waypoint, unzip the downloaded archive. Waypoint runs as a single binary named
<code>waypoint</code>. It is recommended that you move it to a directory in your <code>PATH</code>
to allow you to execute it from any directory.
</p>

<p>For example:</p>
<p>
<code class="output">$ mv ~/Downloads/waypoint /usr/local/bin/</code>
</p>
<p><strong>Note:</strong> Due to the Waypoint beta currently being private, Homebrew, Linux packages, and Chocolatey
installation methods are not yet available.
</p>

0 comments on commit 9d9a320

Please sign in to comment.