You are on page 1of 6

How to Run CCA

What is CCA?
Currently enabled for
Checks before you begin
How to run CCA?
Examples of few cca cli's:
Commit approval
How to clean ws:
Running CCA in Background
Refreshing workspace to pick latest commit criteria:
Links mentioned below can be accessed for:
Limitations:
For Branch owners/Admins:
Working with baselines:
Open issues:

What is CCA?
The purpose of the CCA is to provide engineers tooling that will automate some of the manual tasks currently required of them, prior to committing
the code changes.
It helps with:
1.
2.
3.
4.

Build of an image/module (and running SA)


Attaching PRRQ/UT/SA enclosures
Submitting and comparing sanity
Automatic RL approval

However it does not:


1. Precommit/commit the code for a user
2. It would only run the sanity/tasks defined for a devline/release by CCA/Devline admin, if you need to run some other sanity, then it must
be run out of CCA.

Currently enabled for


1.
2.
3.
4.
N5K:

ft-mr4
ft-mr5
f_6210_ecbu_bugfix_0220
pd_gbr_bugfix_0214
http://wikicentral.cisco.com/display/PROJECT/N5K+CCA+Rollout

Checks before you begin


If you are a new hire or new to this group, make sure you have access to submit sanity. If not, please follow below:
1. Go to http://earms-app-vm.cisco.com/server/EarmsGroupInfo?op=showSelfAdd
2. Select Group : DC3(DCBU) and enter your userid (leave the password blank)

How to run CCA?


1.
2.
3.
4.

Pull out LBT out of desired tag. Please refer http://and-sw-web.cisco.com/twiki/bin/view/Build/LinkedTreeFaq for details
Make required code changes
Unit test code changes
Run 'cca list' to get Commit criteria

cca list [-man] [-help] [-xml] [-branch I<branch>] [-tasks I<task,...>] [-types <action_type,...>]
[-xml] [-long] [-criteria] [-refresh] [-wab_ws]
5. Run 'cca exec' or 'cca exec -tasks <specify task names if only subset of criteria to be run>'
cca execute [-man] [-help]
cca exec has 2 modes:

=> interactive [default - prompt if mandatory info missing]


=> non-interactive - Provide unit test report path, PRRQ queue name & description with cca exe [to minimize prompting],
Eg. --cca exe -tasks <task names> -ut_report <ut report file path> -cr_queue <PRRQ queue name> -cr_descr <PRRQ
description file path>
If '-tasks' not specified, cca will execute all the mandatory tasks as configured for your devline.
The tasks that are optional will not be run by default. [The optional tasks can be run by specifying '-include_optional']
Run 'cca status' for checking the status of tasks being executed. If after running "cca execute" all the tasks that are required for satisfying the
Commit Criteria are performed successfully, then after running "cca status", CCA would prompt whether the User wishes to send a mail for
approving the commit for their work. If said yes then CCA would send out the mail for Commit approval.
Once overall criteria is met(when all required tasks are successfully completed), 'cca status' invokes auto-approve [commit approval
request] by itself.
Users can also check status of any particular task, by providing the -task option. This would give the status of only that particular task. This
would be helpful in cases when users are working on changes to the code particular to any task [for example static_analysis].
The syntax for cca status
cca status [-view <view>] [-vob <vob>] [-man] [-help] [-xml]
[-tasks I<task,...>] [-types <action_type,...>]

Examples of few cca cli's:

