By contributing to this project you agree to the Developer Certificate of Origin (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution. See the DCO file for details.
This is a monorepo, as such, it's composed of many different projects.
The principal folders are: apps
and libs
.
- A Linux distro, like Fedora.
- NodeJS > v14, or newer LTS version.
- Yarn
- This project uses
rsync
in order to synchronize .css files in one if it's build steps. - A back-end API to connect to. Please see instructions in assisted-test-infra.
- Create your own fork of this repo and
git clone
it.git clone https://github.com/<username>/assisted-installer-ui.git
- Create a
.env.local
file inapps/assisted-ui/
and add the Assisted Installer API URLAIUI_APP_API_URL=http://<host-ip>:6008
- Set up the package managers shims and install the project dependencies:
yarn install
- Build the project
yarn build:all
- Start the Assisted Installer UI stand-alone app
yarn workspace @openshift-assisted/assisted-ui serve
- Browse to http://localhost:5173/ using a modern web browser.
The Assisted Installer UI is consumed as a library at build-time by other applications.
The uhc-portal is one of them and is the
application you see at https://console.redhat.com/openshift.
Use this setup if you want to test the libs/ui-lib
integration with the uhc-portal. These steps
apply for libs/locales
as well.
- Install yalc (it simulates local package registry).
# with yarn: yarn global add yalc
# or with npm: npm i -g yalc
# then verify the command works as expected yalc --version
- In one terminal run
libs/ui-lib
in watch mode.
The script builds and publishes the@openshift-assisted/ui-lib
package to the local registry everytime you make a change.yarn workspace @openshift-assisted/ui-lib watch
- Fork and clone the uhc-portal project
git clone https://gitlab.cee.redhat.com/<username>/uhc-portal.git
- Inside the uhc-portal run the following commands
yarn install yalc link @openshift-assisted/ui-lib yalc link @openshift-assisted/locales
yalc link
needs to be executed only after cloning or pulling new changes from the uhc-portal. Be aware that this command updates the project'syarn.lock
file.
DO NOT COMMIT THESE CHANGES INTO VERSION CONTROL. - Now you can follow the uhc-portal's README file in order to set up their dev-environment.
Central infrastructure management part of Assisted Installer UI is integrated into stolostron/console.
Use this setup if you want to test the libs/ui-lib
integration with the stolostron/console. These
steps apply for libs/locales
as well.
-
Install yalc (it simulates local package registry).
# with yarn: yarn global add yalc
# or with npm: npm i -g yalc
# then verify the command works as expected yalc --version
-
In one terminal run
libs/ui-lib
in watch mode.
The script builds and publishes the@openshift-assisted/ui-lib
package to the local registry everytime you make a change.yarn workspace @openshift-assisted/ui-lib watch
-
In another terminal run
libs/locales
in watch mode.
The script builds and publishes the@openshift-assisted/locales
package to the local registry everytime you make a change.yarn workspace @openshift-assisted/locales watch
-
Follow the stolostron/console development setup guide.
-
To use locally published @openshift-assisted packages inside the stolostron/console run the following commands
cd frontend yalc link @openshift-assisted/ui-lib yalc link @openshift-assisted/locales
Note that these commands need to be re-executed every time the
npm install
is run in thefrontend
directory.
The TypeScript types used by Assisted Installer UI are generated automatically from the
assisted-service's swagger file.
These can be generated automatically by running:
yarn workspace @openshift-assisted/ui-lib update-api