You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+73-14Lines changed: 73 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ This plane is where the actual infrastructure exists including clusters, databas
58
58
59
59
## How to spin up your Humanitec Azure Reference Architecture
60
60
61
-
This repo contains an implementation of part of the Humanitec Reference Architecture for an Internal Developer Platform.
61
+
This repo contains an implementation of part of the Humanitec Reference Architecture for an Internal Developer Platform, including Backstage as optional Portal solution.
62
62
63
63
This repo covers the base layer of the implementation for Azure.
64
64
@@ -98,21 +98,21 @@ This reference architecture implementation uses Terraform. You will need to do t
98
98
99
99
For example:
100
100
101
-
```
101
+
```shell
102
102
export HUMANITEC_TOKEN="my-humanitec-api-token"
103
103
```
104
104
105
105
5. Run terraform:
106
106
107
-
```
107
+
```shell
108
108
terraform init
109
109
terraform plan
110
110
terraform apply
111
111
```
112
112
113
113
`terraform plan` and `apply` might output this message:
114
114
115
-
```
115
+
```shell
116
116
│ Warning: Argument is deprecated
117
117
│
118
118
│ with module.base.module.azure_aks.azurerm_kubernetes_cluster.main,
@@ -136,34 +136,34 @@ Check for the existence of key elements of the reference architecture. This is a
136
136
137
137
1. Set the `HUMANITEC_ORG` environment variable to the ID of your Humanitec Organization (must be all lowercase):
138
138
139
-
```
139
+
```shell
140
140
export HUMANITEC_ORG="my-humanitec-org"
141
141
```
142
142
143
143
2. Verify the existence of the Resource Definition for the AKS cluster in your Humanitec Organization:
3. Verify the existence of the newly created AKS cluster:
159
159
160
-
```
160
+
```shell
161
161
az aks list --subscription <your-subscription>
162
162
```
163
163
164
164
This should output:
165
165
166
-
```
166
+
```shell
167
167
[
168
168
{
169
169
... various properties ...
@@ -173,17 +173,56 @@ Check for the existence of key elements of the reference architecture. This is a
173
173
]
174
174
```
175
175
176
+
### Enable a portal (optional)
177
+
178
+
#### Portal Prerequisites
179
+
180
+
Backstage requires a GitHub connection, which in turn needs:
181
+
182
+
* 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.
183
+
* Create a classic github personal access token with `repo`, `workflow`, `delete_repo` and `admin:org` scope [here](https://github.com/settings/tokens).
184
+
* Set the `GITHUB_TOKEN` environment variable to your token.
185
+
186
+
```shell
187
+
export GITHUB_TOKEN="my-github-token"
188
+
```
189
+
190
+
* Set the `GITHUB_ORG_ID` environment variable to your GitHub organization ID.
191
+
192
+
```shell
193
+
export GITHUB_ORG_ID="my-github-org-id"
194
+
```
195
+
196
+
* Install the GitHub App for Backstage into your GitHub organization
197
+
* Run `docker run --rm -it -e GITHUB_ORG_ID -v $(pwd):/pwd -p 127.0.0.1:3000:3000 ghcr.io/humanitec-architecture/create-gh-app` ([image source](https://github.com/humanitec-architecture/create-gh-app/)) and follow the instructions:
198
+
* “All repositories” ~> Install
199
+
* “Okay, […] was installed on the […] account.” ~> You can close the window and server.
200
+
201
+
#### Portal Usage
202
+
203
+
* Enable `with_backstage` inside your `terraform.tfvars` and configure the additional variables that a required for Backstage.
204
+
* Perform another `terraform apply`
205
+
206
+
#### Verify portal setup
207
+
208
+
*[Fetch the DNS entry](https://developer.humanitec.com/score/getting-started/get-dns/) of the Humanitec Application `backstage`, Environment `development`.
209
+
* Open the host in your browser.
210
+
* Click the "Create" button and scaffold your first application.
211
+
176
212
### Cleaning up
177
213
178
214
Once you are finished with the reference architecture, you can remove all provisioned infrastructure and the resource definitions created in Humanitec with the following:
179
215
180
-
1. Ensure you are (still) logged in with `az`.
216
+
Once you are finished with the reference architecture, you can remove all provisioned infrastructure and the resource definitions created in Humanitec with the following:
217
+
218
+
1. Delete all Humanitec Applications scaffolded using the Portal, if you used one, but not the `backstage` app itself.
219
+
2. Ensure you are (still) logged in with `az`.
181
220
182
-
2. Ensure you still have the `HUMANITEC_TOKEN` environment variable set to an appropriate Humanitec API token with the `Administrator` role on the Humanitec Organization.
221
+
3. Ensure you still have the `HUMANITEC_TOKEN` environment variable set to an appropriate Humanitec API token with the `Administrator` role on the Humanitec Organization.
183
222
184
-
3. Run terraform:
223
+
4. Run terraform:
185
224
186
-
```
225
+
```shell
187
226
terraform destroy
188
227
```
189
228
@@ -198,24 +237,44 @@ Once you are finished with the reference architecture, you can remove all provis
0 commit comments