aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:59:32 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:59:32 +0000
commitd68841d9f75636575cd778838a8ceea5fd5aada3 (patch)
tree778c84203ed9bfa4dc1c8234e4e2cf60da6ebd8c /README.md
parent42af09588f1f839b9ab36356f02f34c89559bcfa (diff)
Upload ui
Issue-ID: PORTAL-1084 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: Id0c94859a775094e67b0bb9c91ca5e776a08c068
Diffstat (limited to 'README.md')
-rw-r--r--README.md81
1 files changed, 81 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..99ea425
--- /dev/null
+++ b/README.md
@@ -0,0 +1,81 @@
+# portal-ng
+
+## Getting started
+The portal-ng ui can either be developed against a remote cluster or it's dependencies can be run locally on your machine.
+
+### Developing against a remote cluster
+To develop against a remote cluster, the webpack proxy needs to be configured to forward requests to the remote cluster urls.
+For that we are providing a `staging.proxy.config.json.template` file that needs to be adjusted with your cluster hostnames and then saved as `staging.proxy.config.json`.
+After that, you can either use `npm start` or the `staging.sh` to launch the portal-ng in development mode:
+```sh
+./staging.sh
+```
+```sh
+npm start
+```
+
+### Developing against local containers
+We are providing a docker-compose file that can be used to spin up the portal-ng and it's dependencies (like Keycloak or the portal-bff) on your machine.
+
+To do that, execute the `run.sh` in the development folder:
+```shell
+development/run.sh
+```
+
+To stop the portal-ng, portal backend services, Keycloak and the databases run:
+
+```shell
+development/stop.sh
+```
+
+### Access the ui
+Example requests against the portal backend service can be run in your preferred IDE with the `request.http` file from the development folder.
+
+You can access the portal-ng UI via browser with different default user accounts. Note that these accounts have different roles and differ accordingly
+in what they are allowed to see in the portal.
+
+URL: http://localhost
+```
+username: onap-admin
+password: password
+
+username: onap-designer
+password: password
+
+username: onap-operator
+password: password
+```
+You can access the Keycloak UI via browser.
+
+URL: http://localhost:8080
+```
+username: admin
+password: password
+```
+
+## Docker
+### Build the docker image
+
+Run `npm run build -- --prod --base-href=/portal-ui/` to get a production build of the project, this will be used in the `docker build`.
+
+In the configuration of nginx (the `nginx.template`) we have a few environment variables that need to be set.
+
+```bash
+export NGINX_PORT=80
+export BFF_URL=http://portal-bff:9080/
+export WIREMOCK_URL=http://wiremock:8080/
+```
+
+Finally, build the image with
+
+```bash
+docker build -t portal-ng .
+```
+
+### Run the docker image
+
+```bash
+docker run -e "NGINX_PORT=80" -e "BFF_URL=http:portal-bff:9080/" -e "WIREMOCK_URL=http://wiremock:8080/" -p 8080:80 portal-ng
+```
+
+Note that this will not work on its own, because the referenced containers (`BFF` and `WIREMOCK`) are most likely not available in your local environment. You would have to run them as well, or pass in other urls (like `example.com`) to get the container running locally. Obviously this does not get you very far though.