Skip to content

Commit

Permalink
Update Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dougrt committed Aug 14, 2015
1 parent 892ae94 commit d41c839
Show file tree
Hide file tree
Showing 4 changed files with 201 additions and 100 deletions.
81 changes: 6 additions & 75 deletions Documentation/Liberty_Instructions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## WebSphere Liberty Setup Instructions
# WebSphere Liberty Setup Instructions

If you have not already done so, read through the [instructions for building the codebase](Build_Instructions.md) first.

Expand All @@ -10,21 +10,12 @@ WebSphere Liberty 8.5.5.6
* Click on the "Download Zip" for the "WAS Liberty with Java EE 7 Web Profile" image
* Review and agree to the license, click the "Accept and download" button and save the resulting "wlp-webProfile7-8.5.5.6.zip" file.

In addition, if you wish to use the WebSphere eXtreme Scale service you will need to install the "WebSphere eXtreme Scale for Developers Liberty Profile" addon.
* Download link: https://www.ibmdw.net/wasdev/downloads/
* Click on the "Download V8.6" image under "WebSphere eXtreme Scale for Developers Liberty Profile"
* Click on the "I confirm" button, review and agree to the license, click the "Download Now" link and save the resulting "wxs-wlp_8.6.0.8.jar" file.

* Install the WebSphere Liberty Profile Developers Runtime file into a directory of your choice
```text
unzip wlp-webProfile7-8.5.5.6.zip
```

* Install the "WebSphere eXtreme Scale for Developers Liberty Profile" file into the same directory as the developers runtime
```text
java -jar wxs-wlp_8.6.0.8.jar
```

* For the rest of these instructions we will assume this to be the WLP_SERVERDIR
Windows:
```text
Expand Down Expand Up @@ -61,72 +52,12 @@ Linux:
cp $ACMEAIR_SRCDIR/acmeair-webapp/build/libs/acmeair-webapp-1.1.0-SNAPSHOT.war $WLP_SERVERDIR/usr/servers/server1/dropins/
```

* Start the WebSphere Liberty server
```text
cd %WLP_SERVERDIR%
bin\server start server1
```


# Using WebSphere eXtreme Scale for the Data Service

## Modify the WebSphere Liberty server configuration file.

* Edit %WLP_SERVERDIR%\usr\servers\server1\server.xml to change the featureManager section to:

```xml
<featureManager>
<feature>webProfile-7.0</feature>
<feature>eXtremeScale.client-1.1</feature>
</featureManager>
```

add the eXtreme Scale bindings
```xml
<xsBindings>
<xsGrid jndiName="wxs/acmeair" gridName="AcmeGrid"/>
</xsBindings>
<xsClientDomain default="dev">
<endpointConfig> dev ; localhost:2809 </endpointConfig>
</xsClientDomain>
```

And add a jndiEntry to indicate the service type to use
```xml
<jndiEntry jndiName="com/acmeair/repository/type" value="wxs"/>
```

## Create a WebSphere eXtreme Scale configuration
* To create a new configuration we will create a copy of the "gettingstarted" configuration and customize it to a configuration and directory called "acmeair"
```text
cd %WXS_SERVERDIR%
xcopy gettingstarted\*.* acmeair\. /s/e/i/v/q
```
* Under %WXS_SERVERDIR%\acmeair, customize the env.bat to include pointers to the classes you have built
* You will find a line with SAMPLE_SERVER_CLASSPATH, modify it as below (ensure these directories and jars exist based on your environment variables)
```text
SET SAMPLE_SERVER_CLASSPATH=%SAMPLE_HOME%\server\bin;%SAMPLE_COMMON_CLASSPATH%;%ACMEAIR_SRCDIR%\acmeair-common\target\classes;%ACMEAIR_SRCDIR%\acmeair-services-wxs\target\classes;%HOMEPATH%\.m2\repository\commons-logging\commons-logging\\1.1.1\commons-logging-1.1.1.jar
## Choose a Data Service
The Acme Air sample application is able to utilize several types of data services.
Choose one of the following -
* [WebSphere eXtreme Scale](Liberty_to_WXS_Instructions.md)
* [MongoDB](Liberty_to_Mongo_Instructions.md)

```
* Next we copy the Acme Air specific eXtreme Scale configuration files from our source directory
```text
cd %WXS_SERVERDIR%\acmeair
copy /y %ACMEAIR_SRCDIR%\acmeair-services-wxs\src\main\resources\deployment.xml server\config\.
copy /y %ACMEAIR_SRCDIR%\acmeair-services-wxs\src\main\resources\objectgrid.xml server\config\.
```

