Skip to content

Commit 62e1608

Browse files
Merge pull request #28 from johanneswuerbach/cli-usage
chore: document CLI usage
2 parents 727d51a + 13c8aa4 commit 62e1608

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

README.md

+24-6
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ By default, the following will be provisioned:
7777
* An AWS account
7878
* [AWS CLI](https://aws.amazon.com/cli/) installed locally
7979
* [terraform](https://www.terraform.io/) installed locally
80+
* (Optional) [Humanitec CLI](https://developer.humanitec.com/platform-orchestrator/cli/) installed locally
81+
* (Optional) [GitHub CLI](https://cli.github.com/) installed locally
8082

8183
### Usage
8284

@@ -93,7 +95,14 @@ This reference architecture implementation uses Terraform. You will need to do t
9395

9496
3. Ensure you are logged in with `aws`. (Follow the [quickstart](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html) if you aren't)
9597

96-
4. Set the `HUMANITEC_TOKEN` environment variable to an appropriate Humanitec API token with the `Administrator` role on the Humanitec Organization.
98+
4.
99+
1. Login to Humanitec (your user needs to have the `Administrator` role on the Humanitec Organization)
100+
101+
```shell
102+
humctl login
103+
```
104+
105+
2. Alternatively: Set the `HUMANITEC_TOKEN` environment variable to an appropriate [Humanitec API token](https://developer.humanitec.com/platform-orchestrator/security/service-users/#generate-an-api-token-from-a-service-user) with the `Administrator` role on the Humanitec Organization.
97106

98107
For example:
99108

@@ -164,12 +173,21 @@ Check for the existence of key elements of the reference architecture. This is a
164173
Backstage requires a GitHub connection, which in turn needs:
165174

166175
* A GitHub organization and permission to create new repositories in it. Go to <https://github.com/account/organizations/new> to create a new org (the "Free" option is fine). Note: is has to be an organization, a free account is not sufficient.
167-
* Create a classic github personal access token with `repo`, `workflow`, `delete_repo` and `admin:org` scope [here](https://github.com/settings/tokens).
168-
* Set the `GITHUB_TOKEN` environment variable to your token.
169176

170-
```shell
171-
export GITHUB_TOKEN="my-github-token"
172-
```
177+
* Configured GitHub access
178+
* Either using the GitHub CLI:
179+
180+
```shell
181+
gh auth login --scopes repo,workflow,admin:org,delete_repo
182+
```
183+
184+
* Or using a token:
185+
* Create a classic github personal access token with `repo`, `workflow`, `delete_repo` and `admin:org` scope [here](https://github.com/settings/tokens).
186+
* Set the `GITHUB_TOKEN` environment variable to your token.
187+
188+
```shell
189+
export GITHUB_TOKEN="my-github-token"
190+
```
173191

174192
* Set the `GITHUB_ORG_ID` environment variable to your GitHub organization ID.
175193

0 commit comments

Comments
 (0)