npm install --save @openshift-assisted/ui-lib
or
yarn add @openshift-assisted/ui-lib
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 any newer LTS version.
- 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 a parent directory, e.g.
~/Projects
. - Create your own fork of this repo and
git clone
it. Then run the following commands from the repository';'s root directory-
cd ~/Projects git clone https://github.com/<username>/assisted-installer-ui.git
-
- Create a
.env.local
file inapps/assisted-ui/
and add the Assisted Installer API URL-
AIUI_APP_API_URL=http://<host-ip>:6008
-
- Set up the package managers shims and install the project dependencies:
-
npm i -g corepack corepack enable yarn install
-
- Build the project
-
yarn build:all
-
- Start the Assisted Installer UI stand-alone app
-
yarn apps/assisted-ui yarn serve
-
- Browse to http://localhost:5173/ using a modern web browser.
Assisted Installer UI is integrated in uhc-portal (the full OCM app, GitLab access needed).
Use this environnement if you want to test the integration of ui-lib in uhc-portal. For development purposes prefer the use of assisted-ui application.
-
Install yalc on your system. yalc simulate the yarn publish workflow without publishing our packages to the remote registry.
-
yalc --version
-
-
In one terminal run ui-lib in watch mode. It will build and publish
@openshift-assisted/ui-lib
packages everytime you make a change.-
cd libs/ui-lib yarn watch
-
-
In another terminal, fork and clone uhc-portal:
-
cd ~/Projects git clone https://gitlab.cee.redhat.com/<username>/uhc-portal.git
-
-
The first time, install npm dependencies and link
@openshift-assisted/ui-lib
and@openshift-assisted/locales
using yalc. You can skip this after. The watcher on ui-lib will update the packages for you.
Be aware thatyalc
updates theyarn.lock
file. DO NOT INCLUDE THESE CHANGES INTO VERSION CONTROL.-
cd uhc-portal yarn install yalc link @openshift-assisted/ui-lib yalc link @openshift-assisted/locales
-
-
Now you can start uhc-portal. Please follow the uhc-portal README
-
yarn start
-
-
Visit https://ENV.foo.redhat.com:1337/openshift/assisted-installer/clusters/~new
// TODO...
To publish a new version of the package to npmjs.com
- Create a new branch from
master
in this repo, calledrelease/v<some-semver-string>
. - Draft a new release through GitHub's interface.
- Fill the form with the following details:
- Tag:
v<some-semver-string>
- Target branch:
release/v<some-semver-string>
(same as in step 2 above). - Title:
v<some-semver-string>
- Description: Generate the release notes automatically (or edit the field manually)
- Tag:
The types used by Assisted Installer UI are defined in libs/ui-lib/common/api/types.ts
and they
are generated automatically by running yarn workspace @openshift-assisted/ui-lib update-api
.
See i18n for information on our internationalization tools and guidelines.
Apache-2.0