Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Configuration for testing with minikube:

Clone policy-docker and navigate to policy-db-migrator folder

On Download db.yaml to the folder

Create a db-migrator-test.sh file under /git/docker/policy-db-migrator/src/main/docker folder with the script provided at the end of this page

Considering minikube is installed, on a terminal do the following

...

languagebash

...

:

Code Block
languagebash
titleRunning with minikube
collapsetrue
# setup minikube
minikube config set driver docker

# attach the local docker environment to minikube
eval $(minikube docker-env)

# build a local image of db-migrator
mvn clean install

# image build can be skipped if changing the image on db.yaml to the nexus one
# - image: onap/policy-db-migrator to nexus3.onap.org:10001/onap/policy-db-migrator
#        imagePullPolicy: Never to IfNotPresent

# start minikube using the docker repo as environment folder
minikube start --mount --mount-string="/git/docker:/mnt"

...


...

# 

...

start 

...

kubernete 

...

languagebash
pods with configuration defined on db.yaml
kubectl create -f db.yaml

## check if pods are on Running state
kubectl get pods

# if pods are under Running state, collect logs
kubectl logs <db-migrator image name>

# stop pods
kubectl delete -f db.yaml
minikube stop



Test scenarios:

- Fresh install Honolulu

...