and-sw-bl64-119:>cca list
CCA V4.7
Info: Collecting the workspace details for 'ft-mr5, sanos'. This may take some time...
Info: This devline is supported by BPMN Workflow Engine...
Info: Using bugid 'CSCun33640' stored in cca
Info: bugid CSCun33640 information:
Headline:
Dummy bug for CCA testing
Status:
A
Engineer:
karagraw
Product:
n7k-infra
Component:
sw-build
Info: By default CCA will be run for the integration branch/devline 'ft-mr5'
Info: Checking for branch state...
Commit criteria task list for ft-mr5,sanos in view context 'REL_6_2_10_FM_0_7':
task: build4_titanium
cmd: cca build -task build4_titanium -images "titanium_d1,titanium_d1_kickstart" -enclosure_name "build-output-titanium"
task: build1_n7k_sup1
cmd: cca build -task build1_n7k_sup1 - images "n7000_s1_dk9,n7000_s1_kickstart" -enclosure_name "build-output-sup1"
task: build2_n7k_sup2
cmd: cca build -task build2_n7k_sup2 - images "n7000_s2_dk9,n7000_s2_kickstart" -enclosure_name "build-output-sup2"
task: build3_n7700
cmd: cca build -task build3_n7700 -images "n7700_s2_dk9,n7700_s2_kickstart" -enclosure_name "build-output-n7700"
task_type: optional
task: n7k_sup2_sanity
cmd: cca sanity -task n7k_sup2_sanity - submitjob -script "/auto/dc3/bin/dcos-xsf3-v2-eth -test sup2 -FCoE no" -test_images
"n7000_s2_dk9,n7000_s2_kickstart" -pass_criteria baseline_comparison -enclosure_name "sup2_sanity"
task: titanium_sanity
cmd: cca sanity -task titanium_sanity - submitjob -script "/auto/dc3/bin/dcos-rek9-titanium -test all" -test_images
"titanium_d1,titanium_d1_kickstart" -pass_criteria baseline_comparison -enclosure_name "titanium_sanity"

and-sw-bl64-119:>cca exec -task build1_n7k_sup1 -bug CSCun33640


CCA V4.7
Info: Collecting the workspace details for 'ft-mr5, sanos'. This may take some time...
Info: Collecting the changeset info for 'ft-mr5, sanos'. This may take some time...
Info: This devline is supported by BPMN Workflow Engine...
Info: Using bugid 'CSCun33640' stored in cca
Info: bugid CSCun33640 information:
Headline:
Dummy bug for CCA testing
Status:
A
Engineer:
karagraw
Product:
n7k-infra
Component:
sw-build
Info: By default CCA will be run for the integration branch/devline 'ft-mr5'

Info: Checking for branch state...


Info: Disk Usage Details:
Filesystem
Size Used Avail Use% Mounted on
sjc20-emc06c:/root_vdm_3/t3local39/andmain1
500G 405G 96G 81% /auto/anddcbu1
WARNING: Disk usage has exceeded the threshold value of 80%. CCA might stop executing if disk gets full.
Info: Getting criteria for branch:srcbase:user - ft-mr5:sanos:karagraw
Info: Collecting workspace diff for 'ft-mr5, sanos'. This may take some time...
Info: Checking if LBT exists for workflow type: nxos
Info: NXOS LBT workspace and the link :/auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7/ALL_MODULE_MKS exists
Info: Executing CCA for branch-srcbase-user - ft-mr5:sanos:karagraw
Info: Bootstrap directory /auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7
Info: Invoking the CCA Execution Engine to execute tasks from /auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7 ...
CCA workflow command: /auto/java/bin/java.sh -XX:MaxPermSize=100m -Xms100m -Xmx500m
-Djava.library.path=/auto/commitauto/workflow/externalLibrary -jar /auto/usrcisco-noarch/packages/cca/CCA_V_4_7-282/lib/../etc/cca.jar -action
execute -inputFile /auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7/.ACMEROOT/ca-meta/cca/we/ft-mr5/execute/2/input_execute_request.xml
-wflowPollDuration 120 -wflowDef /auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7/.ACMEROOT/ca-meta/cca/we/ft-mr5/workflow.bpmn20.xml
-execLogFile /auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7/.ACMEROOT/ca-meta/cca/we/ft-mr5/execute/2/workflow_execution_engine.log
INFO: Processing bpmn workflow workflow.bpmn20.xml
Tasks to be executed
build1_n7k_sup1
INFO: Commit criteria status url - http://catools.cisco.com/cca-selfserve/view/viewcriteriastatus.jsf
INFO: Execution start time: Mon Mar 24 07:47:33 PDT 2014
INFO: Task execution details
======================
All the tasks in a group are executed in parallel
Group 1 ( EST. START TIME => Mon Mar 24 07:47:33 PDT 2014 )
build1_n7k_sup1* ( Avg Time -> Unknown, EST. END TIME -> Unknown )
INFO: Executing task: 'build1_n7k_sup1'
Output will be logged to: /auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7/.ACMEROOT/ca-user/cca/we/ft-mr5/execute/2/build1_n7k_sup1

