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
).
- 2 vCPU
- 6 GB RAM
- ~20gb (storage)
- deployment/Virtualization technology: Containers [k8s, deployment file]
- Node 14
- React
- CoreUI for React
- TypeScript
- ReactQuery
- ReactHooksForm
- Installed Kubernetes cluster for deploying the application instances
- 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)
# install app's dependencies
$ yarn install
# 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.
Run build
to build the project. The build artifacts will be stored in the build/
directory.
# build for production with minification
$ yarn build
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 eitherubiwhere/5gzorro-operator-a-dashboard
,ubiwhere/5gzorro-operator-b-dashboard
,ubiwhere/5gzorro-operator-c-dashboard
orubiwhere/5gzorro-regulator-a-dashboard
. For the 5tonic testbed add "5tonic" to the image tag name, example:ubiwhere/5gzorro-5tonic-operator-b-dashboard
- The
-
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
.
- Note: change the deployment files accordingly. For the 5tonic testbed use the files named
- 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 likeoperator-dashboard-a-<random_string>
)kubectl get services -n domain-operator-a
(should have a serviceoperator-service-a
)kubectl get deployments -n domain-operator-a
(should have a deploymentoperator-dashboard-a
)
- Delete the previous deploy:
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
The documentation for the CoreUI Admin Template is hosted at the website CoreUI for React
Henrique Castilho - FE Development - [email protected]
Filipa Martins, Pedro Teixeira - deployment and maintenance - [email protected], [email protected]