Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Property Name

Description

${groupId}

replaced with the groupId of the application being deployed

${artifactId}

replaced with the artifactId of the application being deployed

${version}

replaced with the version of the application being deployed

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="326b23da7f99d980-90ce554a-4b36492e-94e1b752-739e415dd1d2a4d106631647"><ac:plain-text-body><![CDATA[

${app.[paramName]}

replaced with the parameter value with key 'paramName' of the application being deployed

]]></ac:plain-text-body></ac:structured-macro>

The values for all parameters except 'version' are specified in the Administration -> Stacks -> Application section of moves. The version is selected during the deploy/build workflows by the user who has requested a deploy/build workflow.

Note that in In order to access the MIT repository, you must also have correctly configured SSL access and a Maven username and password that is authorized to view the repository you have configured. See the properties webservices.trustStore, webservices.trustStorePassword, mit.maven.repository.username and mit.maven.repository.password as described in the page Moves Property File settings for details.

Note that when you have configured an app that has at least one release in the MIT repository, you can test repository connectivity by going to Administration -> Stacks and clicking on the 'ping app' icon ( Image Removed) for your app. The resulting page will look like the following:
Image Removed

If your app and repository are configured correctly, versions that exist in Maven should appear on the resulting page. You should be able to click on the download icon ( Image Removed ) for any page and save the application binaries to your hard drive. (Tip: open jar, war or ear files using winzip or any other program that will allow you to verify that the downloaded application is valid.
If you cannot download an application using this test, you will NOT be able to deploy that application using Moves!!!

...

Anchor
Environments
Environments

Environments

Environments are really just a lookup that identifies the function of containers within a stack. The standard environments are 'Production', 'QA', and 'Development'. These are already set up when Moves is deployed, so they will not need to be changed. However, we allow creation of new future environments (for example 'Continuous Integration' or 'Staging'). Note that the property file may need to be edited (and the moves application restarted). See the section 'Oracle Application Server usernames and passwords' in Moves Property File settings.

Anchor
Stacks
Stacks

Stacks

A Stack is simply a grouping of Applications and Containers by Environment. Stacks allow Moves to answer the question 'What is the container for Application 'X' in Environment 'Y'. Once you create a Stack, you can add containers to it for each environment. When we subsequently configure an application, we will tell it what Stack is associated with that application. (So, for example, the application 'OGS Application' might reference 'OGS Stack'. 'OGS Stack' references containers for 'Production', 'QA', and 'Development'). By looking at these relationships, Moves knows which container to deploy to when asked to deploy to a particular environment.

It is better to first configure and test containers before configuring apps. Further it is advisable to have developers release at least one version of an application to the Maven MIT repository. Doing so allows the admin to set up containers and applications for a stack.

Anchor
Containers
Containers

Containers

A container is the service that an application is deployed to. When you configure a new Container, you will be asked to select from one of the container types. The two container types that are currently available are

  • OC4J Container (deploys to Oc4j containers)
  • Mock Container (does nothing, used to test workflows)
    In the future we will implement other containers according to MIT needs (tomcat/weblogic etc).

For the Oc4j container, the deployerUrl must be configured. This is the url you would normally type if you are manually deploying an application using the oracle admin_client.jar utility. Typically you will use a deployerUrl of the form deployer:oc4j:opmn://server-name:port-number/application-name for OAS clusters. You will use a deployerUrl of the form deployer:oc4j:localhostserver-name for OAS standalone instances. The deployment process essentially just runs the admin_client program. Below is the configuration page for containers.

Image Added

Moves will need to know

  1. Where is your oc4j home directory (so it can locate the admin_client.jar program)
  2. What is the deployer url for the cluster (or standalone instance)
  3. What is the username and password to use for the target container

The following checklist should help you successfully configure a container.

  1. Start off by making sure you have network access between the Moves Server and the Container you wish to deploy to. (For non-local deployments you will need the IS&T infrastructure team to complete these steps).
    1. open a shell on the machine where Moves is running.
    2. cd to the ORACLE_HOME folder for this machine (typically /home/oracle/product/10.1.3/j2ee/home)
    3. Wiki Markup
      type *java -jar admin_client.jar \[deployerUrl] \[oc4j-admin-username] \[oc4j-admin-password] -listApplications*. You should see a list of zero or more applications. *You MUST be able to execute this step without getting errors before even bothering returning to Moves!!!* The most common sources of error here are no network 

...

Environments

Environments are really just a lookup that identifies the function of containers within a stack. The standard environments are 'Production', 'QA', and 'Development'. These are already set up when Moves is deployed, so they will not need to be changed. However, we allow creation of new future environments (for example 'Continuous Integration' or 'Staging'). Note that the property file may need to be edited (and the moves application restarted). See the section 'Oracle Application Server usernames and passwords' in Moves Property File settings.

...

Stacks

A Stack is simply a grouping of Applications and Containers by Environment. Stacks allow Moves to answer the question 'What is the container for Application 'X' in Environment 'Y'. Once you create a Stack, you can add containers to it for each environment. When we subsequently configure an application, we will tell it what Stack is associated with that application. (So, for example, the application 'OGS Application' might reference 'OGS Stack'. 'OGS Stack' references containers for 'Production', 'QA', and 'Development'). By looking at these relationships, Moves knows which container to deploy to when asked to deploy to a particular environment.

...

Containers

A container is the service that an application is deployed to. When you configure a new Container, you will be asked to select from one of the container types. The two container types that are currently available are

  • OC4J Container (deploys to Oc4j containers)
  • Mock Container (does nothing, used to test workflows)
    In the future we will implement other containers according to MIT needs (tomcat/weblogic etc).

For the Oc4j container, the deployerUrl must be configured. This is the url you would normally type if you are manually deploying an application using the oracle admin_client.jar utility. Typically you will use a deployerUrl of the form deployer:oc4j:opmn://server-name:port-number/application-name for OAS clusters. You will use a deployerUrl of the form deployer:oc4j:localhostserver-name for OAS standalone instances. The deployment process essentially just runs the admin_client program. Below is the configuration page for containers.

Image Removed

Moves will need to know

  1. Where is your oc4j home directory (so it can locate the admin_client.jar program)
  2. What is the deployer url for the cluster (or standalone instance)
  3. What is the username and password to use for the target container

The following checklist should help you successfully configure a container.

  1. Start off by making sure you have network access between the Moves Server and the Container you wish to deploy to. (For non-local deployments you will need the IS&T infrastructure team to complete these steps).
    1. open a shell on the machine where Moves is running.
    2. cd to the ORACLE_HOME folder for this machine (typically /home/oracle/product/10.1.3/j2ee/home)
    3. Wiki Markup
      type *java -jar admin_client.jar \[deployerUrl] \[oc4j-admin-username] \[oc4j-admin-password] -listApplications*. You should see a list of zero or more applications. *You MUST be able to execute this step without getting errors before even bothering returning to Moves!!!* The most common sources of error here are no network connection (firewall or ipconfig issues), bad usernames/passwords, incorrect deployer urls.
    4. Upon completion of this step, make a note of the deployerUrl, oc4j-admin-username and oc4j-admin-password.
  2. For the environment type that you will be using, verify that the oracle username and password found in the previous step are correctly set up in the properties file. See Moves Property File settings, specifically the section 'Oracle Application Server usernames and passwords'.
  3. On the Administration->Stacks->Container page, make sure the environment type is correctly set, and that the deployerUrl matches the previous step.
  4. Save the container.
  5. Anchor
    ServerTestPage
    ServerTestPage
    Use the Server Test Page! Simply click on the "container ping" icon ( ) for the container you want to test. The page should list the same applications as were listed in the prior step. If the Server Test Page returns an error, go through the steps above again. You will NOT be able to deploy to a container that does not return a successful response on the Server Test Page!

...

Applications represent web apps (.war or .ear applications) that can be deployed to a container. Application configuration is used to

  1. Find released applications in maven
  2. Deploy applications to a container

The following screen shot shows the parameters used for the Template Web Application.

Image Removed

...

Application Parameters explained.

...

The application parameters are used to

  1. find an application version in the MIT maven repository
  2. deploy an application to a container

Let's look at the parameters used to find an application in the MIT maven repository first. When we set up the baseUrl in the Repository configuration section, it was defined as something like /nexus/content/groups/saisGroupRepo/${app.groupId}/${app.artifactId}/${version}/${app.artifactId}-${version}${app.applicationSuffix}. Moves will dynamically replace anything that matches ${app.param name} with the value of the parameter that it finds in the application's configuration.

  1. applicationPrefix - Not used
  2. applicationSuffix - This is usually .war (for war files) or "*.ear" for ear files. Moves will replace {app.applicationSuffix} with this value when creating the actual repository url.
  3. artifactId - The artifactId from the maven pom.xml file for this application.
  4. groupId - The groupId from the maven pom.xml file for this application. any "."s in groupId are replaced with "/"s.

Thus, in our example above, version 1.2.3 of the application would be found in the repository url /nexus/content/groups/saisGroupRepo/edu/mit/ist/es/template/1.2.3/template-123.war

h7. Debugging Application Parameters.
anchor:ApplicationTestPage}

