-
1. Re: How can AO monitor a BSA provision job
Ranganath SamudralaMay 20, 2014 9:16 AM (in response to Ben Vassie)
Your workflow that invokes the BSA job should use a launch job to invoke the job in BSA and then exit.
BSA has the capability to call BAO's ORCA web services. This mechanism should be used by the BSA job in the event of failure or success to notify BAO.
-
2. Re: How can AO monitor a BSA provision job
Ben Vassie May 20, 2014 9:23 AM (in response to Ranganath Samudrala)I have thought about that but unfortunately a BSA provision job cannot be a member of batch job, meaning I cannot execute the workflow job once the provision job has completed successfully.
-
3. Re: How can AO monitor a BSA provision job
Ranganath SamudralaMay 20, 2014 9:28 AM (in response to Ben Vassie)
What does is the job provisioning?
-
4. Re: How can AO monitor a BSA provision job
Ben Vassie May 20, 2014 9:41 AM (in response to Ben Vassie)The job is provisioning a bare metal host with ESXi 5.1, once the job has completed I want to add the new host to vCenter, but you cannot execute a provision job and wait.
-
5. Re: How can AO monitor a BSA provision job
Ranganath SamudralaMay 20, 2014 9:59 AM (in response to Ben Vassie)
BAO supports receiving events from VCenter - but I guess - that will not work here either.
It is best to post this question in the BSA forum.
-
6. Re: How can AO monitor a BSA provision job
Ben Vassie May 20, 2014 10:03 AM (in response to Ranganath Samudrala)Thanks.
You can enable a provision job to send an SNMP trap on successful completion but it not enabled by default and you cannot enable it via blcli.
I think the best way forward is getting AO to create a file with the RunID and setting a schedule to check the status.
-
7. Re: How can AO monitor a BSA provision job
Ranganath SamudralaMay 20, 2014 10:09 AM (in response to Ben Vassie)
I am not an expert in BSA, so, I do not know why one cannot enable notification. I guess if can use SNMP you can use email notification as well. It seems like your issue is being able to enable trap generation dynamically. Is there a reason why this cannot be enabled while creating the BSA job?
I would avoid polling mechanism as much as possible.
-
8. Re: How can AO monitor a BSA provision job
Ben Vassie May 20, 2014 10:30 AM (in response to Ranganath Samudrala)The default setting of the provision job is not to send and email or snmp trap and there is no blcli to turn them on.
The next part of my workflow is to add the new host to vCenter, however this cannot happen until the BSA job is complete.
-
9. Re: How can AO monitor a BSA provision job
Olaf Luetkehoelter May 20, 2014 1:07 PM (in response to Ben Vassie)I’ve not worked with BSA in a while so I’m sure I’m missing something… Isn’t a ProvisionJob a Job? Iow wouldn’t this apply: blcli Job addOneTimeScheduleWithSNMPNotification
I’ve pieced together these snippets from the doc (see the comments for the locations of each page):
——
#
#https://docs.bmc.com/docs/display/bsacli85/ProvisionJob-createProvisionJob
#
JOB_GROUP="/Provisioning"
JOB_NAME="win2k3_prov"
JOB_DESCRIPTION="Provision Windows 2003 servers"
#Get the DBKey of the system package you want to use for this job
SYS_PACK_KEY=`blcli SystemPackage getDBKeyByGroupAndName "/SysPackGrp/Windows" "Win2k3"`
#Create an instance of the PROVSERVER class and override some values
WIN2K3_INSTANCE=`blcli PropertyInstance createInstance Class://SystemObject/Server/PROVSERVER PropsForWin2k3 "Server properties for provisioning Win2K3 machines" "intProp=1,strProp=my value,decVal=0.0"
WIN2K3_INSTANCE="Class://SystemObject/Server/PROVSERVER/PropsForWin2k3"
#Get the ID of the ACL template that you want to apply to the servers that you are provisioning
ACL_TEMPLATE_ID=`blcli BlAclTemplate nameToId myACL_Template"
INPUT_FILE="file:///c:/ProvJobInput.txt"
TARGET_FILE="file:///c:/target.csv"
#Create the Provision Job
JOB_KEY=`blcli ProvisionJob createProvisionJob "$JOB_GROUP" "$JOB_NAME" "$JOB_DESCRIPTION" $SYS_PACK_KEY "$WIN2K3_INSTANCE" $ACL_TEMPLATE_ID "$INPUT_FILE" "$TARGET_FILE"'
#
#https://docs.bmc.com/docs/display/bsacli85/Job-addOneTimeScheduleWithSNMPNotification
#
RECIPIENT="snmplistener.anundisclosedcompany.com"
NOTIFICATION_STATUS=14
DATE_STRING="2005-01-01 23:35:00"
DAY_OF_MONTH=25
####take the JOB_KEY from the provision job that was created above
JOB_KEY=`blcli Job addOneTimeScheduleWithSNMPNotification $JOB_KEY "$DATE_STRING" $RECIPIENT $NOTIFICATION_STATUS`
blcli Job execute $JOB_KEY
——
--
Olaf Luetkehoelter
Cloud Technology Architect
CompuCom Systems, Inc.
919.727.6523
Olaf.Luetkehoelter@CompuCom.com<mailto:Olaf.Luetkehoelter@CompuCom.com>
-
10. Re: How can AO monitor a BSA provision job
Volker ScheithauerMay 20, 2014 12:48 PM (in response to Ranganath Samudrala)
Ranga,
you can not call a BAO workflow from another BSA job, just from the UI. So this approach will not work.
Why don't you use a "launch job" activity and then monitor if the job finished. Based on the result, you kick off the subsequent workflows. This way you are not looping in your own flows.
Regards, V.
-
11. Re: How can AO monitor a BSA provision job
Ranganath SamudralaMay 20, 2014 1:40 PM (in response to Volker Scheithauer)
Yeah, I know now that BSA does not support invoking BAO outside of the workflow job.
Apologize if I was not clear, I did not mean to use launch job or a loop to poll. I did not even suggest polling.
However, Olaf has already shown a way to do this by setting notification via SNMP. I am curious if that is possible or not.
If we are going to use polling - what you are suggesting is fine - use a launch job to sleep for a few seconds, check the status, if not done, launch another job and exit. If done, perform the post provisioning task and exit.
-
12. Re: How can AO monitor a BSA provision job
Ben Vassie May 20, 2014 3:51 PM (in response to Ranganath Samudrala)Thank you for the suggestions, I will try them when I am back on the office tomorrow.
-
13. Re: How can AO monitor a BSA provision job
Ben Vassie May 21, 2014 4:48 AM (in response to Ben Vassie)Morning
addOneTimeScheduleWithSNMPNotification works
blcli Job addOneTimeScheduleWithSNMPNotification DBKey:SJobModelKeyImpl:2002254-7-2046108 "2014-05-22 23:35:00" localhost 2
However I need the schedule time and date to be the current date plus 5 minutes
Ben
-
14. Re: How can AO monitor a BSA provision job
Olaf Luetkehoelter May 21, 2014 9:47 AM (in response to Ben Vassie)Glad to see you did get it to work.
…Are you saying you need help with setting the schedule dare and time correctly?
--
Olaf Luetkehoelter
Cloud Technology Architect
CompuCom Systems, Inc.
919.727.6523
Olaf.Luetkehoelter@CompuCom.com<mailto:Olaf.Luetkehoelter@CompuCom.com>