...
...
...
Follow the steps below to setup the CPS environment.
From docker-compose folder run the following after building the images locally :
Code Block | ||
---|---|---|
| ||
VERSION=latest DB_USERNAME=cps DB_PASSWORD=cps docker-compose up -d |
This starts both cps and postgres containers.
Note: Checkout the README.md in docker-compose folder for detailed steps.
Setup schema in DB
Liquibase auto creates the schema on startup.
Set environment variables with relevant connection details which can be found in application.yml in cps-application/resources folder.
Running the project
This option is if you have a local PostgreSQL running.
From the cps folder run the following command :
Code Block |
---|
java -DDB_HOST=localhost -DDB_USERNAME=cps -DDB_PASSWORD=cps -jar cps-application/target/cps-application-x.y.z-SNAPSHOT.jar
|
...
Code Block |
---|
mvn spring-boot:run |
Running CPS via Helm charts on Minikube :
WSL Checks (when using WSL2 on MS Windows)
Check that your WSL 2 environment is running both linux distribution and docker using a windows command prompt/shell
*It might be needed to configure for Windows is configured for WSL 2 and WSL itself is set to use your linux distribution as default.
Code Block | ||||
---|---|---|---|---|
| ||||
$ wsl -l -v
NAME STATE VERSION
* Ubuntu-20.04 Running 2
docker-desktop Running 2
docker-desktop-data Running 2
|
When using WSL 2ensure to open a WSL shell window ie. Command Prompt, wsl ...
Install MiniKube
Install and start MiniKube
Code Block | ||||
---|---|---|---|---|
| ||||
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube start |
Install Kubectl and Helm and Helm Repo
To setup kubectl and helm for ONAP locally follow steps as outlined in the deploy section on - https://docs.onap.org/projects/onap-oom/en/latest/oom_user_guide.html#deploy
Please note the following amendments to the above instructions:
- Follow https://v1-18.docs.kubernetes.io/docs/tasks/tools/install-kubectl/ to install the latest version of kubectl instead of the very old 1.15.11.
- No Need to 'Paste kubectl config rom Rancher' (not sure why that is even in those instructions)
- Skip 'helm install ons/onap' as the document mentions it is not available anymore
Install helm push plugin (before building the Helm repository)
Code Block | ||||
---|---|---|---|---|
| ||||
helm plugin install https://github.com/chartmuseum/helm-push.git |
After following the steps above ensure your local repo has the charts loaded onto it :
Code Block |
---|
helm search repo local
NAME CHART VERSION APP VERSION DESCRIPTION
local/a1policymanagement 8.0.0 1.0.0 A Helm chart for A1 Policy Management Service
local/aaf 8.0.0 ONAP Application Authorization Framework
local/aai 8.0.0 ONAP Active and Available Inventory
local/appc 8.0.0 Application Controller
...
local/contrib 8.0.0 ONAP optional tools
local/cps 8.0.0 Configuration Persistance Service (CPS) |
Deploy CPS
To install CPS only, run the following command from within the oom/kubernetes/cps folder
Code Block | ||||
---|---|---|---|---|
| ||||
cd <your git repo>/oom/kubernetes/cps
helm upgrade dev1 local/cps -i -f values.yaml --set global.masterPassword=mysecr
|
Once you chart is deployed, we can test it by hitting the spring actuator endpoint from a pod:
Code Block | ||||
---|---|---|---|---|
| ||||
kubectl run -it network-multitool-$USER --image=praqma/network-multitool --restart=Never --rm -- bash
curl -X GET "http://cps:8080/manage/health" -H "accept: application/json" -H "Content-Type: application/json" |
...
Setting up SDNC, RAN-sim controller and Honeycomb simulator locally:
...
Download and install docker desktop at
Once docker desktop is installed go to Settings>General and check 'Use the WSL 2 based engine'. Click apply and restart
...