Versions Compared

Key

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

...

Administering

...

Moves

...

This

...

page

...

focuses

...

on

...

the

...

Administration

...

section

...

of

...

Moves.

...

To

...

see

...

a

...

description

...

of

...

the

...

startup

...

properties

...

required

...

look

...

at

...

Moves

...

Property

...

File

...

settings

...

.

...

The

...

entities

...

that

...

need

...

to

...

be

...

administered

...

for

...

moves

...

are

...

listed

...

below.

...

Table of Contents

In general you should set entities up in the order that they appear above. The entities are described in detail below.

Anchor
Application Release Components
Application Release Components

Application Release Components

...

(aka "Why doesn't my new app show up in the list of apps on the "Build a Release" page?)

...

To get your new app to appear in the drop-down list on the "Build a Release" page, it needs to be added to a pom file in the "maven/releases" project in the sais-sis-common repo. The URL is:

svn+ssh://svn.mit.edu/sais-sis-common/maven/releases/trunk/pom.xml

...

You

...

will

...

need

...

to

...

know:

...

  1. The

...

  1. app's

...

  1. maven

...

  1. group

...

  1. id

...

  1. The

...

  1. app's

...

  1. maven

...

  1. artifact

...

  1. id

...

  1. The

...

  1. URL

...

  1. for

...

  1. the

...

  1. app's

...

  1. trunk

...

  1. in

...

  1. the

...

  1. scm

...

You

...

will

...

add

...

a

...

"releaseComponent"

...

section

...

under

...

the

...

"releaseComponents"

...

section,

...

that

...

will

...

look

...

like

...

this:

{
Code Block
}
<releaseComponent implementation="edu.mit.maven.plugins.release.common.ReleaseComponent">
  <groupId>edu.mit.ist.es.supervasgn</groupId>
  <artifactId>assignsupervisor</artifactId>
  <scm>
    <developerConnection>scm:svn:svn+ssh://svn.mit.edu/sais-sis-academic/academic-supervasgn-web/trunk</developerConnection>
  </scm>
</releaseComponent>
{code}

Check

...

this

...

change

...

in,

...

and

...

the

...

app

...

should

...

now

...

appear

...

in

...

the

...

drop-down

...

list

...

in

...

Moves.

...

Anchor
Repositories
Repositories

Repositories

Repositories are maven repositories, accessible to moves over http/https.

...

An

...

example

...

is

...

the

...

the

...

SAIS

...

Group

...

repository

...

at

...

https://mv-ezproxy-com.ezproxyberklee.flo.org/nexus/content/groups/saisGroupRepo

...

.

...

Maven

...

has

...

a

...

well

...

defined

...

format,

...

which

...

specifies

...

where

...

to

...

find

...

an

...

application

...

within

...

a

...

repository.

...

Each

...

Application

...

has

...

an

...

'ArtifactId',

...

a

...

'GroupId'

...

and

...

a

...

'Version'.

...

So,

...

for

...

example,

...

moves

...

itself

...

has

...

artifactId=sais-moves-web,

...

groupId=edu.mit.ist.es,

...

versionId=2.0.0.

...

Maven

...

will

...

translate

...

this,

...

by

...

default

...

into

...

a

...

final

...

location

...

of

...

https://mv-ezproxy-com.ezproxyberklee.flo.org/nexus/content/groups/saisGroupRepo/edu/mit/ist/es/sais-moves-web/2.0.0/sais-moves-web-2.0.0.war

...

"

...

The

...

properties

...

you

...

need

...

to

...

configure

...

for

...

a

...

repository

...

are:

...

  • server

...

  • (e.g.

...

  • maven.mit.edu)

...

  • port

...

  • (e.g.

...

  • null

...

  • -

...

  • if

...

  • port

...

  • is

...

  • null,

...

  • moves

...

  • uses

...

  • the

...

  • default

...

  • port

...

  • for

...

  • the

...

  • protocol

...

  • supplied)

...

  • protocol

...

  • (e.g.

...

  • https)

...

  • base

...

  • url

...

  • (e.g.

...

  • /nexus/content/groups/saisGroupRepo)

...

The

...

base

...

url

...

can

...

contain

...

the

...

following

...

replacement

...

properties.

...

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

...

$

...

{app.

...

[paramName

...

]}

...

replaced

...

with

...

the

...

parameter

...

value

...

with

...

key

...

'paramName'

...

of

...

the

...

application

...

being

...

deployed

...

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.

...

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.

...

Anchor
Environments
Environments

Environments

Environments are really just a lookup that identifies the function of containers within a stack. The standard environments are 'Production' and 'Test'. These should be automatically set up when Moves is deployed for the first time, 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

...

    1. )

...

    1. type

...

    1. java

...

    1. -jar

...

    1. admin_client.jar

...

    1. [deployerUrl

...

    1. ]

...

    1. [oc4j-admin-username

...

    1. ]

...

    1. [oc4j-admin-password

...

    1. ]

...

    1. -listApplications

...

    1. .

...

    1. You

...

    1. should

...

    1. see

