-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add post migration information #13387
Merged
+76
−0
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
website/content/vagrant-cloud/hcp-vagrant/post-migration-guide.mdx
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,72 @@ | ||||||
--- | ||||||
layout: vagrant-cloud | ||||||
page_title: Usage and Behavior Post Migration to HCP | ||||||
description: "Learn about how Vagrant and Vagrant Cloud will behave after migrating to HashiCorp Cloud Platform (HCP)." | ||||||
--- | ||||||
|
||||||
# Migrating to HCP Vagrant Registry | ||||||
|
||||||
This document describes the behavior of Vagrant Cloud after an organization is migrated to HCP Vagrant Registry. For information on migrating to HCP Vagrant Registry please see the [migration guide](/vagrant-cloud/hcp-vagrant/migration-guide). | ||||||
|
||||||
# Vagrant Cloud Redirects | ||||||
|
||||||
After an ogranization has been migrated to HCP Vagrant Registry any requests Vagrant Cloud receives for that organization, or any boxes within that organization, will be automatically redirected to the proper location on HCP Vagrant Registry. | ||||||
|
||||||
# API | ||||||
|
||||||
API requests to Vagrant Cloud for organizations that have been migrated to HCP Vagrant Registry will be automatically proxied to HCP. | ||||||
|
||||||
## Authenticated Requests | ||||||
|
||||||
Authenticated API requests for migrated organizations will be proxied to HCP Vagrant Registry. This will require an HCP access token to be available to Vagrant Cloud to complete the request. Vagrant Cloud supports a composite access token comprised of the Vagrant Cloud access token and the HCP access token allowing seamless interactions with organizations that still remain on Vagrant Cloud as well as organizations that have been migrated to HCP Vagrant Registry. | ||||||
|
||||||
The format of the composite access token is: | ||||||
|
||||||
``` | ||||||
<VAGRANT_CLOUD_TOKEN>;<HCP_TOKEN> | ||||||
``` | ||||||
|
||||||
If all organizations have been migrated to HCP Vagrant Registry the Vagrant Cloud access token will not be needed and the format of the access token is: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
``` | ||||||
;<HCP_TOKEN> | ||||||
``` | ||||||
|
||||||
### HCP Access Token | ||||||
|
||||||
The following prerequisites are required for generating an HCP access token: | ||||||
|
||||||
* [HCP Service Principal](https://developer.hashicorp.com/hcp/docs/hcp/admin/iam/service-principals) | ||||||
* [HCP CLI](https://developer.hashicorp.com/hcp/docs/cli) | ||||||
|
||||||
Using the `CLIENT_ID` and `CLIENT_SECRET` from the HCP service principal login to HCP using the `hcp` command: | ||||||
|
||||||
``` | ||||||
hcp auth login --client-id=CLIENT_ID --client-secret=CLIENT_SECRET | ||||||
``` | ||||||
|
||||||
Once authenticated the access token can be printed using the following command: | ||||||
|
||||||
``` | ||||||
hcp auth print-access-token | ||||||
``` | ||||||
|
||||||
### Vagrant Cloud Composite Token | ||||||
|
||||||
The Vagrant CLI supports using the `VAGRANT_CLOUD_TOKEN` environment variable to hold the access token used for authentication. This environment variable can be set with both access tokens to allow request for migrated organization and unmigrated organizations to both work as expected. As noted above, the format of the composite token will consist of: the Vagrant Cloud access token, a semi-colon, and the HCP access token. An example of setting the environment variable would be: | ||||||
|
||||||
``` | ||||||
export VAGRANT_CLOUD_TOKEN="<VAGRANT_CLOUD_TOKEN>;<HCP_TOKEN>" | ||||||
``` | ||||||
|
||||||
The `hcp` command can also be used to provide the HCP access token to reduce the need for copying and pasting the access token: | ||||||
|
||||||
``` | ||||||
export VAGRANT_CLOUD_TOKEN="<VAGRANT_CLOUD_TOKEN>;$(hcp auth print-access-token)" | ||||||
``` | ||||||
|
||||||
If all organizations have been migrated to HCP Vagrant Registry, only the HCP access token will be needed: | ||||||
|
||||||
``` | ||||||
export VAGRANT_CLOUD_TOKEN=";$(hcp auth print-access-token)" | ||||||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.