Before configuring an application, obtain the following information from the development team

  1. maven groupId
  2. maven artifactId
  3. application prefix (anything in the war/ear file name that precedes the artifact id)
  4. application suffix (anything in the war/ear file name that follows the 'artifactId'-'version')

You should also request that the development team release at least one version to the MIT Maven repository

You should also plan to have the following information

  1. application name (usually same as artifactId. This is what shows up in OC4J's admin console)
  2. application parent (usually 'default')

Application configuration is used to

  1. Find released applications in maven
  2. Deploy applications to a container

The following screen shot shows the parameters used for the Template Web Application.

Image Added

...

Application Parameters explained.

...

The application parameters are used to

  1. find an application version in the MIT maven repository
  2. deploy an application to a container

Let's look at the parameters used to find an application in the MIT maven repository first. When we set up the baseUrl in the Repository configuration section, it was defined as something like /nexus/content/groups/saisGroupRepo/${app.groupId}/${app.artifactId}/${version}/${app.artifactId}-${version}${app.applicationSuffix}. Moves will dynamically replace anything that matches ${app.param name} with the value of the parameter that it finds in the application's configuration.

  1. applicationPrefix - Not used
  2. applicationSuffix - This is usually .war (for war files) or "*.ear" for ear files. Moves will replace {app.applicationSuffix} with this value when creating the actual repository url.
  3. artifactId - The artifactId from the maven pom.xml file for this application.
  4. groupId - The groupId from the maven pom.xml file for this application. any "."s in groupId are replaced with "/"s.

Thus, in our example above, version 1.2.3 of the application would be found in the repository url /nexus/content/groups/saisGroupRepo/edu/mit/ist/es/template/1.2.3/template-123.war

The parameters contextRoot, deploymentName and parent apply to OC4J deployments only. They do not affect how a release is found in maven.

h7. Debugging Application Parameters that relate to Maven.
anchor:ApplicationTestPage}

