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
The console is a more friendly `kubectl` in the form of a single page webapp. It also integrates with other services like monitoring, chargeback, and OLM. Some things that go on behind the scenes include:
@@ -35,55 +33,66 @@ Backend binaries are output to `/bin`.
35
33
36
34
### Configure the application
37
35
38
-
#### OpenShift
36
+
The following instructions assume you have an existing cluster you can connect
37
+
to. OpenShift 4.0 clusters can be installed using the
You can also use [CodeReady Containers](https://github.com/code-ready/osp4)
40
+
for local installs. More information about installing OpenShift can be found at
41
+
<https://try.openshift.com/>.
42
+
43
+
44
+
#### OpenShift (no authentication)
39
45
40
-
Registering an OpenShift OAuth client requires administrative privileges for the entire cluster, not just a local project. Run the following command to log in as cluster admin:
46
+
For local development, you can disable OAuth and run bridge with an OpenShift
47
+
user's access token. If you've installed OpenShift 4.0, run the following
48
+
commands to login as the kubeadmin user and start a local console for
49
+
development. Make sure to replace `/path/to/install-dir` with the directory you
To run bridge locally connected to an OpenShift cluster, create an `OAuthClient` resource with a generated secret and read that secret:
58
+
The console will be running at [localhost:9000](http://localhost:9000).
59
+
60
+
If you don't have `kubeadmin` access, you can use any user's API token,
61
+
although you will be limited to that user's access and might not be able to run
62
+
the full integration test suite.
63
+
64
+
#### OpenShift (with authentication)
65
+
66
+
If you need to work on the backend code for authentication or you need to test
67
+
different users, you can set up authentication in your development environment.
68
+
Registering an OpenShift OAuth client requires administrative privileges for
69
+
the entire cluster, not just a local project. You must be logged in as a
70
+
cluster admin such as `system:admin` or `kubeadmin`.
71
+
72
+
To run bridge locally connected to an OpenShift cluster, create an
73
+
`OAuthClient` resource with a generated secret and read that secret:
47
74
48
75
```
49
76
oc process -f examples/console-oauth-client.yaml | oc apply -f -
50
77
oc get oauthclient console-oauth-client -o jsonpath='{.secret}' > examples/console-client-secret
51
78
```
52
79
53
-
If the CA bundle of the OpenShift API server is unavailable, fetch the CA certificates from a service account secret. Otherwise copy the CA bundle to `examples/ca.crt`:
80
+
If the CA bundle of the OpenShift API server is unavailable, fetch the CA
81
+
certificates from a service account secret. Otherwise copy the CA bundle to
@@ -206,12 +193,34 @@ Run integration tests on an OpenShift cluster:
206
193
yarn run test-gui-openshift
207
194
```
208
195
This will include the normal k8s CRUD tests and CRUD tests for OpenShift
209
-
resources. It doesn't include ALM tests since it assumes ALM is not
210
-
set up on an OpenShift cluster.
196
+
resources.
197
+
198
+
#### How the Integration Tests Run in CI
199
+
200
+
The end-to-end tests run against pull requests using [ci-operator](https://github.com/openshift/ci-operator/).
201
+
The tests are defined in [this manifest](https://github.com/openshift/release/blob/master/ci-operator/jobs/openshift/console/openshift-console-master-presubmits.yaml)
202
+
in the [openshift/release](https://github.com/openshift/release) repo and were generated with [ci-operator-prowgen](https://github.com/openshift/ci-operator-prowgen).
203
+
204
+
CI runs the [test-prow-e2e.sh](test-prow-e2e.sh) script, which uses the `e2e` suite defined in [protractor.conf.ts](frontend/integration-tests/protractor.conf.ts).
205
+
206
+
You can simulate an e2e run against an existing 4.0 cluster with the following commands (replace `/path/to/install-dir` with your OpenShift 4.0 install directory):
207
+
208
+
```
209
+
$ export BRIDGE_AUTH_USERNAME=kubeadmin
210
+
$ export BRIDGE_BASE_ADDRESS="https://$(oc get route console -n openshift-console -o jsonpath='{.spec.host}')"
If you don't want to run the entire e2e tests, you can use a different suite from [protractor.conf.ts](frontend/integration-tests/protractor.conf.ts). For instance,
216
+
217
+
```
218
+
$ ./test-gui.sh olm
219
+
```
211
220
212
221
#### Hacking Integration Tests
213
222
214
-
Remove the `--headless` flag to Chrome (chromeOptions) in `frontend/integration-tests/protractor.conf.ts` to see what the tests are actually doing.
223
+
Remove the `--headless` flag to Chrome (chromeOptions) in [protractor.conf.ts](frontend/integration-tests/protractor.conf.ts) to see what the tests are actually doing.
0 commit comments