## Now start the Acme Air WebSphere eXtreme Scale configuration catalog server and container server
* In one window start the catalog server
```text
cd %WXS_SERVERDIR%\acmeair
.\runcat.bat
```
* In another window start a single container server
* Ensure that you have set JAVA_HOME and have Java in the path as before
```text
cd %WXS_SERVERDIR%\acmeair
.\runcontainer.bat c0
```


## Start the WebSphere Liberty server
Expand Down
77 changes: 77 additions & 0 deletions Documentation/Liberty_to_Mongo_Instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# WebSphere Liberty to MongoDB Setup Instructions

This document will walk through the steps required to configure the Acme Air sample application and WebSphere Liberty to use MongoDB. These instructions build upon the information from the [WebSphere Liberty instructions document](Liberty_Instructions.md).


## Build the Acme Air codebase to use the morphia service

To communicate with MongoDB, Acme Air uses the [Morphia](http://mongodb.github.io/morphia/) MongoDB driver. Acme Air needs to be built using with this service specified.


```text
./gradlew -Pservice=morphia clean build
```

Further details for building the Acme Air codebase can be found [here](Build_Instructions.md).


## Download the MongoDB Java Driver

Acme Air has been tested with the 2.12.2 version of the mongo-java-driver
* Download link: http://mongodb.github.io/mongo-java-driver/

Copy the mongo-java-driver jar file to a mongodb directory under Liberty's shared resources directory.

Windows:
```text
copy mongo-java-driver-2.12.2.jar %WLP_SERVERDIR%\usr\shared\resources\mongodb\
```

Linux:
```text
cp mongo-java-driver-2.12.2.jar $WLP_SERVERDIR/usr/shared/resources/mongodb/
```

## Modify the WebSphere Liberty server configuration file.

* Edit %WLP_SERVERDIR%\usr\servers\server1\server.xml to change the featureManager section to:

```xml
<featureManager>
<feature>webProfile-7.0</feature>
<feature>mongodb-2.0</feature>
</featureManager>
```


Add the MongoDB driver location, and add the classloader reference

```xml
<library id="mongo-lib">
<file name="${shared.resource.dir}/mongodb/mongo-java-driver-2.12.2.jar" />
</library>

<application id="acmeair-webapp" name="acmeair-webapp" type="war" location="acmeair-webapp-1.1.0-SNAPSHOT.war">
<classloader commonLibraryRef="mongo-lib" />
</application>
```

Add the configuration information so Liberty knows how to connect to MongoDB.
```xml
<mongo id="mongo" libraryRef="mongo-lib" hostNames="localhost" ports="27017"/>
<mongoDB jndiName="mongo/acmeairMongodb" mongoRef="mongo" databaseName="acmeair"/>
```


And add a jndiEntry to indicate the service type to use
```xml
<jndiEntry jndiName="com/acmeair/repository/type" value="morphia"/>
```

## Configure and start MongoDB

See the MongoDB [Manual](http://docs.mongodb.org/manual/) for more information on using MongoDB.

## Start Liberty and Load the database.

Follow the remaining steps in the [WebSphere Liberty instructions document](Liberty_Instructions.md).
118 changes: 118 additions & 0 deletions Documentation/Liberty_to_WXS_Instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# WebSphere Liberty to WebSphere eXtreme Scale Setup Instructions

This document will walk through the steps required to configure the Acme Air sample application and WebSphere Liberty to use WebSphere eXtreme Scale. These instructions build upon the information from the [WebSphere Liberty instructions document](Liberty_Instructions.md).



## Download the following free for developers or trial versions of WebSphere software

In order to use the WebSphere eXtreme Scale service you will need to install the "WebSphere eXtreme Scale for Developers Liberty Profile" addon.
* Download link: https://www.ibmdw.net/wasdev/downloads/
* Click on the "Download V8.6" image under "WebSphere eXtreme Scale for Developers Liberty Profile"
* Click on the "I confirm" button, review and agree to the license, click the "Download Now" link and save the resulting "wxs-wlp_8.6.0.8.jar" file.


* Install the "WebSphere eXtreme Scale for Developers Liberty Profile" file into the same directory as the Liberty runtime
```text
java -jar wxs-wlp_8.6.0.8.jar
```



WebSphere eXtreme Scale 8.6.0.8
* Download link: http://www.ibm.com/developerworks/downloads/ws/wsdg
* Download the trial zip in a file called "extremescaletrial860.zip"
* Unzip this zip into a directory
* For the rest of these instructions we will assume this to be the WXS_SERVERDIR
Windows:
```text
cd \work\java
unzip extremescaletrial860.zip
cd \work\java\ObjectGrid
set WXS_SERVERDIR=C:\work\java\ObjectGrid
```
Linux:
```text
cd ~/work/java
unzip extremescaletrial860.zip
cd ObjectGrid
export WXS_SERVERDIR=~/work/java/ObjectGrid
```



## Build the Acme Air codebase to use the wxs service

To communicate with WebSphere eXtreme Scale, Acme Air needs to be built using the wxs service specified.


```text
./gradlew -Pservice=wxs clean build
```

Further details for building the Acme Air codebase can be found [here](Build_Instructions.md).


## Modify the WebSphere Liberty server configuration file.

* Edit %WLP_SERVERDIR%\usr\servers\server1\server.xml to change the featureManager section to:

```xml
<featureManager>
<feature>webProfile-7.0</feature>
<feature>eXtremeScale.client-1.1</feature>
</featureManager>
```

add the eXtreme Scale bindings
```xml
<xsBindings>
<xsGrid jndiName="wxs/acmeair" gridName="AcmeGrid"/>
</xsBindings>
<xsClientDomain default="dev">
<endpointConfig> dev ; localhost:2809 </endpointConfig>
</xsClientDomain>
```

And add a jndiEntry to indicate the service type to use
```xml
<jndiEntry jndiName="com/acmeair/repository/type" value="wxs"/>
```


## Create a WebSphere eXtreme Scale configuration
* To create a new configuration we will create a copy of the "gettingstarted" configuration and customize it to a configuration and directory called "acmeair"
```text
cd %WXS_SERVERDIR%
xcopy gettingstarted\*.* acmeair\. /s/e/i/v/q
```
* Under %WXS_SERVERDIR%\acmeair, customize the env.bat to include pointers to the classes you have built
* You will find a line with SAMPLE_SERVER_CLASSPATH, modify it as below (ensure these directories and jars exist based on your environment variables)
```text
SET SAMPLE_SERVER_CLASSPATH=%SAMPLE_HOME%\server\bin;%SAMPLE_COMMON_CLASSPATH%;%ACMEAIR_SRCDIR%\acmeair-common\target\classes;%ACMEAIR_SRCDIR%\acmeair-services-wxs\target\classes;%HOMEPATH%\.m2\repository\commons-logging\commons-logging\\1.1.1\commons-logging-1.1.1.jar
```
* Next we copy the Acme Air specific eXtreme Scale configuration files from our source directory
```text
cd %WXS_SERVERDIR%\acmeair
copy /y %ACMEAIR_SRCDIR%\acmeair-services-wxs\src\main\resources\deployment.xml server\config\.
copy /y %ACMEAIR_SRCDIR%\acmeair-services-wxs\src\main\resources\objectgrid.xml server\config\.
```

## Now start the Acme Air WebSphere eXtreme Scale configuration catalog server and container server
* In one window start the catalog server
```text
cd %WXS_SERVERDIR%\acmeair
.\runcat.bat
```
* In another window start a single container server
* Ensure that you have set JAVA_HOME and have Java in the path as before
```text
cd %WXS_SERVERDIR%\acmeair
.\runcontainer.bat c0
```


## Start Liberty and Load the database.

Follow the remaining steps in the [WebSphere Liberty instructions document](Liberty_Instructions.md).
25 changes: 0 additions & 25 deletions MONGO_README.md

This file was deleted.

0 comments on commit d41c839

Please sign in to comment.