We can also do module based builds using CCA to which will take lesser time in comparison to fullimage builds.
Ex:
and-sw-bl64-140:>cca exec -modules vdc_mgr -bug <>
CCA V4.7
Info: Collecting the workspace details for 'ft-mr5, sanos'. This may take some time...
Info: Collecting the changeset info for 'ft-mr5, sanos'. This may take some time...
Info: This devline is supported by BPMN Workflow Engine...
Info: By default CCA will be run for the integration branch/devline 'ft-mr5'
Info: Checking for branch state...
WARNING: You have specified the module build option by using '-modules'.
Pls ensure that your changes are only impacting the module(s) you have specified
and there are no changes that could impact other modules or global constants/functions
that would need a clean build.
Type 'yes' to proceed with module build.
Type 'no' to proceed with full build.
Type 'q|Q' to quit cca [For global code changes], and then do a manual clean of your workspace
and then run cca without the module option.
Enter your choice:yes
Info: Module build requested for this workspace: vdc_mgr

and-sw-bl64-119:>cca status
CCA V4.7
Info: Collecting the workspace details for 'ft-mr5, sanos'. This may take some time...
Info: Collecting the changeset info for 'ft-mr5, sanos'. This may take some time...
Info: This devline is supported by BPMN Workflow Engine...
Info: Using bugid 'CSCun33640' stored in cca

Info: bugid CSCun33640 information:


Headline:
Dummy bug for CCA testing
Status:
A
Engineer:
karagraw
Product:
n7k-infra
Component:
sw-build
Info: By default CCA will be run for the integration branch/devline 'ft-mr5'
Info: Checking for branch state...
Info: Collecting workspace diff for 'ft-mr5, sanos'. This may take some time...
Info: Bootstrap directory /auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7
Info: Invoking the CCA Java Engine to get status for tasks from /auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7...
CCA workflow command: /auto/java/bin/java.sh -XX:MaxPermSize=100m -Xms100m -Xmx500m -jar
/auto/usrcisco-noarch/packages/cca/CCA_V_4_7-282/lib/../etc/cca.jar -action status -inputFile
/auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7/.ACMEROOT/ca-meta/cca/we/ft-mr5/status/24/input_status_request.xml -outputFile
/auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7/.ACMEROOT/ca-meta/cca/we/ft-mr5/status/24/output_status_response.xml -execLogFile
/auto/anddcbu1/karagraw/REL_6_2_10_FM_0_7/.ACMEROOT/ca-meta/cca/we/ft-mr5/status/24/workflow_status_execution.log
INFO: Displaying latest status for all tasks
INFO: All tasks marked * are not considered for Overall Criteria Status calculation
build1_n7k_sup1 : criteria NOT met/run
build2_n7k_sup2 : criteria NOT met/run
build3_n7700* : not required - optional
build4_titanium : criteria NOT met/run
n7700_sanity* : not required - optional
n7k_sup1_sanity : criteria met
n7k_sup2_sanity : criteria NOT met/run
titanium_sanity : criteria NOT met/run
sa : criteria met
ut : criteria NOT met/run
cr : criteria met
OVERALL CRITERIA STATUS : CRITERIA NOT MET
These above results are from status cache. Full status was last invoked at 2014/03/24 09:40:48. Please run cca status -refresh to get the most
updated results

Commit approval
Once all the tasks are successfully executed and if the criterios are satisfied then "cca status" run would prompt for the commit approval to be
done. Please note that CCA does not do any commits by itself. Currently CCA sends out commit approval depending on the branches. That
means for different branches commit approval method is different. Currently commit approval is done through these methods,
*Auto-approve
Auto-approval of commit is done for branches on which the "auto-approve" tool is enabled. If the "auto-approve" is done, then Users can proceed
with the commit.
*Commit approval through mail
For branches on which neither "auto-approve" is enabled nor if they are throttle branches, a mail is sent to the the commit approvers requesting to
approve the commit. With this set-up the commit approvers are expected to approve the commit if the changes are acceptable and the approval
has to be done through the mail itself.

