Versions Compared

Key

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

...

Table of Contents
maxLevel2

Create a complex in AAI

...

Problem creating topics in DMaaP

1. Restart DMaaP

Code Block
languagexmlbash
themeMidnight
linenumberstrue
PUT https://aai.api.simpledemo.openecomp.org:30233/aai/v14/cloud-infrastructure/complexes/complex/clli1 

Authorization:Basic QUFJOkFBSQ==
X-TransactionId:jimmy-postman
X-FromAppId:AAI
Content-Type:application/json
Accept:application/json
Cache-Control:no-cache

Body:
{
    "physical-location-id": "clli1",
    "data-center-code": "data-center-code-BINZ",
    "complex-name": "clli1",
    "identity-url": "identity-url-BINZ",Delete DMaaP-MR POD
Delete DMaaP-Kafka POD
Delete DMaaP-Zookeeper POD
Recreate DMaaP-Zookeeper POD
Recreate DMaaP-Kafka POD
Recreate DMaaP-MR POD

2. Make sure there are no conflicting topics, e.g. unauthenticated_PNF_READY conflicts with unauthenticated.PNF_READY

3. Delete conflicting topics in dmaap-zookeeper database (no delete topic API in Casablanca release)

Create a complex in AAI

See How-To: Register a VIM/Cloud Instance to ONAP

Code Block
languagexml
themeMidnight
linenumberstrue
PUT https://aai.api.simpledemo.openecomp.org:30233/aai/v14/cloud-infrastructure/complexes/complex/clli1 

Authorization:Basic QUFJOkFBSQ==
X-TransactionId:jimmy-postman
X-FromAppId:AAI
Content-Type:application/json
Accept:application/json
Cache-Control:no-cache

Body:
{
    "physical-location-typeid": "physical-location-type-val-28399clli1",
    "street1data-center-code": "exampledata-street1center-valcode-28399BINZ",
    "street2complex-name": "example-street2-val-28399clli1",
    "cityidentity-url": "exampleidentity-cityurl-val-28399BINZ",
    "statephysical-location-type": "examplephysical-location-statetype-val-28399",
    "postal-codestreet1": "example-postal-codestreet1-val-28399",
    "countrystreet2": "example-countrystreet2-val-28399",
    "regioncity": "example-regioncity-val-28399",
    "latitudestate": "1111example-state-val-28399",
    "longitudepostal-code": "2222example-postal-code-val-28399",
    "elevationcountry": "example-elevationcountry-val-28399",
    "lataregion": "example-lataregion-val-28399"
}

...

,
    "latitude": "1111",
    "longitude": "2222",
    "elevation": "example-elevation-val-28399",
    "lata": "example-lata-val-28399"
}

Register a VIM via ESR GUI: http://msb.api.discovery.simpledemo.onap.org:30280/iui/aai-esr-gui/extsys/vim/vimView.html  

...

Code Block
languagebash
themeMidnight
titledelete old configmap versions
linenumberstrue
collapsetrue
#!/usr/bin/env bash

TARGET_NUM_REVISIONS=10
TARGET_NUM_REVISIONS=$(($TARGET_NUM_REVISIONS+0))

RELEASES=$(kubectl --namespace=kube-system get cm -l OWNER=TILLER -o go-template --template='{{range .items}}{{ .metadata.labels.NAME }}{{"\n"}}{{ end }}' | sort -u)

# create the directory to store backups
mkdir configmaps

for RELEASE in $RELEASES
do
  # get the revisions of this release
  REVISIONS=$(kubectl --namespace=kube-system get cm -l OWNER=TILLER -l NAME=$RELEASE | awk '{if(NR>1)print $1}' | sed 's/.*\.v//' | sort -n)
  NUM_REVISIONS=$(echo $REVISIONS | tr " " "\n" | wc -l)
  NUM_REVISIONS=$(($NUM_REVISIONS+0))

  echo "Release $RELEASE has $NUM_REVISIONS revisions. Target is $TARGET_NUM_REVISIONS."
  if [ $NUM_REVISIONS -gt $TARGET_NUM_REVISIONS ]; then
    NUM_TO_DELETE=$(($NUM_REVISIONS-$TARGET_NUM_REVISIONS))
    echo "Will delete $NUM_TO_DELETE revisions"

    TO_DELETE=$(echo $REVISIONS | tr " " "\n" | head -n $NUM_TO_DELETE)

    for DELETE_REVISION in $TO_DELETE
    do
       do
      CMNAME=$RELEASE.v$DELETE_REVISION
      echo "Deleting $CMNAME"
      # Take a backup
      kubectl --namespace=kube-system get cm $CMNAME -o yaml > configmaps/$CMNAME.yaml
      # Do the delete
      kubectl --namespace=kube-system delete cm $CMNAME
    done
  fi
doneCMNAME=$RELEASE.v$DELETE_REVISION
      echo "Deleting $CMNAME"
      # Take a backup
      kubectl --namespace=kube-system get cm $CMNAME -o yaml > configmaps/$CMNAME.yaml
      # Do the delete
      kubectl --namespace=kube-system delete cm $CMNAME
    done
  fi
done

Update Edge Rules in running AAI deployment (OOM, Casablanca branch)

Note: this is not a recommended solution, as it is not persistent after PODs deletion. See https://lists.onap.org/g/onap-discuss/message/16171 and 

Jira Legacy
serverSystem Jira
serverId4733707d-2057-3a0f-ae5e-4fd8aff50176
keyAAI-2154

1) Add new edge rules to aai-traversal, aai-resources and aai-graphadmin containers. For instance:

Code Block
languagebash
themeMidnight
linenumberstrue
kubectl exec -ti dev-aai-aai-resources-5b6c5f454c-kbmdh bash
root@aai-resources:/opt/app/aai-resources# vi /opt/app/aai-resources/resources/schema/onap/dbedgerules/v14/DbEdgeRules_newRules_v14.json

2) Run createDBSchema script in aai-graphadmin

Code Block
languagebash
themeMidnight
linenumberstrue
kubectl exec -ti dev-aai-aai-graphadmin-75d6587db4-xpmt5 bash
root@aai-graphadmin:/opt/app/aai-graphadmin# su aaiadmin
aaiadmin@aai-graphadmin:/opt/app/aai-graphadmin$ /opt/app/aai-graphadmin/bin/createDBSchema.sh

3) Restart docker containers aai-traversalaai-resources and aai-graphadmin using docker restart


Change PRH (or any DCAE platform mS) docker image version in a running DCAE deployment (OOM, Casablanca branch) using cloudify manager

Code Block
languagebash
themeMidnight
[root@dev-dcaegen2-dcae-cloudify-manager-dc549746b-6km6k prh]# cfy deployments update -i tag_version=nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:1.2.1-SNAPSHOT prh

Install Cloudify blueprint

Code Block
languagebash
themeMidnight
titlecloudify blueprint installation
linenumberstrue
cfy blueprints validate /blueprints/k8s-prh.yaml
cfy blueprints upload -b prh /blueprints/k8s-prh.yaml
cfy deployments create -b prh -i /inputs/k8s-prh-inputs.yaml prh
cfy executions start -d prh install