Pages

Sunday, February 20, 2011

Do your SOA deployments & configuration with AIA

One of the Application Integration Architecture (AIA) hidden gems is the SOA Suite / FMW deployment framework. This ANT framework can (un)deploy your WARS, SOA Composites, MDS, create JDBC Datasources & JMS Resources like Queues, Topics, Connection Factories , Deploy AQ, JMS, DB Resource Adapters and restart your WebLogic Server and can even do more things like update your WSDL. create users etc.

Before you install AIA you should know this is not license free, but this can save you a lot of money and helps you to reduce the human factor in your deployments.

This deployment framework is part of a bigger AIA plan and is based on Oracle Best practices, but this can also be used for environments where they don't work with AIA.

To use this deployment framework you should have a running SOA Suite & installed AIA on a machine. For installation instructions see my Whitehorses blog.

And here is the official documentation of this deployment framework.

The first step is to add your WebLogic ( SOA Suite ) Server and Database connections details to the AIAInstallProperties.xml file, this located in your AIA instance folder, in my case (
C:\oracle\AIAPS3\aia_instances\AIAInst1\config ).

Add your Database connections under /properties/participatingapplications/AIAEmployeeSync/db
AIAEmployeeSync is my demo application.

Add your WebLogic connections under /properties/pips/AIAEmployeeSync/server

In my case the password are already encrypted, but you need to encrypt them again. So set the isencrypted element to false and replace the encrypted password with their plain text values.
Now you can run a utility to encrypt it again.
open a command windows
cd C:\oracle\AIAPS3\util
c:\oracle\AIAPS3\aia_instances\AIAInst1\bin\aiaenv.bat
ant -f createStore.xml generate -DPropertiesFile=%AIA_INSTANCE%\config\AIAInstallProperties.xml

This will encrypt all the password fields.

Now we can take a look at the deployment plan. Here you see for example the scott Datasource which we just configured in the AIAInstallProperties xml file and it has also a reference to the WebLogic server where it needs to deployed to. With ManagedServer you can reboot the WebLogic server and UpdateMetadata does the necessary MDS updates.

You can also make an undeployment plan. This is nice because you can re-test the whole deployment on your test or acceptance server.

I made a handy start script to start this deployment

Also for the undeploy

We are reading to start the deployment.
open a command window and go the location of your ANT xml's
cd C:\projecten\workspace\11g_prod\AIAEmployeeSyncPS3\config
C:\oracle\AIAPS3\aia_instances\AIAInst1\bin\aiaenv.bat
ant -f deployEmployeeSync.xml


And if everything is Ok you should have everything installed & deployed, but you can always check your deployment log for errors.

When you look for your Resource Adapter definitions then you should look for AIA_XXX

But you can't change the EIS Connections because these are generated, so you need to do this with this AIA deployment framework.

The End

16 comments:

  1. Hi Edwin ,

    Could you please let me know if i can invoke a DBAdapter asynchronously . i am assuming that the DBAdapter always gets invoked synchronously.

    A legacy system written in PL/SQL procedures written to process huge chunk of data ( kind of adapter which processes more than 2000 files each invoke updates some tables , which takes around 6 hrs to complete ). and we are trying to invoke those pl/sql procedures to integrate the system with SOA(11G).

    We have developed a BPEL communicating to DB through DBadapter ( invokes the required PL/SQL procedures ).

    All BPELs used are asynchronous processes . wanted to know how the DB Adapter works . is it a good practice to make the BPEL wait for the pl/sql procedure to return (Though BPEL process is a Asynchronous one) .

    Please advice me on this .

    ReplyDelete
  2. Hi

    You can do it on many ways, like put the request in aq and a db job read the queu and start the plsql procedure. But there is always something waiting for this plsql procedure.

    Bpel is a good way because it has state and the SOA suite automatically put it in the dehrydation database , even with many instances is no problem for bpel. Maybe you only need to tune the repos database.

    Thanks

    ReplyDelete
  3. Hi,
    Can AIAInstallDrver.xml be used for deploying SARs/ZIP? The requirement is to deploy usng ZIPs instead of complete composites?
    I can thnk of using SOA Suite's way of doing this.. using sca-deploy ANT script.
    Can you please suggest the correct way of doing this in AIA?

    Thanks.

    ReplyDelete
    Replies
    1. Hi,

      Do you need to use AIA else use this
      http://biemond.blogspot.com/2009/09/deploy-soa-suite-11g-composite.html

      this does it with sca-deploy and the code is on github.com

      thanks

      Delete
  4. Edwin,

    I am using AIA foundation pack for development of custom PIPs. How can we change the location on reference WSDLs in composite.xml using AID. During a normal deployment this can be done using a configuration plan.

    ReplyDelete
    Replies
    1. Hi,

      These are located in the AIAServiceConfigurationProperties.xml file and are located in the MDS and loaded dynamically in the BPEL ABCS.

      you can change this file and upload to the MDS

      Delete
  5. Hey there Edwin, I have been working with AID to do our deployments and looking at extensibility. Right now the only concern I can see is the way it handles Adapter changes where it does a full undeploy and redeploy. Typically we are careful to do "Update in place" with the Adapter deployment plans to avoid disruption of running services. Any thoughts on how we could work around this issue?

    ReplyDelete
    Replies
    1. Hi,

      The power is that you need to do it repeatedly, on many environments, get some confidence in the process, automate your tests and then it is not a problem anymore.

      thanks

      Delete
  6. Hi Edwin,

    Is there any Process in AIA Standard (Deployment Script -AIA/OSB)
    Configured as One time Running Script.
    Can you help me out this.....

    ReplyDelete
    Replies
    1. Hi,

      Don't think so, it is uninstall and then re-install. The process should be repeatable.

      thanks

      Delete
  7. This comment has been removed by the author.

    ReplyDelete
  8. Hi Edwin,

    I am trying to configure this for AIA 11.1.1.6.0.

    ant -f createStore.xml generate -DPropertiesFile=$AIA_INSTANCE/config/AIAInstallProperties.xml

    I have already got some encrypted passwords in the xml file and I want to encrypt only the new entries I just added.

    If I set isencrypted = false will that corrupt the existing encrypted passwords?

    I have one more question, how do you use property value replacement in codes (composite.xml, wsdl etc.) do those need to be in AIAInstallProperties.xml?

    Thanks in advance,

    Susmit

    ReplyDelete
    Replies
    1. Hi,

      just make a backup for the encrypted passwords and merge it with the original.
      Don't know exactly, it has been a long time ago. Sorry

      Thanks

      Delete
  9. How does the deployment script pick the right environment for deployment?

    ReplyDelete
    Replies
    1. Hi,

      by pointing to the right aia instance , this contains all the servers with its passwords.

      Thanks

      Delete
  10. This comment has been removed by the author.

    ReplyDelete