6 Replies Latest reply on Feb 10, 2015 3:50 AM by Sanjay Dhami

    Steps involved in installing ear files

      Share This:

      Hi Team

       

      Please let me know the steps involved in installing .ear files on WebSphere Servers 7.1 ,post  creating the Server Profile?

      It would be help full if get the necessary check points along with the steps involved installing .ear files.

      Thanks in advance.

        • 1. Re: Steps involved in installing ear files
          Kunal Panigrahi

          Hi Suresh,

           

          To use BMA for managing middleware servers, you would need a ServerProfile which will have the connection information to the target and a valid config XML file which can be parsed by BMA and make the corresponding changes on the middleware target to which your ServerProfile is pointing.

           

          Having said that, for installing application files (EAR or WAR) to a WebSphere target you have to take care of the below:

          1. Creation of Config XML file for EAR Deployment

          2. Where is the source EAR file hosted?

          3. And of course the ServerProfile for the target.

          Assumptions taken:

          • The DMGR and NODE profiles are already existing (BMA cannot create a WebSphere profile)
          • The Server/Cluster targets are already created
          • JDBC and JMS resources that the Application needs are already created

          The last to points above can be created using BMA along with Application install but for ease of use case I have made the assumption that they already exist.

           

          In general, the way to create any config file which can be a input for BMA to preview/install on a target is to:

          1. create the artifacts on a development environment using admin console
          2. Take a full/filter snapshot of the same target
          3. Once you have a snapshot you can run config packager to generate a subset of the snapshot file of the desired elements.
          4. Tokenize the config XML file created in step3 above.
          5. Preview/install the tokenized config XML file on a separate target.

           

          Creation of config XML file for EAR Deployment

          You can create the config XML file by following the below methods:

          1. General method that is explained above, just concentrate on the Application element in step3.
          2. BMA CLI - Generating a WebSphere Configuration from an application archive
            Documentation link: https://docs.bmc.com/docs/display/bma85/Generating+a+WebSphere+Configuration+from+an+application+archive

          Where is the source EAR file hosted?

          A BMA snapshot will capture information about the Application but it wont contain the Source EAR file. In the snapshot the under Application element the "Path" and "UploadApplication" attribute determines from where the source EAR file will be picked up.

          If UploadApplication is true then BMA will search for the EAR file on location which the Path attribute is pointing to on the BMA host.

          If UploadApplication is false then BMA will search for the EAR file on location which the Path attribute is pointing to on the target host.

          By default UploadApplication value is set to true which means you have to copy the source EAR file on the BMA host.

          By default the Path attribute is tokenized so that when you preview/install it for the first time, it will prompt you to provide the EAR file location.

           

          Sample snippet of application element with default values:

          ~~

          <Application Path="${ph:DefaultApplication_Path}" UploadApplication="true" description="" displayName="DefaultApplication">

              <AppDeploymentTask Name="AppDeploymentOptions">

                <TaskData>

                  <TaskColumn Name="createMBeansForResources" Value="AppDeploymentOption.No"/>

          ~~

          There are other special attributes but I believe this is the minimum information needed to deploy applications to WebSpphere targets.

           

          Please refer the below documentation link for all the special configuration for WebSphere Application deployment:

          https://docs.bmc.com/docs/display/bma85/Special+Configuration+edits+for+WebSphere+installations

           

          I hope this is helpful.

           

          Regards,

          Kunal

          • 2. Re: Steps involved in installing ear files

            Hi Kunal

             

            A Special thanks for you.

             

            It was really helpfull.

            • 3. Re: Steps involved in installing ear files

              Hi Kunal,

               

              Can we use -mode generateConfiguration to generate configuration out of a WAR file instead of an EAR file?

               

              The link you shared :

               

              https://docs.bmc.com/docs/display/bma85/Generating+a+WebSphere+Configuration+from+an+application+archive

               

              says only about EAR but the following link:

               

              https://docs.bmc.com/docs/display/public/bma85/Running+the+CLI

               

              I tried generateConfiguration to generate config file out of a WAR file and its failed asking for input as an EAR file.

               

              The command I used:

               

              runDeliver.sh -properties /bmc/bma/was70.properties

                  -license /bmc/bma/license.lic -logLevel ERROR -mode generateConfiguration

                  -profile /sr.server

                  -applicationPath /home/testd/hello.war -deployTarget cluster -output /home/testd/hello.war.xml'

               

              Error:

               

              Archive is not a valid EAR File because the deployment descriptor can not be found (case sensitive): META-INF/application.xml

               

              Could you please clarify this as well? Since they are related I didn't create another thread for this.

               

              Thanks,

               

              Ashwin

              • 4. Re: Steps involved in installing ear files
                Kunal Panigrahi

                Hi Ashwin,

                 

                I would request you to open a Support Ticket as I will have to investigate this issue.

                Please provide the below additional information in the ticket:

                1. BMA version with build number.

                2. WAR file

                3. ServerProfile sr.server.

                 

                I will wait for your response.

                 

                Regards,

                Kunal

                • 5. Re: Steps involved in installing ear files

                  Have raised the ticket ISS04425380. But could you please let me know if atleast its possible to generate config from WAR or not?

                  • 6. Re: Steps involved in installing ear files

                    Hello Ashwin,

                     

                    Yes it is possible.

                    Our tool internally generates the EAR file from the WAR and then uses it to generate config.