...

    1. a

...

    1. list

...

    1. of

...

    1. zero

...

    1. or

...

    1. more

...

    1. applications.

...

    1. You

...

    1. MUST

...

    1. be

...

    1. able

...

    1. to

...

    1. execute

...

    1. this

...

    1. step

...

    1. without

...

    1. getting

...

    1. errors

...

    1. before

...

    1. even

...

    1. bothering

...

    1. returning

...

    1. to

...

    1. Moves

...

    1. !

...

    1. !

...

    1. !

...

    1. The

...

    1. most

...

    1. common

...

    1. sources

...

    1. of

...

    1. error

...

    1. here

...

    1. are

...

    1. no

...

    1. network

...

    1. connection

...

    1. (firewall

...

    1. or

...

    1. ipconfig

...

    1. issues),

...

    1. bad

...

    1. usernames/passwords,

...

    1. incorrect

...

    1. deployer

...

    1. urls.

...

    1. Upon

...

    1. completion

...

    1. of

...

    1. this

...

    1. step,

...

    1. make

...

    1. a

...

    1. note

...

    1. of

...

    1. the

...

    1. deployerUrl,

...

    1. oc4j-admin-username

...

    1. and

...

    1. oc4j-admin-password.

...

  1. For

...

  1. the

...

  1. environment

...

  1. type

...

  1. that

...

  1. you

...

  1. will

...

  1. be

...

  1. using,

...

  1. verify

...

  1. that

...

  1. the

...

  1. oracle

...

  1. username

...

  1. and

...

  1. password

...

  1. found

...

  1. in

...

  1. the

...

  1. previous

...

  1. step

...

  1. are

...

  1. correctly

...

  1. set

...

  1. up

...

  1. in

...

  1. the

...

  1. properties

...

  1. file.

...

  1. See

...

  1. Moves

...

  1. Property

...

  1. File

...

  1. settings

...

  1. ,

...

  1. specifically

...

  1. the

...

  1. section

...

  1. 'Oracle

...

  1. Application

...

  1. Server

...

  1. usernames

...

  1. and

...

  1. passwords'.

...

  1. On

...

  1. the

...

  1. Administration->Stacks->Container

...

  1. page,

...

  1. make

...

  1. sure

...

  1. the

...

  1. environment

...

  1. type

...

  1. is

...

  1. correctly

...

  1. set,

...

  1. and

...

  1. that

...

  1. the

...

  1. deployerUrl

...

  1. matches

...

  1. the

...

  1. previous

...

  1. step.

...

  1. Save

...

  1. the

...

  1. container.

...

  1. Anchor
    ServerTestPage
    ServerTestPage
    Use the Server Test Page! Simply click on the "container ping" icon ( Image Added ) 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!

Anchor
Applications
Applications

Applications

Applications represent web apps (.war or .ear applications) that can be deployed to a container. 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

...

  1. name

...

  1. (usually

...

  1. same

...

  1. as

...

  1. artifactId.

...

  1. This

...

  1. is

...

  1. what

...

  1. shows

...

  1. up

...

  1. in

...

  1. OC4J's

...

  1. admin

...

  1. console)

...

  1. application

...

  1. parent

...

  1. (usually

...

  1. 'default')

...

Application

...

configuration

...

is

...

used

...

to

...

  1. Find

...

  1. released

...

  1. applications

...

  1. in

...

  1. 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"

...

  1. for

...

  1. ear

...

  1. files.

...

  1. Moves

...

  1. will

...

  1. replace

...

  1. {app.applicationSuffix}

...

  1. with

...

  1. this

...

  1. value

...

  1. when

...

  1. creating

...

  1. the

...

  1. actual

...

  1. repository

...

  1. url.

...

  1. artifactId - The artifactId from the maven pom.xml

...

  1. file

...

  1. for

...

  1. this

...

  1. application.

...

  1. groupId - The groupId from the maven pom.xml

...

  1. file

...

  1. for

...

  1. this

...

  1. application.

...

  1. any

...

  1. "."s

...

  1. in

...

  1. groupId

...

  1. are

...

  1. replaced

...

  1. with

...

  1. "/"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!!!

Image Added

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 ( Image Added ) 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

  1. IF NO applications can be pinged, check that you can connect to Maven using a web browser. Use the version URL defined in the container ping page. If you get a 404
    1. Use the username and password defined in the Moves properties file (see Moves Property File settings).
    2. Use the hostname defined in the Administration -> Repository page.
  2. Check that you do not see java SSL exceptions in the log, or in the container ping page. (These can be cryptic to read). If you suspect SSL exceptions, make sure that the Moves Trust Store is properly configured (see Moves Property File settings).
  3. Check that the Repository Location urls do not give 404 errors when you click on them.

Once you have verified that a build exists in the MIT Maven repository for this application, then you MUST be able to download a version using the Download Icon ( Image Added ). If you can't download a version and open it in winzip (or other archive program), Moves will certainly not be able to deploy the application.

Anchor
BuildConfiguration
BuildConfiguration

Build Configuration

