/GUI

5GZORRO's GUI comprised of a Governance and a Marketplace portal

Primary LanguageTypeScript

@coreui coreui npm package NPM downloads
@coreui react npm package NPM downloads
npm next

js-standard-style Commitizen friendly pipeline status coverage report

5GZORRO Portal

Description

5GZORRO's Governance and Marketplace Portal.

This repo is mirroring Ubiwhere's private repo. CI/CD is in place, so this instance will always reflect the develop branch (may be updated in the future to reflect only master).

Prerequisites

System Requirements

  • 2 vCPU
  • 6 GB RAM
  • ~20gb (storage)
  • deployment/Virtualization technology: Containers [k8s, deployment file]

Software dependencies

5GZORRO Module dependencies

  • xRM
  • Resource and Service Offer Catalogue
  • Identity and Permissions Manager (ID&P)
  • Governance Manager (deprecated)
  • Legal Prose Repository (LPR)
  • Smart Contract Lifecycle Manager (SCLM)
  • Smart Resource and Service Discovery (SRSD)
  • Intelligent Slice and Service Manager (ISSM)

Installation

# install app's dependencies
$ yarn install

Basic usage

# dev server with hot reload at http://localhost:3000
$ yarn start

Navigate to http://localhost:3000. The app will automatically reload if you change any of the source files.

Build

Run build to build the project. The build artifacts will be stored in the build/ directory.

# build for production with minification
$ yarn build

Deployment

This deploy consists of four separate nginx images, each one with the files for one specific deploy (operator-a, operator-b, operator-c or regulator-a). These images are pushed to Ubiwhere's docker hub repo.

In order to deploy to the existing Kubernetes instance, you'll need to connect to the project's VPN.

After that, you will need to:

  • Setup kubectl:

    • Install kubectl (client version should be at least 21.1)
    • Move/copy the kubeconfig files to the kubectl config (usually the ~/.kube/config file).
      # BCN
      cp ./deployment/platcmpv2_kubeconfig ~/.kube
      # 5Tonic
      cp ./deployment/k8sconfig-5tonic.yaml ~/.kube
    • Access testbed
      # BCN
      export KUBECONFIG=~/.kube/platcmpv2_kubeconfig
      kubectl config use-context platcmp
      # 5Tonic
      export KUBECONFIG=~/.kube/k8sconfig-5tonic.yaml
    • After this, you should be able to access the cluster. You can test this by running something like kubectl get pods, which should return the list of pods running in the cluster.
  • Build the environment to deploy (the files generated by the build will be available at /build folder):

    yarn build:<barcelona|5tonic>:<operatorA|operatorB|operatorC|regulatorA>
  • Generate the nginx image containing the frontend files:

    • Build the image:

      docker build -f deployment/Dockerfile . --build-arg DEPLOY_DIR=/operator-a/ --build-arg SRC_DIR=build/ --tag=ubiwhere/5gzorro-operator-a-dashboard
      • The DEPLOY_DIR should be either /operator-a/, /operator-b/, /operator-c/ or /regulator-a/, and is the destination folder where the frontend files will be placed in the nginx image.
      • The SRC_DIR is the local directory containing the frontend build files.
      • The image tag should be either ubiwhere/5gzorro-operator-a-dashboard, ubiwhere/5gzorro-operator-b-dashboard, ubiwhere/5gzorro-operator-c-dashboard or ubiwhere/5gzorro-regulator-a-dashboard. For the 5tonic testbed add "5tonic" to the image tag name, example: ubiwhere/5gzorro-5tonic-operator-b-dashboard
    • Login to docker hub with an account with privileges to push images under the Ubiwhere organization:

      docker login --username <username>
    • Push the image to the respective registry:

      docker push ubiwhere/5gzorro-operator-a-dashboard
  • Deploy in the barcelona or 5tonic cluster (there probably is a better way of doing this but it works since deleting the existing deployment isn't a problem in this case). The deployment files can be found on the /deployment folder.

    • Delete the previous deploy: kubectl delete -f deployment/deployment-a.yaml
    • Create a new deploy: kubectl create -f deployment/deployment-a.yaml
      • Note: change the deployment files accordingly. For the 5tonic testbed use the files named 5tonic-deployment-<a|b|c|d>.yaml.
    • Check if everything is ok. A pod, service and deployment should have been created in the respective namespace, which you can test by running:
      • kubectl get pods -n domain-operator-a (should have a pod like operator-dashboard-a-<random_string>)
      • kubectl get services -n domain-operator-a (should have a service operator-service-a)
      • kubectl get deployments -n domain-operator-a (should have a deployment operator-dashboard-a)

What's included

Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:

CoreUI-React#v3.0.0
├── public/          #static files
│   ├── assets/      #assets
│   └── index.html   #html template
│
├── src/             #project root
│   ├── assets/  
│   ├── containers/  #container source
│   ├── scss/        #user scss/css source
│   ├── views/       #views source
│   ├── App.js
│   ├── App.test.js
│   ├── index.js
│   ├── _nav.js      #sidebar config
│   ├── routes.js    #routes config
│   └── store.js     #app store
│
└── package.json

Documentation

The documentation for the CoreUI Admin Template is hosted at the website CoreUI for React

Maintainers

Henrique Castilho - FE Development - hcastilho@ubiwhere.com

Filipa Martins, Pedro Teixeira - deployment and maintenance - fmartins@ubiwhere.com, pteixeira@ubiwhere.com