-
Notifications
You must be signed in to change notification settings - Fork 6
docs: dispatch proxy handling #221
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
amd-aliem
wants to merge
1
commit into
AMDEPYC:main
Choose a base branch
from
amd-aliem:docs-proxy
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
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -36,7 +36,8 @@ References: | |||||
|
|
||||||
| ### 2. Download `AMDEPYC/dispatch` | ||||||
|
|
||||||
| Download the [latest dispatch binaries](https://github.com/AMDEPYC/dispatch/releases) through your browser or through `gh`: | ||||||
| Download the [latest dispatch binaries](https://github.com/AMDEPYC/dispatch/releases) | ||||||
| through your browser or through `gh`: | ||||||
| ``` | ||||||
| gh release download -R github.com/AMDEPYC/dispatch --pattern 'dispatch-*' | ||||||
| chmod a+x dispatch* | ||||||
|
|
@@ -45,43 +46,17 @@ Or clone the repository and build it from source. | |||||
|
|
||||||
| ### 3. Run dispatch to start serving images | ||||||
|
|
||||||
| #### Permissions | ||||||
| > [!NOTE] | ||||||
| > Ensure you have appropriate permissions to download assets and create an issue | ||||||
| > in the target repository as described in the | ||||||
| > [Github Permissions](#github-permissions) section below. A simple way to do | ||||||
| > this is to authenticate as a user with this permissions using the GitHub CLI's | ||||||
| > browser option: `gh auth login -h github.com -w -p https`, but you can also | ||||||
| > use a personal access token (PAT) for more controlled access. | ||||||
|
|
||||||
| dispatch uses GitHub APIs to download Release Assets and to create Issues in the repo specified on the dispatch command line (see below). Certain permissions are needed for this to work: | ||||||
|
|
||||||
| ##### Option 1 | ||||||
|
|
||||||
| Before running dispatch, run 'gh auth login' and choose to authenticate via the web browser flow. | ||||||
|
|
||||||
| ##### Option 2 | ||||||
|
|
||||||
| Before running dispatch, run 'gh auth login' and choose to authenticate by pasting an authentication token. | ||||||
|
|
||||||
| Fine-grained PAT | ||||||
|
|
||||||
| If using a fine-grained token (PAT), it must have, at a minimum, the following permissions: | ||||||
|
|
||||||
| Contents: Read-only access | ||||||
|
|
||||||
| Issues: Read and write access | ||||||
|
|
||||||
| Classic PAT | ||||||
|
|
||||||
| If using a classic token (PAT), it must have, at a minimum, the following permission: | ||||||
|
|
||||||
| repo | ||||||
|
|
||||||
| ##### Option 3 | ||||||
|
|
||||||
| When running dispatch, use the --token option and specify either a fine-grained or a classic PAT as described above. | ||||||
|
|
||||||
| ##### Option 4 | ||||||
|
|
||||||
| Before running dispatch, set an environment variable named GITHUB_TOKEN to either a fine-grained or a classic PAT as described above. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| If you would like to use the images available in AMD's sev-certify repository & post the results in an issue there: | ||||||
| This example will download the images from the `devel` release tag in | ||||||
| the `AMDEPYC/sev-certify` repository and post results in that repository's | ||||||
| issues: | ||||||
| ``` | ||||||
| ./dispatch-linux-x86_64 --owner AMDEPYC --repo sev-certify --tag devel | ||||||
| ``` | ||||||
|
|
@@ -91,15 +66,25 @@ You can optionally add a filter at the end if you want to run on a subset of ima | |||||
| ./dispatch-linux-x86_64 --owner AMDEPYC --repo sev-certify --tag devel ubuntu | ||||||
| ``` | ||||||
|
|
||||||
| You can also fork the `AMDEPYC/sev-certify` repository to build the images and have certification results posted in that repository's issues - see [Forking sev-certify](#forking-amdepycsev-certify-for-certification-testing) for more information. | ||||||
| You can also fork the `AMDEPYC/sev-certify` repository to build the images and | ||||||
| have certification results posted in that repository's issues - see | ||||||
| [Forking sev-certify](#forking-amdepycsev-certify-for-certification-testing) for | ||||||
| more information. | ||||||
| ``` | ||||||
| ./dispatch-linux-x86_64 --owner <your org/username> --repo sev-certify --tag devel | ||||||
| ``` | ||||||
|
|
||||||
| If you run the first command with no filter specified, you should see the following screen: | ||||||
| If you run the first command with no filter specified, you should see the | ||||||
| following screen: | ||||||
|  | ||||||
|
|
||||||
| While this screen is up, the images specified are queued for testing. Each image has an status icon to the left of its name. See [Workflow-Stats](https://github.com/AMDEPYC/dispatch?tab=readme-ov-file#workflow-states) for a table of the icon meanings. Pressing q will kill the dispatch process. | ||||||
| While this screen is up, the images specified are queued for testing. Each image | ||||||
| has an status icon to the left of its name. See | ||||||
|
Contributor
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
|
||||||
| [Workflow-Stats](https://github.com/AMDEPYC/dispatch?tab=readme-ov-file#workflow-states) | ||||||
| for a table of the icon meanings. Pressing q will kill the dispatch process. | ||||||
|
|
||||||
| If your system cannot directly contact github, see [Github Proxy](#github-proxy) | ||||||
| for setting the appropriate ENV vars. | ||||||
|
|
||||||
| ## Test Server Setup | ||||||
|
|
||||||
|
|
@@ -163,3 +148,55 @@ You can now run dispatch while specifying the new repository: | |||||
| ./dispatch-linux-x86_64 --owner <your-org or username> --repo sev-certify --tag devel | ||||||
| ``` | ||||||
|
|
||||||
| ## Appendix | ||||||
|
|
||||||
| ### Github Proxy | ||||||
| If your Dispatch host is behind a proxy, you can set the standard | ||||||
| environment variables `HTTP_PROXY` and `HTTPS_PROXY` to | ||||||
| allow dispatch to access GitHub APIs and download Release Assets. | ||||||
|
|
||||||
| ``` | ||||||
| HTTP_PROXY="http://some-proxy.domain:port" HTTPS_PROXY="http://some-proxy.domain:port" ./dispatch-linux-x86_64 --owner AMDEPYC --repo sev-certify --tag main ubuntu | ||||||
| ``` | ||||||
|
|
||||||
| ### Github Permissions | ||||||
|
|
||||||
| Dispatch uses GitHub APIs to download Release Assets and to create Issues in the | ||||||
| repo specified on the dispatch command line. The permissions required are: | ||||||
| - Read access to Releases (to download the images) | ||||||
| - Write access to Issues (to create the issue with certification results) | ||||||
|
|
||||||
| There are several ways to provide these permissions to dispatch: | ||||||
|
|
||||||
| #### 1) GitHub CLI authentication - Web Browser | ||||||
|
|
||||||
| Before running dispatch, run 'gh auth login' and choose to authenticate via the | ||||||
| web browser flow as a user that has the accesses listed above. | ||||||
|
|
||||||
| ``` | ||||||
| gh auth login -h github.com -w -p https | ||||||
|
Contributor
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. Is that the command you would run to log in directly with the web-browser? Context on what this command does might be helpful |
||||||
| ``` | ||||||
|
|
||||||
| #### 2) GitHub CLI authentication - Token | ||||||
|
|
||||||
| Before running dispatch, run 'gh auth login' and choose to authenticate by | ||||||
| pasting an authentication token. The two types of tokens that can be used are: | ||||||
|
|
||||||
| - Fine-grained PAT: If using a fine-grained token (PAT), it must have the | ||||||
| following permissions: | ||||||
| - Contents: Read-only access | ||||||
| - Issues: Read and write access | ||||||
|
|
||||||
| - Classic PAT: If using a classic token (PAT), it must have the following | ||||||
| permission: | ||||||
| - repo | ||||||
|
|
||||||
| #### 3) Directly specify a token to dispatch via command line option | ||||||
|
|
||||||
| When running dispatch, use the --token option and specify either a fine-grained | ||||||
| or a classic PAT as described above. | ||||||
|
|
||||||
| ##### 4) Directly specify a token via environment variable | ||||||
|
|
||||||
| Before running dispatch, set an environment variable named GITHUB_TOKEN to | ||||||
| either a fine-grained or a classic PAT as described above. | ||||||
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.
I'm not sure if this is the perfect wording, but I wouldn't tell them they are getting the exact same screen, since it could change every time we change the available images. For example, it is already outdated