The Build Configuration allows you to configure certain aspects of Moves without restarting the server.

Anchor
BuildConfiguration-Maven
BuildConfiguration-Maven

Build Configuration - Maven

This page allows you to define

  1. Where maven is located on the system
  2. Whether to include verbose logging in builds (This should really be moved to the build workflow)
  3. Where build artifacts are stored
  4. How long a build should take before we kill it.
  5. Where the mit maven repository is located (This is duplicated in Admin ->Repositories because the setup for Moves and Maven is quite different)
  6. The maven goal for releasing an app. This is fully qualified, and contains the groupId, artifactId and version of the plugin. This allows us to "upgrade" the plugin when it has been adequately tested). An example is edu.mit.maven.plugins:mit-release-plugin:1.2.3:release.

...

  1. Usually

...

  1. only

...

  1. the

...

  1. version

...

  1. number

...

  1. will

...

  1. change

...

  1. (in

...

  1. this

...

  1. example

...

  1. the

...

  1. version

...

  1. is

...

  1. 1.2.3).

...

  1. The

...

  1. maven

...

  1. goal

...

  1. for

...

  1. populating

...

  1. build

...

  1. drop

...

  1. downs.

...

  1. This

...

  1. is

...

  1. fully

...

  1. qualified,

...

  1. and

...

  1. contains

...

  1. the

...

  1. groupId,

...

  1. artifactId

...

  1. and

...

  1. version

...

  1. of

...

  1. the

...

  1. plugin.

...

  1. This

...

  1. allows

...

  1. us

...

  1. to

...

  1. "upgrade"

...

  1. the

...

  1. plugin

...

  1. when

...

  1. it

...

  1. has

...

  1. been

...

  1. adequately

...

  1. tested).

...

  1. An

...

  1. example

...

  1. is

...

  1. edu.mit.maven.plugins:mit-release-plugin:1.2.3:info.

...

  1. Usually

...

  1. only

...

  1. the

...

  1. version

...

  1. number

...

  1. will

...

  1. change

...

  1. (in

...

  1. this

...

  1. example

...

  1. the

...

  1. version

...

  1. is

...

  1. 1.2.3).

...

  1. Maven

...

  1. System

...

  1. Properties.

...

  1. These

...

  1. are

...

  1. passed

...

  1. as

...

  1. -D

...

  1. [propertName

...

  1. ]=

...

  1. [propertyValue

...

  1. ]

...

  1. parameters

...

  1. to

...

  1. Maven.

...

  1. For

...

  1. MIT

...

  1. we

...

  1. need

...

  1. to

...

  1. provide

...

  1. correct

...

  1. values

...

  1. for

...

  1. the

...

  1. java

...

  1. system

...

  1. properties

...

  1. javax.net.ssl.trustStore

...

  1. and

...

  1. javax.net.ssl.trustStorePassword

...

  1. Maven

...

  1. System

...

  1. Properties.

...

  1. These

...

  1. are

...

  1. used

...

  1. to

...

  1. set

...

  1. up

...

  1. the

...

  1. shell

...

  1. environment

...

  1. that

...

  1. Maven

...

  1. runs

...

  1. in.

...

  1. Typically

...

  1. this

...

  1. means

...

  1. correctly

...

  1. setting

...

  1. MAVEN_OPTS,

...

  1. JAVA_HOME,

...

  1. M2_HOME,

...

  1. PATH,

...

  1. and

...

  1. the

...

  1. subversion

...

  1. environment

...

  1. variable

...

  1. SVN_SSH.

...

  1. SVN_SSH

...

  1. is

...

  1. used

...

  1. to

...

  1. tell

...

  1. subversion

...

  1. where

...

  1. the

...

  1. public

...

  1. key

...

  1. is

...

  1. to

...

  1. connect

...

  1. over

...

  1. SSH

...

  1. without

...

  1. prompting

...

  1. for

...

  1. a

...

  1. password.

...


  1. javax.net.ssl.trustStore

...

  1. and

...

  1. javax.net.ssl.trustStorePassword

...

Image Added

Anchor
BuildConfiguration-Subversion
BuildConfiguration-Subversion

Build Configuration - Subversion

In the subversion config page, we just need to tell moves

  1. What is the command for svn
  2. Where the public key is that allows us to connect via the SVN+SSH protocol without a password prompt (this is done by specifying the SVN_SSH environment variable
  3. Where the MIT releases project lives. The MIT releases project is maintained by developers and acts as a directory. This directory defines
    1. What apps can be BUILT using moves
    2. Where that project's Subversion trunk lives.

Image Added

Anchor
BuildConfiguration-OC4j
BuildConfiguration-OC4j

Build Configuration - OC4J

The OC4J Home folder tells us where to find admin_client.jar.

Image Added

Anchor
RemovingArtifacts
RemovingArtifacts

Removing Artifacts

TODO: removing artifacts is not implemented through the UI yet.
A utility exists within the Moves Application for deleting old Log and File entries. Simply select a date and click submit. Artifacts/Logs older than this date will be removed.