-
Notifications
You must be signed in to change notification settings - Fork 35
Document Enterprise Portal service account automation #4249
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
Open
NoaheCampbell
wants to merge
4
commits into
main
Choose a base branch
from
ep-service-account-api-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9099690
Document Enterprise Portal service account automation
NoaheCampbell c709938
vale directional and temporal comments
NoaheCampbell b47c875
Improve service account automation docs intro
NoaheCampbell d78b78c
Rename sidebar title to action-verb style
AmberAlston 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
This file contains hidden or 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
127 changes: 127 additions & 0 deletions
127
docs/vendor/enterprise-portal-v2-service-account-automation.mdx
This file contains hidden or 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,127 @@ | ||
| --- | ||
| sidebar_label: Enable Customer Automation | ||
| --- | ||
|
|
||
| # Enable customer automation | ||
|
|
||
| :::important Alpha Feature | ||
| Features described on this page are in alpha and subject to change. For access, contact your Replicated account representative. | ||
| ::: | ||
|
|
||
| This topic describes how to add service account automation docs to the new Enterprise Portal. Service account automation lets your customers call Enterprise Portal API endpoints from CI/CD systems or other scripts. | ||
|
|
||
| Customers can use these endpoints to create install profiles, get structured install and update instructions, and download referenced artifacts. The Enterprise Portal content template includes components that render customer-facing API documentation inside the customer's portal, so you can document automation without maintaining endpoint tables or example workflows by hand. | ||
|
|
||
| ## Why add automation docs | ||
|
|
||
| Add service account automation docs when your customers need to install or update your application from automation. | ||
|
|
||
| With these docs in the portal, customers can: | ||
|
|
||
| - Find the API routes that are available from their Enterprise Portal domain | ||
| - Learn how to authenticate with a customer service account token | ||
| - Follow an example workflow for creating install options and fetching instructions | ||
| - Download the Swagger JSON for the customer automation API | ||
| - Download artifacts from the same links returned by the install instructions API | ||
|
|
||
| These docs are customer-facing. They describe the Enterprise Portal API that runs from the customer's portal domain. They do not replace the Replicated Vendor API. | ||
|
|
||
| ## Add the default pages | ||
|
|
||
| The default Enterprise Portal content template includes an **Automation** section. | ||
|
|
||
| This section has API reference and workflow guide pages. | ||
|
|
||
| You can keep these pages, move them, edit the surrounding text, or remove them from your content repo. | ||
|
|
||
| The pages use two MDX components: | ||
|
|
||
| - `<APIReference />`: Renders the service account API reference from Replicated's generated Swagger spec. | ||
| - `<HeadlessWorkflowGuide />`: Renders an example workflow for using the API from automation. | ||
|
|
||
| To add these pages to your own content repo, create pages like the following: | ||
|
|
||
| ```mdx | ||
| --- | ||
| title: API Reference | ||
| --- | ||
|
|
||
| # API Reference | ||
|
|
||
| <APIReference /> | ||
| ``` | ||
|
|
||
| ```mdx | ||
| --- | ||
| title: Automation Workflow | ||
| --- | ||
|
|
||
| # Automation Workflow | ||
|
|
||
| <HeadlessWorkflowGuide /> | ||
| ``` | ||
|
|
||
| Then add them to your `toc.yaml` if they are not already there: | ||
|
|
||
| ```yaml | ||
| navigation: | ||
| - title: Automation | ||
| icon: key | ||
| items: | ||
| - title: API Reference | ||
| page: pages/automation/api-reference.md | ||
| - title: Workflow Guide | ||
| page: pages/automation/workflow-guide.md | ||
| ``` | ||
|
|
||
| ## Customize the components | ||
|
|
||
| You can customize the text around these components like any other MDX content page. For example, you can add prerequisites, link to your support process, or include notes about how your customers should request service account access. | ||
|
|
||
| The `<APIReference />` component also supports a `description` prop. Use it to replace the default intro text on the endpoint reference: | ||
|
|
||
| ```mdx | ||
| <APIReference | ||
| description="Use the Acme service account API to create install profiles, fetch generated instructions, and download installation artifacts." | ||
| /> | ||
| ``` | ||
|
|
||
| The `<HeadlessWorkflowGuide />` component does not support props. It renders the default example workflow from the Enterprise Portal template. To customize that page, edit the surrounding MDX content, move the component to a different page, or remove the component and write your own workflow. | ||
|
|
||
| ## What the API reference includes | ||
|
|
||
| The API reference component documents the service account API endpoints that customers can call from the Enterprise Portal domain. | ||
|
|
||
| The reference includes: | ||
|
|
||
| - Release and version discovery endpoints | ||
| - Install options create, list, get, and update endpoints | ||
| - Install instruction and update instruction endpoints | ||
| - Artifact download endpoints for generated instruction downloads | ||
| - Plugin download endpoints | ||
| - Request parameters, request body fields, response fields, accepted values, and error responses | ||
|
|
||
| The component also includes a **Download Swagger JSON** button. Customers can use this file to inspect the API contract or import it into API tooling. | ||
|
|
||
| ## What the workflow guide includes | ||
|
|
||
| The workflow guide shows an example automation sequence. It covers: | ||
|
|
||
| - Setting the Enterprise Portal base URL and service account token | ||
| - Listing available versions | ||
| - Creating install options | ||
| - Fetching structured install instructions | ||
| - Downloading artifacts from `steps[].downloads[]` | ||
| - Updating install options before fetching instructions again | ||
|
|
||
| The workflow guide is an example, not a complete script. Customers must replace placeholder values and adapt the commands for their own automation. | ||
|
|
||
| ## Customer authentication | ||
|
|
||
| Customer team admins create service account tokens from **Team Settings > Service Accounts** in the Enterprise Portal. API requests use this header: | ||
|
|
||
| ```bash | ||
| Authorization: Bearer <service-account-token> | ||
| ``` | ||
|
|
||
| Browser portal sessions and service account tokens are separate authentication methods. Customers should store service account tokens securely and rotate them when needed. | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
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.
📝 [vale] reported by reviewdog 🐶
[Replicated.SentenceLength] Try to keep your sentence length to 26 words or fewer.