Date: Fri, 29 Mar 2024 09:20:52 +0000 (UTC) Message-ID: <540876966.130606.1711704052394@aws-us-west-2-onap-confluence-1.web.codeaurora.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_130605_1810036506.1711704052393" ------=_Part_130605_1810036506.1711704052393 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
For DCAE services deployed via blueprint, below steps can be followed to= trial out new blueprint/inputs
1) Using ONAP key, you can login into rancher vm on required tenant DCAE= /integration-SB04/Integration-OOM-Daily/Integration-OOM-Staging-Daily
For e.g =E2=80=93 for SB04 rancher ip&nbs=
p;
>>ssh -i ~/onap_dev ubuntu@10.12.5.47
Note: Use DCAE tenant if your components is not targe= ted for current release. The onap_dev is common key used across all VM in WI= Nlab.
2) Using kubectl find the pod for bootstrap and exec into it
>>kubectl exec -it -n onap dev-dcaegen2-dcae-bootstrap-776cf86d49-mxz=
q6 /bin/bash
3) The blueprint for Holmes rules/engine component are under /blueprints (t=
his is basically pulled from nexus raw during container build) and correspo=
nding input file is under /inputs (this gets mapped during deployment from =
what is specified under oom repo). Here you can basically modify the image =
tag or any other blueprint changes to trial/deploy.
4) Deploy (or undeploy) commands.
If the component is already deployed (run= "cfy deployments list" to check), then uninstall first
Uninstall
Syntax - cfy uninstall <deployment t= o be uninstalled>
>>cfy uninstall holmes_rules
Remove the deployment (t= his is required if uninstall does not remove the deployment automatically)<= /p>
Syntax - cfy deployments delete -f <= deployment name>
>>cfy deployments delete -f holme= s_rules
Delete older version of blueprint= (run "cfy blueprints list" to get current list; this is required = if uninstall does not remove the deployment automatically)
Syntax - cfy blueprints delete <blue= print name>
>>cfy blueprints delete holmes_rules
Validate the new blueprint change= s
Syntax - cfy blueprints validate <bl= ueprint filename>
>> cfy blueprints validate k8s-ho= lmes-rules.yaml
Upload the new blueprint=
Syntax - cfy blueprints upload -b <b= lueprintname> <blueprint file path>
>>cfy blueprints uplo= ad -b holmes_rules /blueprints/k8s-holmes-rules.yaml
Create a new deployment with upda= ted blueprint
Syntax - cfy deployments create -b <= blueprint name> -i <input file path> <deployment name>
&g= t;>cfy deployments create -b holmes_rules -i /inputs/k8s-holmes_rules-in= puts.yaml holmes_rules
Execute install workflow=
Syntax - cfy executions start -d <de= ployment name> install
>>cfy executions start -d holmes_rules i= nstall
Note: Examples are captured around holmes_engine;= replace holmes_engine and corresponding blueprint/input file name required= .
5) Verify status/logs
>>root@onap-oom-rancher:~# kubectl get pods -n onap | grep holmes
dep-holmes-engine-mgmt-885d86d49-czh28 &=
nbsp; &nbs=
p; 0/1 Running &=
nbsp; 61 10h
dep-holmes-rule-mgmt-5ffd74f697-bb7xp &n=
bsp;  =
; 0/1 Run=
ning 61 10h&nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p;
The component version used in deployment can be checked using below command=
.
>> kubectl describe pod -n onap dep= -holmes-engine-mgmt-885d86d49-czh28
Rolling upgrade of deployed components
DCAE platform for R3 supports rolling upgrade of individual component de= ployed via cloudify.
To upgrade a running pod, follow below syntax
cfy execution start -d <deployment name> <inputfile> execute= _operation
<input file> - should be under following structure
operation: update_imag= e
operation_kwargs:
&nbs= p; image: <complete path of image:tag>
node_ids:
&nbs= p; - <list of node_id's in blueprint to be updated>
Example: cfy execution= s start -d ves -p k8s-ves-image.yaml execute_operation
Where k8s-ves-image.yaml is set as below
operation: update_imag= e
operation_kwargs:
&nbs= p; image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ve= s.vescollector:1.3.0
node_ids:
&nbs= p; - "ves"
Example of rolling upgrade executions (logs for Data-file collect= or)
= cfy executions start -d datafile-collect= or -p k8s-datafile-collector-image.yaml execute_operation
= Executing workflow execute_operation on = deployment datafile-collector [timeout=3D900 seconds]
= 2018-10-10 20:42:07.234 CFY <da= tafile-collector> Starting 'execute_operation' workflow execution=
= 2018-10-10 20:42:07.971 CFY <da= tafile-collector> [datafile-collector_8avn6c] Starting operation update_= image (Operation parameters: {u'image':u'10.12.5.2:5000/onap/org.onap.dcaeg= en2.collectors.datafile.datafile-app-server:1.0.2'})
= 2018-10-10 20:42:07.971 CFY <da= tafile-collector> [datafile-collector_8avn6c.update_image] Sending task = 'k8splugin.update_image'
= 2018-10-10 20:42:07.971 CFY <da= tafile-collector> [datafile-collector_8avn6c.update_image] Task started = 'k8splugin.update_image'
= 2018-10-10 20:42:08.682 LOG <da= tafile-collector> [datafile-collector_8avn6c.update_image] INFO: Updatin= g app image for dcae-datafile-collector from 10.12.5.2:5000/onap/org.onap.d= caegen2.collectors.datafile.datafile-app-server:1.0.0 to 10.12.5.2:5000/ona= p/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.0.2
=
2018-10-10 20:42:09.358 LOG <da=
tafile-collector> [datafile-collector_8avn6c.update_image] INFO: Waiting=
up to 300 secs for dcae-datafile-collector to be updated and become ready =
= 2018-10-10 20:42:26.250 CFY <da= tafile-collector> [datafile-collector_8avn6c.update_image] Task succeede= d 'k8splugin.update_image' 2018-10-10 20:42:26.991 CFY <datafi= le-collector> [datafile-collector_8avn6c] Finished operation update_imag= e
= 2018-10-10 20:42:26.991 CFY <da= tafile-collector> 'execute_operation' workflow execution succeeded
= Finished executing workflow execute_oper= ation on deployment datafile-collector
= * Run 'cfy events list -e 14cca5f1-ea89-= 4a0b-9ce0-bb8b25cc8cc1' to retrieve the execution's events/logs