5 Replies Latest reply on Jan 20, 2012 12:32 PM by Gerhard Drasch-Oracle

    Using AID remotely

    Mathias Wiberg

      I've been investigating using the AID remotely. What I would like todo is to run it on a different server (CI-server such as Hudson) and then have everything deploy to the domain. But after investigating the AID, it looks like there are some problems with this procedure. A overview what the AID does is something like this:

      Is this a new Application?
      1. YES
      1.1 Add namespaces to ADF Config:
       ant -f deploymentTasks.xml addNamespaceToADFConfig -DfilePath=${AIA_HOME}/aia_instances/ISB/config/MDSConfig/.adf/META-INF -DnamespacePaths=""
      1.2. Add integrations to AIAInstallProperties:
       ant -f deploymentTasks.xml addIntegrationsToAIAInstallProperties -DfilePath=${AIA_HOME}/aia_instances/ISB/config -DprojecCodes="" 
      1.3. Encrypt the passwords:
       ant -f createStore.xml generate -DPropertiesFile=%AIA_INSTANCE%\config\AIAInstallProperties.xml 
      <font color="red">This will encrypt the already encrypted passwords, so a fix here is to use a backup AIAInstallProperties that has clear text passwords and at the integrations there, and then generate the passwords</font>

      2. NO
       ant -f ${AIA_HOME}/Infrastructure/Install/AID/AIAInstallDriver.xml .... 
      2.2. PreInstallScripts (For example, Publish to OER)
      2.2.1. MainDeploymentPlan (or ConditionalDeploymentPlanFile)
      2.2.2. SupplementaryDeploymentPlan
      2.2.3. CustomDeploymentPlan
      2.3 Configurations (For example, setting target server)
      2.3.1. MainDeploymentPlan (or ConditionalDeploymentPlanFile)
      2.3.2. SupplementaryDeploymentPlan
      2.3.3. CustomDeploymentPlan
      2.4 Deployments (Deploy)
      2.4.1. MainDeploymentPlan (or ConditionalDeploymentPlanFile) ValidateSOAServerDetails - Validate that all properties are set before deployment EndpointConfigurator - Regexp replace endpoints in the composite folder AIAConfigurationPlan > (or cfgplan.xml) SCA-Package SCA-Deploy XSLMerge: AIAServiceConfigurationProperties - This needs to be update do resolve a bug when "force=true" creates duplicates and doesn't overwrite UpdateMetaData - Be careful, because this uploads MDS based on directories and not on the actual files used AIASecurityConfigurationProperties - If you want to use local policies
      2.4.2 SupplementaryDeploymentPlan
      2.4.3 CustomDeploymentPlan
      2.5. PostInstallScripts
      2.5.1. MainDeploymentPlan (or ConditionalDeploymentPlanFile)
      2.5.2. SupplementaryDeploymentPlan
      2.5.3. CustomDeploymentPlan

      Basically, that is what the AID does for us when we use it to deploy composites. The problem I see here is that, in step 1.1; 1.2; 1.3 and we are writing to a file on the AIA-installation, i.e. we need to access that file somehow. Most of the other things can be used remote (because it uses WLST or something similar).

      Ive come up with some different solutions how to work around this, but none of them are really "good".

      1. From Hudson, use SCP to copy the files from the server to the CI-server, run the script on the files and SCP them back to the server. This requires that we have access SCP access to the server - not always an option for quality assurance environment or production.
      2. From Hudson, use SSH to login to the machine and execute everything there. This requires that we have SSH access to the server - not always an option for quality assurance environment or production.
      3. Use some kind of shared folders (NFS/Samba) for the files needed - This requires NFS/Samba to be installed, and to have access rights there - not always an option for quality assurance environment or production.
      4. Use some kind of repository (Subversion, ClearCase etc.) to store the files that needs to be updated. Do a checkout and update the files on the CI-server, and check them in. Invoke an update on the target server. This requires something like SSH access, if you don't use something like dynamic view in ClearCase which updates automatically).

      So, what are your thoughts about this? Is there a way to use the AID remotely? Perhaps send (update) AIAInstallProperties.xml and AIAConfigurationProperties.xml by using WLST or something similar?

      Thank you,

      Edited by: user8784366 on Jan 17, 2012 8:53 AM
        • 1. Re: Using AID remotely
          Hi Mathias,

          As far as I understand your requirement you wish to deploy on a domain which may be on a remote system. Does this mean you wish to have your AIA Home on one machine and deploy to another. If this is the type of install/deployment you are looking at then that is supported OOTB by AID. Just ensure that all your Applications and Composites are accessible from the file system where AID resides and you are able to connect to the domain using http and t3. In your AIAInstallProperties.xml file, ensure your remoteInstall tag is set as true. Please elaborate your requirement in case I have misunderstood them.

          • 2. Re: Using AID remotely
            Mathias Wiberg

            Thank you for your reply. No, I would rather not have AIA home on the build server at all (except for the ant-scripts along some jars). Think of how the ant-sca deployer works - where you only need the ant-script on a computer to build and deploy to another remote computer. But, with AID, it changes files locally and it requires that AII home is installed on locally. This is what i'm trying to solve, to be able to extract the AID to a clean server, run the script, and deploy to another machine (which has the domain, AIA home etc. setup). My problems are the two files that are changed locally:

            * AIAInstallProperties.xml
            * AIAServiceConfigurationProperties.xml

            I could, just SCP them over from the remote machine, do the changes, and then SCP them back. This would work, but i'm hopeing there is some WLST-functioanlly that i'm misisng where I can do this without using SCP.

            Do you understand my problem better now?

            Thank you,
            Best regards,
            • 3. Re: Using AID remotely
              Gerhard Drasch-Oracle
              Copying AIAInstallProperties.xml and AIAServiceConfigurationProperties.xml to the server won't be sufficient anyway. The point is not to have these files on the server, but you need to have them in the MDS (AIAServiceConfigurationProperties.xml) that is associated with a particular SOA/AIA server or where AID is executed (AIAInstallProperties.xml).

              In that respect, AIAInstallProperties.xml is no different from other shared meta data such as schemas and wsdl's.

              What you would need are copies of these files on your deployment box for each environment you want to deploy to. Then you need to make sure to pick the right ones per deployment.

              This is certainly not exactly the purpose AID was designed for (and not supported on a side note), but I am sure you could get that to work.

              • 4. Re: Using AID remotely
                Mathias Wiberg
                Hi Gerhard,

                Thank you for your answer.
                Yes, I agree that after merging the AIAServiceConfigurationProperties.xml with the AIAConfigurationProperties.xml, it (AIAConfigurationProperties.xml) should be sent and updated in the MDS, which can be done through ant.

                But, you mean that AIAInstallProperties.xml isn't required by AIA, but only AID? For me, it looks like it is only used as a kinda lookup for deployment. For example, when you try to deploy your PIP with AID, it references the AIAInstallProperties.xml and uses the (server) settings present in /properties/pips/[NameOfPip]. But I wasn't sure it wasn't used by anything else then AID.

                Thank you,
                • 5. Re: Using AID remotely
                  Gerhard Drasch-Oracle
                  the AIAInstallationProperties.xml is mostly used by AID. You still want to include it in your MDS updates since its data is also taken into account on the 'About AIA' page, but has no further run-time relevance.

                  The other thing I would highly recommend is to make sure that the particular AIA homes on each server remain consistent so that you could deploy from there as well if required. And that would finally include copying the mentioned files on the OS level, otherwise you could run into inconsistencies once you deploy something from there.