Bug 756250 - Example script: group app deployment
Summary: Example script: group app deployment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: CLI
Version: JON 3.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER01
: JON 3.2.0
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 906495 751246
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-23 02:46 UTC by Deon Ballard
Modified: 2014-01-02 20:33 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 751246
Environment:
Last Closed: 2014-01-02 20:33:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
sample script (9.68 KB, application/javascript)
2012-09-07 11:59 UTC, Filip Brychta
no flags Details

Description Deon Ballard 2011-11-23 02:46:05 UTC
+++ This bug was initially created as a clone of Bug #751246 +++

Need a CLI script which will do the all of the following steps:

1) Use the bundles sub system to provision a new app to a group of JBAS servers. 
2) Schedule for immediate execution a group operation to shut the JBAS servers down one at a time
3) Schedule for immediate execution a group operation to start them up one at a time

The script should just require the name of the group to deploy to and the application bundle .zip

--- Additional comment from lkrejci on 2011-11-15 06:34:27 EST ---

Note that because of the nature of the bundle API, it is not enough to supply just the name of the group and the bundle zip to create an application in JBAS - we need to a) create destination for deploying the app to and b) supply the bundle deployment configuration. Please look inside the scripts (when you install the CLI, they are present in the $CLI_HOME/samples directory) to review their documentation.

master: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=6fa90ab75091ba17e9ac07dbd5c95d73c60c0adc
release_jon3.x: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=c66ac42423a93a24efb161d20db26eb8be587647

    [BZ 751246] - Sample scripts for deploying apps to JBAS.
    
    bundles.js contains generic functions to deploy stuff using the bundle
    subsystem.
    
    deploy-to-and-restart-JBAS.js - contains functions to create and update
    applications deployed to JBAS instances in a group with a sub-sequential
    restart of the JBAS instances.

--- Additional comment from lkrejci on 2011-11-15 10:05:11 EST ---

master: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=8145ed069b7e2839e7ed29593ed814dfbc2e91ab

release_jon3.x: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=9bbdb09472c5735fb43d8e1a7f2ce4ffd98f1f8f

    [BZ 751246] - do NOT include implicit resources in the list of resource
    group members when determining the group member ids in the script.

--- Additional comment from mfoley on 2011-11-17 11:30:28 EST ---

sample code exists in CLI download .zip in the samples folder.  jon 3 branch.

Comment 1 Deon Ballard 2011-11-23 02:46:54 UTC
Also look at including bug 751248.

Comment 2 Deon Ballard 2012-04-03 15:23:29 UTC
Targeting 3.1.

Comment 3 Filip Brychta 2012-09-07 11:59:07 UTC
Tested on 3.1.1.CR2. Original function 'createAppAndRestartJBAS' from deploy-to-and-restart-JBAS.js wasn't working for eap6. Attaching fixed version.

Comment 4 Filip Brychta 2012-09-07 11:59:50 UTC
Created attachment 610704 [details]
sample script

Comment 5 Deon Ballard 2012-09-12 21:42:14 UTC
I have updated the doc (in my SVN repo only). However, if the sample script itself is not right, then it should be fixed in the CLI install, too. 

I'm assigning this to Lukas, just to check it out.

Comment 6 Lukas Krejci 2013-01-31 17:46:16 UTC
This should be fixed in master branch by BZ 906495.

Comment 7 Larry O'Leary 2013-09-06 14:30:04 UTC
As this is MODIFIED or ON_QA, setting milestone to ER1.

Comment 8 Filip Brychta 2013-11-01 15:07:50 UTC
Verified on
Version: 3.2.0.ER4
Build Number: e413566:057b211


Note You need to log in before you can comment on or make changes to this bug.