ODF Console is the UI plugin for Openshift Data Foundation Operator. It works as a remote module for OpenShift Container Platform console.
ODF console works as a remote bundle for OCP console. To run ODF Console there should be a instance of OCP console up and running.
- Follow everything as mentioned in the console README.md to build the application.
- Run the console bridge as follows
./bin/bridge -plugins odf-console=http://localhost:9001/
- Run developemnt mode of console by going into
console/frontend
and runningyarn run dev
After the OCP console is set as required by ODF Console. Performs the following steps to make it run.
- Install ODF Operator
- Create a Storage System
- Clone this repo.
- Pull all required dependencies by running
yarn install
. - Run the development mode of odf-console using
yarn run dev
. This runs a webserver in port 9001.
- Install ODF Operator.
- Create a Storage System.
- Clone this repo.
- Pull all required dependencies by running
yarn install
. - Run the development mode of odf-console using
CONSOLE_VERSION=4.18 I8N_NS=plugin__odf-console PLUGIN=odf yarn run dev:c
. This runs a container running both the console bridge and a webserver in port 9001. - For more OCP container related environment variables Refer.
Run all unit tests:
yarn test
# Run them with coverage:
yarn test-coverage
E2E tests are written in Cypress.
Launch Cypress test runner:
yarn test-cypress
This will launch the Cypress Test Runner UI, where you can run one or all cypress tests after choosing the required browser.
It is also possible to run the Cypress tests in headless mode:
yarn test-cypress-headless
By default, it will look for Chrome in the system and use it, but if you want to use Firefox instead, set BRIDGE_E2E_BROWSER_NAME environment variable in your shell with the value firefox.
To debug with VSCode breakpoints, do the following:
-
Run:
yarn dev:c
-
To display the value of the variables inline, add this to your settings.json:
"debug.inlineValues": "on"
This setting also works with the
debugger;
statement. -
Create a launch.json file from the template:
cp .vscode/launch.{template.json,json}
-
Set webRoot: your odf-console directory path. Check if the template value works for you.
-
Set a breakpoint in the code.
-
Go to Run and Debug panel, select "Debug odf-console" and start debugging.
A Google Chrome instance will be launched.
-
Interact with the browser until you reach the breakpoint.
Build a beta for testing:
docker build -t quay.io/ocs-dev/odf-console-ci-runner:beta -f Dockerfile.ci.runner .
Push it:
docker push quay.io/ocs-dev/odf-console-ci-runner:beta
Only for testing purposes (don't merge this), add a separate commit updating .ci-operator.yaml
:
tag: beta