How to clean ws:


There is an add-on to the CCA CLIs. Whenever CCA is run on any view the logs and other details are stored in the view itself. So if the same view
is being used for different fixes then CCA might use old stored details. Thus whenever same view is being used for multiple fixes it is good to
clean up the old CCA logs. For this the CCA provides the "clean" CLI.
cca clean
Once a fix is committed and if the ws is being re-used run the 'clean" CLI before making the new changes. All the CCA logs would be removed
from the ws thus the ws would be free of any remnants of previous CCA run.

Running CCA in Background


By default when "cca execute" is run, the CCA execution happens in the foreground. The user would need to keep the session open till cca
execute run is completed. CCA provides a feature by virtue of which the 'cca execute' could be run in the background. This means that CCA will
not run in foreground and user would be provided with the pid of the background process and the log file execute_bg_log_<pid> in which the
entire CCA run is being logged to.
This feature can be invoked by running 'cca execute' with the '-bg' option.

Refreshing workspace to pick latest commit criteria:


Whenever you see mail from branch owner on new criteria being published please do 'cca list -refresh' to update your ws with latest commit
criteria.

Links mentioned below can be accessed for:


1.
2.
3.
4.

Deeper introduction on CCA


Basic essentiality to access CCA
Steps to be followed in fulfilling commit criteria
Basic features and advanced options in CCA

Introduction on running CCA for NXOS workflow is captured in below wiki:


http://wikicentral.cisco.com/display/WFLOW/CCA+For+NXOS
For details on various CCA cli's below link can be referred:
http://wikicentral.cisco.com/display/WFLOW/Detailed+Commit+Criteria+Page
For more advance options please visit below link:
http://wikicentral.cisco.com/display/WFLOW/CCA+Quick+Start+Guide
DE FAQ's:
http://wikicentral.cisco.com/display/WFLOW/CCA+DE+FAQs#CCADEFAQs-CCADEFAQsCCAonNXOS

Limitations:
1. Currently CR task is only supported on 64bit machine. So its recommended to use 64 bit servers for running CCA.
2. As of now with cca ibuild only fullimage and module builds are supported. Module builds will internally do imaging_only.
For any issues you can open a case with cca support team - http://wwwin-swx.cisco.com/toolshelp/login.php
http://wikicentral.cisco.com/display/NRE/CCA+open+issues

For Branch owners/Admins:


Link for modifying/setting up commit criteria's for any branch/devline: http://catools.cisco.com/cca-selfserve/auth/login.jsf
Below is the webex recording of a demo/training from CCA team:
https://cisco.webex.com/ciscosales/lsr.php?RCID=3d99a327f13324570636be92a9b1cb3f
http://wikicentral.cisco.com/display/WFLOW/CCA+For+NXOS+Pilot+Demo+Minutes
For requesting creation of new devlines in addition to requesting through http://catools.cisco.com/cca-selfserve/view/searchcc.jsf please drop a
mail to CCA team.
Commit criterias for new devlines can be cloned with existing one's and can be edited and published whenever required.

Working with baselines:


Please refer below wiki on various steps involved for setting up baselines on eARMS:
http://wikicentral.cisco.com/display/NRE/Setting+and+viewing+baselines
Also see

http://wikicentral.cisco.com/display/PROJECT/CCA+build+speed+improvement+for+pf_dev1+builds#CCAbuildspeedimprovementforpf_dev1builds-Examplesand
http://wikicentral.cisco.com/display/WFLOW/CCA+DE+FAQs
eARMS baselining
http://wikicentral.cisco.com/display/GROUP/eARMS+4.3+-+Baseline+Feature

Webex Streaming link: (New Demo (25-Jun-14): https://cisco.webex.com/ciscosales/ldr.php?RCID=09b02feff8c6399a97ba2f56b0f5765e)


Experts
Manoj Kumar S (manojks) <manojks@cisco.com>; Pankaj Kumar Goel (pangoel) <pangoel@cisco.com>

Open issues:
http://wikicentral.cisco.com/display/NRE/CCA+open+issues

You might also like