Application parameters are complex, because we wish to maintain compatibility across different Maven repository layouts and different containers. Help is at hand, however.
Once you have configured an application, click on the Maven Repository Ping Tool ( Image Added ). See figure below.
If you have followed the instructions above, there should be at least one release in the MIT repository. In Administration -> Stacks click on the 'ping app' icon ( Image Added) for your app. The resulting page will look like the following:
Image Added

If your app and repository are configured correctly, versions that exist in Maven should appear on the resulting page. You should be able to click on the download icon ( Image Added ) for any page and save the application binaries to your hard drive. (Tip: open jar, war or ear files using winzip or any other program that will allow you to verify that the downloaded application is valid. Just 'cos a file gets saved is NOT A SUFFICIENT TEST

If you cannot download an application using this test, you will NOT be able to deploy that application using Moves!!!Application parameters are complex, because we wish to maintain compatibility across different Maven repository layouts and different containers. Although this is complex, help is at hand! To debug your MIT Maven repositories, click on the Maven Repository Ping Tool ( Image Removed ). See figure below.

If you have set up maven correctly, AND if a build exists in Maven for the application you configured, then each version in Maven will show up like in the attached file. Click on the Download Icon ( ) for a version, and the component should be downloaded from the Maven repository. Make sure you open the downloaded file in a program that can read zip files (e.g. winzip). The resulting download should show a folder hierarchy with '.class' files, '.jsp' files etc If this doesn't work, then you should use the following debugging approach

...