Skip to content

Commit dccc561

Browse files
committed
update readme of OpenShift (with authentication) part
1 parent 816fc76 commit dccc561

File tree

1 file changed

+29
-15
lines changed

1 file changed

+29
-15
lines changed

README.md

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,27 +86,38 @@ oc apply -f examples/secret.yaml
8686
oc extract secret/off-cluster-token -n openshift-console --to ./examples --confirm
8787
```
8888

89+
If you have ran `source ./contrib/oc-environment.sh` before then unset all env vars
90+
91+
```
92+
unset BRIDGE_USER_AUTH BRIDGE_K8S_MODE BRIDGE_K8S_MODE_OFF_CLUSTER_ENDPOINT BRIDGE_K8S_MODE_OFF_CLUSTER_SKIP_VERIFY_TLS BRIDGE_K8S_AUTH_BEARER_TOKEN
93+
```
94+
8995
Finally run the console and visit [localhost:9000](http://localhost:9000):
9096

9197
```
9298
./examples/run-bridge.sh
9399
```
94100

95101
#### Enabling Monitoring Locally
102+
96103
In order to enable the monitoring UI and see the "Observe" navigation item while running locally, you'll need to run the OpenShift Monitoring dynamic plugin alongside Bridge. To do so, follow these steps:
97104

98105
1. Clone the monitoring-plugin repo: https://github.com/openshift/monitoring-plugin
99106
2. `cd` to the monitoring-plugin root dir
100107
3. Run
101-
```
102-
make install && make start-frontend
103-
```
108+
109+
```
110+
make install && make start-frontend
111+
```
112+
104113
4. Run Bridge in another terminal following the steps above, but set the following environment variable before starting Bridge:
105-
```
106-
export BRIDGE_PLUGINS="monitoring-plugin=http://localhost:9001"
107-
```
114+
115+
```
116+
export BRIDGE_PLUGINS="monitoring-plugin=http://localhost:9001"
117+
```
108118

109119
#### Updating `tectonic-console-builder` image
120+
110121
Updating `tectonic-console-builder` image is needed whenever there is a change in the build-time dependencies and/or go versions.
111122

112123
In order to update the `tectonic-console-builder` to a new version i.e. v27, follow these steps:
@@ -115,11 +126,11 @@ In order to update the `tectonic-console-builder` to a new version i.e. v27, fol
115126
- .ci-operator.yaml
116127
- Dockerfile.dev
117128
- Dockerfile.plugins.demo
118-
For example, `tectonic-console-builder:27`
129+
- For example, `tectonic-console-builder:27`
119130
2. Update the dependencies in Dockerfile.builder file i.e. v18.0.0.
120131
3. Run `./push-builder.sh` script build and push the updated builder image to quay.io.
121132
Note: You can test the image using `./builder-run.sh ./build-backend.sh`.
122-
To update the image on quay.io, you need edit permission to the quay.io/coreos/ tectonic-console-builder repo.
133+
- To update the image on quay.io, you need edit permission to the quay.io/coreos/ tectonic-console-builder repo.
123134
4. Lastly, update the mapping of `tectonic-console-builder` image tag in
124135
[openshift/release](https:// github.com/openshift/release/blob/master/core-services/image-mirroring/supplemental-ci-images/mapping_supplemental_ci_images_ci) repository.
125136
Note: There could be scenario were you would have to add the new image reference in the "mapping_supplemental_ci_images_ci" file, i.e. to avoid CI downtime for upcoming release cycle.
@@ -135,7 +146,7 @@ To login to the cluster's API server, you can use the following command:
135146
oc login -u kubeadmin -p $(cat ~/.crc/machines/crc/kubeadmin-password) https://api.crc.testing:6443
136147
```
137148

138-
… or, alternatively, use the CRC daemon UI (*Copy OC Login Command --> kubeadmin*) to get the cluster-specific command.
149+
- … or, alternatively, use the CRC daemon UI (_Copy OC Login Command --> kubeadmin_) to get the cluster-specific command.
139150

140151
Finally, prepare the environment, and run the console:
141152

@@ -213,7 +224,7 @@ yarn run dev
213224

214225
If changes aren't detected, you might need to increase `fs.inotify.max_user_watches`. See <https://webpack.js.org/configuration/watch/#not-enough-watchers>. If you need to increase your watchers, it's common to see multiple errors beginning with `Error from chokidar`.
215226

216-
Note: ensure `yarn run dev` has finished its initial build before visiting http://localhost:9000, otherwise `./bin/bridge` will stop running.
227+
- Note: ensure `yarn run dev` has finished its initial build before visiting http://localhost:9000, otherwise `./bin/bridge` will stop running.
217228

218229
### Unit Tests
219230

@@ -265,7 +276,7 @@ yarn run test-cypress-console
265276

266277
This will launch the Cypress Test Runner UI in the `console` package, where you can run one or all Cypress tests.
267278

268-
**Important:** when testing with authentication, set `BRIDGE_KUBEADMIN_PASSWORD` environment variable in your shell.
279+
- **Important:** when testing with authentication, set `BRIDGE_KUBEADMIN_PASSWORD` environment variable in your shell.
269280

270281
#### Execute Cypress in different packages
271282

@@ -439,11 +450,13 @@ After building, the server can be run directly with:
439450
```
440451
./bin/downloads --config-path=cmd/downloads/config/defaultArtifactsConfig.yaml
441452
```
453+
442454
Alternatively, you can use the provided Dockerfile.downloads to build an image containing the server. Use the following command to build the Docker image:
443455

444456
```
445457
docker build -f Dockerfile.downloads -t downloadsserver:latest .
446458
```
459+
447460
Note: If you are running on macOS, you might need to pass the `--platform linux/amd64` flag to the Docker build command. The origin-cli-artifacts image is not supported on macOS.
448461

449462
To launch the server using the built image, you can run:
@@ -462,9 +475,10 @@ spamming the telemetry service with repetitive data. Identical violations will n
462475
reported more than once a day.
463476

464477
## Frontend Packages
478+
465479
- [console-dynamic-plugin-sdk](./frontend/packages/console-dynamic-plugin-sdk/README.md)
466-
[[API]](./frontend/packages/console-dynamic-plugin-sdk/docs/api.md)
467-
[[Console Extensions]](./frontend/packages/console-dynamic-plugin-sdk/docs/console-extensions.md)
480+
- [[API]](./frontend/packages/console-dynamic-plugin-sdk/docs/api.md)
481+
- [[Console Extensions]](./frontend/packages/console-dynamic-plugin-sdk/docs/console-extensions.md)
468482

469483
- [console-plugin-shared](./frontend/packages/console-plugin-shared/README.md)
470484

@@ -477,5 +491,5 @@ reported more than once a day.
477491
- [knative-plugin](./frontend/packages/knative-plugin/README.md)
478492

479493
- operator-lifecycle-manager
480-
[[Descriptors README]](./frontend/packages/operator-lifecycle-manager/src/components/descriptors/README.md)
481-
[[Descriptors API Reference]](./frontend/packages/operator-lifecycle-manager/src/components/descriptors/reference/reference.md)
494+
- [[Descriptors README]](./frontend/packages/operator-lifecycle-manager/src/components/descriptors/README.md)
495+
- [[Descriptors API Reference]](./frontend/packages/operator-lifecycle-manager/src/components/descriptors/reference/reference.md)

0 commit comments

Comments
 (0)