Hashiconf docs changes (#2178)

Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>

Co-authored-by: XingLu Wang <95828202+xingluw@users.noreply.github.com>

Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com>

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>

Co-authored-by: irenarindos <irena.rindos@gmail.com>

Co-authored-by: Irena Rindos <irenarindos@users.noreply.github.com>

Co-authored-by: Louis Ruch <louisruch@gmail.com>

Co-authored-by: XingLu Wang <xinglu.wang@hashicorp.com>

Co-authored-by: XingLu Wang <95828202+xingluw@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2022-06-22 02:37:49 -04:00
1 parent 5c83182cc7
commit c05fa66096
43 files changed
+1364 -479

No files matched your search

@@ -7,15 +7,36 @@ description: |-
## Connect to Your First Target
The default target is a `tcp` target with a default port of `22` (which
corresponds to the default SSH port using TCP). The host sets for this target
contain the default host, which has the address `127.0.0.1`. When `boundary
connect` is executed against this target, the single available host will be
selected and a local authenticated proxy to the host is established on the
target's default port (`127.0.0.1:22`).
The [Quick setup
wizard](/docs/getting-started/deploy-and-login#login-to-hcp-boundary)
is the fastest way to onboard a target to HCP Boundary.
![Setup Wizard](/img/setup-wizard-target.png)
A `tcp` target with a default port of `22` (the default SSH port using TCP) is
recommended for an initial target. If using the Quick setup, a sample host set
called **QA Databases** will contain the **CRM Database** host, with the Address
provided during setup. When `boundary connect` is executed against the **CRM
Database target**, the single available host will be selected and a local
authenticated proxy to the host is established on the target's default port.
![Setup Wizard](/img/quick-start-targets.png)
To connect to the initial CRM Database target:
1. Copy the **CRM Database target ID** (such as `ttcp_eTcZMueUYv`).
1. Open a terminal session. Export the Boundary **Origin URL** as an environment
variable.
```shell-session
$ export BOUNDARY_ADDR=<boundary-origin-url>
```
$ boundary connect -target-id ttcp_1234567890
1. Connect to the target.
```shell-session
$ boundary connect -target-id ttcp_eTcZMueUYv
```
The output displays the address and port that your SSH client must utilize. In
@@ -43,16 +64,16 @@ filling in the local address and port. An expected host ID is set to avoid
warnings on future connections when a different port is allocated automatically.
A host key must still be accepted upon first connect.
```
$ boundary connect ssh -target-id ttcp_1234567890
```shell-session
$ boundary connect ssh -target-id ttcp_eTcZMueUYv
```
If you want to pass additional flags to the SSH client, add them to the command
line separated by a double-dash; anything after the double dash will be passed
to the executed client. For instance:
```
$ boundary connect ssh -target-id ttcp_1234567890 -- -l some-other-user
```shell-session
$ boundary connect ssh -target-id ttcp_eTcZMueUYv -- -l some-other-user
```
There is also a `-style` flag to allow the command to format arguments in a
@@ -83,7 +104,7 @@ can correctly identify the desired target.
Here is an SSH example in dev-mode:
```
```shell-session
$ boundary connect ssh -target-name "Generated target" -target-scope-name "Generated project scope"
```
@@ -107,8 +128,8 @@ anything.
Whether using `-exec` or one of the listed helpers, you can pass flags to the
executed command by including them after a double-dash `--`:
```
$ boundary connect ssh -target-id ttcp_1234567890 -- -l myuser -i ~/.ssh/identity
```shell-session
$ boundary connect ssh -target-id ttcp_eTcZMueUYv -- -l myuser -i ~/.ssh/identity
```
You also have access to some templated values that are substituted into the
@@ -126,29 +147,29 @@ For example, if you wanted to use Boundary to create an authenticated firewall
around 'curl', you could update the default TCP target from a default port
of `:22` to `:443`:
```
$ boundary targets update tcp -default-port 443 -id ttcp_1234567890
```shell-session
$ boundary targets update tcp -default-port 443 -id ttcp_eTcZMueUYv
Target information:
Created Time: Fri, 25 Sep 2020 18:35:47 PDT
Description: Provides an initial target in Boundary
ID: ttcp_1234567890
Name: Generated target
Created Time: Fri, 17 June 2022 18:35:47 PDT
Description: Sample target created by quick setup
ID: ttcp_eTcZMueUYv
Name: CRM Database target
Session Connection Limit: 1
Session Max Seconds: 28800
Type: tcp
Updated Time: Fri, 25 Sep 2020 18:36:18 PDT
Updated Time: Fri, 17 June 2022 19:15:17 PDT
Version: 2
Scope:
ID: p_1234567890
Name: Generated project scope
Parent Scope ID: o_1234567890
ID: p_A4jfDjZ9jf
Name: Sample project created by quick setup
Parent Scope ID: o_B1xISmpJ5Y
Type: project
Host Sets:
Host Catalog ID: hcst_1234567890
ID: hsst_1234567890
Host Catalog ID: hcst_YgIU0sHxXp
ID: hsst_pp6f2hfRYB
Attributes:
Default Port: 443
@@ -159,8 +180,8 @@ In the output above the default port for the target has now changed to `:443`.
Now, `curl` can be used as the executed client for the TCP target session to do
an authenticated download of hashicorp.com:
```
$ boundary connect -exec curl -target-id ttcp_1234567890 \
```shell-session
$ boundary connect -exec curl -target-id ttcp_eTcZMueUYv \
-- -vvsL --output /dev/null hashicorp.com
* Trying 76.76.21.21...
@@ -178,8 +199,8 @@ example, if `putty.exe` is available on a Windows host but the command is being
run from WSL, the following allows usage of the wrapper while specifying the
correct available binary (as WSL must use `.exe` when invoking Windows binaries):
```
$ boundary connect ssh -style putty -exec putty.exe -target-id ttcp_1234567890
```shell-session
$ boundary connect ssh -style putty -exec putty.exe -target-id ttcp_eTcZMueUYv
```
## Connect using Desktop Client
@@ -192,7 +213,7 @@ proxy details.
playsInline
autoPlay
loop
class="boundary-clickthrough-video boundary-clickthrough-desktop-video"
className="boundary-clickthrough-video boundary-clickthrough-desktop-video"
>
<source
type="video/mp4"
@@ -202,5 +223,6 @@ proxy details.
## Next Steps
See our [basic administration workflows](https://learn.hashicorp.com/collections/boundary/basic-administration) for in depth discussion on managing scopes, targets,
identities, and sessions.
See our [basic administration
workflows](https://learn.hashicorp.com/collections/boundary/hcp-administration)
for in depth discussion on managing scopes, targets, identities, and sessions.
@@ -0,0 +1,192 @@
---
layout: docs
page_title: Deploy and Login
description: |-
How to deploy HCP Boundary services and login for the first time.
---
# Deploy an HCP Boundary Instance
HCP Boundary is a fully-managed cloud-based workflow. It enables secure access
to remote hosts and critical systems across cloud service catalogs, on-premises
infrastructure, and Kubernetes clusters without needing to manage any of the
underlying systems or operations.
To deploy an HCP Boundary instance:
1. Navigate to [HashiCorp Cloud Platform](https://portal.cloud.hashicorp.com/)
and login using your credentials.
1. Click the **Boundary (Beta)** tab, and then and click **Deploy Boundary** on
the right-hand pane.
1. Fill out the following form details:
- Instance Name
- Administrator Username
- Administrator Password
1. Store the administrator username and password in a safe location. These
credentials will be used when authenticating using the Admin Console, CLI, or
Terraform.
1. Click **Deploy** after completing the form. It may take a few minutes to
initialize the HCP Boundary instance.
![Deploy boundary](/img/hcp-deploy-form.png)
## Login to HCP Boundary
Once the deployment is complete, the HCP Boundary instance can be accessed
directly from the HCP Boundary portal using the credentials created during
setup.
1. From the HCP Boundary portal page, click the **Open Admin UI** button.
1. Enter the admin username and password you created when you deployed the new
instance, and click **Authenticate**.
1. The **Welcome to Boundary** setup wizard will launch automatically.
There are two options for Boundary’s initial setup:
- Quick setup
- Manual
![Setup Wizard](/img/setup-wizard.png)
The **Quick setup** is recommended for new users, and generates a set of initial
resources to assist in connecting to your first target.
![Setup Wizard](/img/setup-wizard-target.png)
The **Manual** setup drops the user directly into Boundary, without any
provisioned resources.
Upon completion of the setup wizard, you will be logged into your HCP Boundary
instance's Global scope via the web UI. This is the default scope for all new
Boundary clusters.
1. Click **Auth Methods**.
1. Click the **copy icon** for the Password **Auth Method ID**. The ID is needed to
authenticate to HCP Boundary using the CLI.
<Tabs>
<Tab heading="CLI">
1. In the HCP Boundary portal, open the **Boundary Overview** page, and click
the **copy icon** in the **Copy this into Boundary Desktop** section. This
copies your environment’s Boundary **Origin URL**.
1. Open a terminal session and set the `BOUNDARY_ADDR` environment variable to
the copied origin URL.
```shell-session
$ export BOUNDARY_ADDR=<boundary-origin-url>
```
1. Log in with the administrator credentials you created when you deployed the
HCP Boundary instance.
```shell-session
$ boundary authenticate password \
-auth-method-id=COPIED_AUTH_ID \
-login-name=ADMIN_USERNAME \
-password=ADMIN_PASSWORD
```
You are now logged into your HCP Boundary instance's Global scope via the CLI.
This is the default scope for all new Boundary clusters.
If you are on Windows or macOS, the system password store will be used to store
the new token. On any other operating system, you may get an error indicating
that the token could not be stored. Boundary defaults to using
[pass](https://www.passwordstore.org/) on these machines, which uses [GNU
Privacy Guard](https://gnupg.org/) to encrypt values. If it is not available,
the token will be displayed and can be stored in a system of your choice and
passed in via the `BOUNDARY_TOKEN` environment variable.
It is recommended to make use of `pass` or another alternative (such as any
implementation of the freedesktop.org Secret Service feature). Installation and
configuration of `pass` or other alternatives is beyond the scope of this
article; consult the documentation for `pass` or your specific OS distribution
help pages.
</Tab>
<Tab heading="Desktop Client">
[Boundary Desktop](https://www.boundaryproject.io/downloads) can be used to
connect to HCP Boundary.
To get started with Boundary Desktop:
1. Install Boundary Desktop.
1. Enter your HCP Boundary instance’s origin URL.
1. Enter the login name and password.
To authenticate using the Boundary desktop client, launch Boundary desktop
client and connect to boundary to using your environment's **Origin URL**.
You can find your environment’s origin url In the HCP portal. Open the
**Boundary Overview** page and click the **copy icon** in the **Copy this into
Boundary Desktop** section. This copies your environment’s Boundary **Origin
URL**.
The admin username and password from instance creation can be used for initial
setup. Once additional users have been created, they can also log in to HCP
Boundary using the Boundary Desktop app.
<video
muted
playsInline
autoPlay
loop
class="boundary-clickthrough-video boundary-clickthrough-desktop-video"
>
<source
type="video/mp4"
src="https://www.datocms-assets.com/2885/1613612831-boundary-desktop-clickthrough-authenticate-v1-0-0.mp4"
/>
</video>
</Tab>
<Tab heading="Terraform">
You can also use these overrides to configure the [Terraform provider for
Boundary](https://registry.terraform.io/providers/hashicorp/boundary/):
```hcl
provider "boundary" {
base_url = "hcp-boundary-origin-url"
auth_method_id = "auth-method-id"
auth_method_username = "admin-username"
auth_method_password = "admin-password"
}
```
To find your environment’s `base_url`:
1. In the HCP portal, open the **Boundary Overview** page.
1. Click the **copy icon** in the **Copy this into Boundary Desktop** section. This copies your environment’s Boundary **Origin URL**.
To find your environment’s default `auth_method_id`:
1. In your HCP Boundary portal, click the Admin UI button.
1. Log in to the Admin Console by entering the admin username and password you
created when you deployed the HCP Boundary instance, and click **Authenticate**.
1. Click **Auth Methods**.
1. Click the **copy icon** for the Password **Auth Method ID**
</Tab>
</Tabs>
## Next Steps
See [connecting to your first target](/docs/getting-started/connect-to-target)
for how to use HCP Boundary to run your first SSH session.
+6 -28
View File
@@ -10,34 +10,12 @@ Before getting started with Boundary, it's important to understand a few key con
## Requirements
The examples in Getting Started all revolve around running in `dev mode`. There are a few requirements for running dev mode:
The Getting Started section uses HCP Boundary, a HashiCorp hosted and fully-managed version of the Boundary product.
1. [Docker](https://docs.docker.com/get-docker/) is installed
1. A route to download the [Postgres Docker image](https://hub.docker.com/_/postgres) is available or a local image cache is available
1. A [Boundary binary](https://www.boundaryproject.io/downloads) in your `$PATH`
1. Optionally, an [installation of Boundary Desktop](https://learn.hashicorp.com/tutorials/boundary/getting-started-desktop-app) if you want to use the desktop examples
To get started with HCP Boundary, users need:
## What is Dev Mode?
- A [HashiCorp Cloud Platform](https://portal.cloud.hashicorp.com/sign-up) account
- A [Boundary binary](https://www.boundaryproject.io/downloads) in your `$PATH`
- Optionally, an [installation of Boundary Desktop](https://learn.hashicorp.com/tutorials/boundary/getting-started-desktop-app)
Dev mode is an all-in-one installation method for getting started with Boundary quickly. As the name implies,
dev mode is not a production installation method, but instead a way to get Boundary running with a Postgres
database easily. Do not use dev mode in a production environment, see [Production Installation](/docs/installing/high-availability) section for
production ready deployment methods.
Dev mode brings up a fully functioning instance of Boundary, including:
1. A controller server
2. A worker server
3. A Postgres database
These components should all be considered ephemeral - no data persistence occurs across dev mode restarts. Along with these external components, dev mode also creates several resources within Boundary to make it easier and faster to connect to your first target:
1. A org [scope](/docs/concepts/domain-model/scopes) and a project scope with a default ID of `o_1234567890` and `p_1234567890` respectively.
1. An [auth method](/docs/concepts/domain-model/auth-methods) with a random login name and password with a default auth method ID of `ampw_1234567890`.
1. A static [host catalog](/docs/concepts/domain-model/host-catalogs) with a default ID of `hcst_1234567890`.
1. A static [host](/docs/concepts/domain-model/hosts) and [host set](/docs/concepts/domain-model/host-sets) with default ID's of `hst_1234567890` and `hsst_1234567890` respectively.
1. A TCP [target](/docs/concepts/domain-model/targets) with a default ID of `ttcp_1234567890`.
The default ID suffixes are overridable or can be randomly generated, and there are many other dev mode controls. To see a complete list of these override flags, consult `boundary dev -h`.
If you plan on provisioning a large number of resources in dev mode, it's strongly recommended that users leverage our [Terraform Provider for Boundary](https://github.com/hashicorp/terraform-provider-boundary) for managing configuration of Boundary. This will simplify starting up and shutting down your Boundary dev instance.
If you prefer to Get Started on your local machine, refer to [Run and Login in Dev Mode](/docs/oss/installing/run-and-login). For more information on Boundary OSS and self-managed installations, refer to [Boundary OSS](/docs/oss/index).
@@ -50,12 +50,6 @@ Example controller configuration:
# Disable memory lock: https://www.man7.org/linux/man-pages/man2/mlock.2.html
disable_mlock = true
telemetry {
# prometheus is not currently implemented
prometheus_retention_time = "24h"
disable_hostname = true
}
# Controller configuration block
controller {
# This name attr must be unique!
@@ -1,131 +0,0 @@
---
layout: docs
page_title: Run and Login
description: |-
How to run Boundary services in dev mode and login for the first time.
---
# Run and Login to Boundary
To start Boundary in dev mode:
```bash
$ boundary dev
```
## Login to Boundary
Boundary uses a predictable login name (`admin`) and password (`password`) in
dev mode. These can be overridden, or randomly generated, with flags to
`boundary dev`.
<Tabs>
<Tab heading="CLI">
```
$ boundary authenticate password \
-login-name=admin \
-password password \
-auth-method-id=ampw_1234567890
```
If you are on Unix-like operating system (other than macOS/Darwin), you may get
an error indicating that the token could not be stored, as the freedesktop.org
Secret Service implementation is not always available. On these systems, you can
work around this by installing `dbus-x11` and `gnome-keyring` using your package
manager, then creating and unlocking the default keyring with the following,
substituting in a password of your choice for "foobar" (but ending with `\n`).
You can also avoid putting the password on the command line by running the
`gnome-keyring-daemon` commands directly and entering in the password, followed
by a newline (return) and an EOF (`Ctrl+D`).
- `eval "$(printf 'foobar\n' | gnome-keyring-daemon --unlock)"`
- `eval "$(printf 'foobar\n' | gnome-keyring-daemon --start)"`
This would have to be run in each shell.
If you're unable to install these packages, or don't want to, you can tell the
Boundary authenticate command to not save the token to the operating system's
key manager by setting `-token-name=none` flag or `BOUNDARY_TOKEN_NAME=none` env
variable when running `boundary authenticate`. You'll be responsible for setting
the token in subsequent commands via `-token` flag or `BOUNDARY_TOKEN` env
variable. An easy way to do this would be to use the `-format=json` flag along
with `jq` to pull the token value out of the response and place it wherever you
wish, then create a command alias for `boundary` that sources that value into
the environment or the `-token` flag.
~> Token storage on \*nix systems has been more problematic than we expected.
We're exploring alternatives. See the discussion on [this GitHub
issue](https://github.com/hashicorp/boundary/issues/697#issuecomment-709448942)
to track it and voice your thoughts.
</Tab>
<Tab heading="Admin Console">
To authenticate to the Admin UI, open
[http://127.0.0.1:9200](http://127.0.0.1:9200) in a browser and enter the login
name and password:
<video muted playsInline autoPlay loop class="boundary-clickthrough-video">
<source
type="video/mp4"
src="https://www.datocms-assets.com/2885/1602260993-boundary-clickthrough-getting-started-run-and-login.mp4"
/>
</video>
</Tab>
<Tab heading="Desktop Client">
<p>
To authenticate using the Boundary desktop client, launch Boundary desktop client
and connect to boundary to using [http://127.0.0.1:9200](http://127.0.0.1:9200)
and enter the login name and password:
<video
muted
playsInline
autoPlay
loop
class="boundary-clickthrough-video boundary-clickthrough-desktop-video"
>
<source
type="video/mp4"
src="https://www.datocms-assets.com/2885/1613612831-boundary-desktop-clickthrough-authenticate-v1-0-0.mp4"
/>
</video>
</p>
</Tab>
<Tab heading="Terraform">
You can also use these overrides to configure the [Terraform provider for
Boundary](https://github.com/hashicorp/terraform-provider-boundary):
```hcl
provider "boundary" {
base_url = "http://127.0.0.1:9200"
auth_method_id = "ampw_1234567890"
auth_method_username = "admin"
auth_method_password = "password"
}
```
Note in the example above we're setting `base_url` to `http` and not `https` as
the Boundary server does not use TLS in development mode.
</Tab>
</Tabs>
## Next Steps
See [connecting to your first target](/docs/getting-started/connect-to-target) for how
to use Boundary to run your first SSH session.