Permalink
Browse files

Fix OpenShift instructions, issue #291, developer and doc links.

  • Loading branch information...
1 parent b4bf561 commit 2c772ee45a5c3a018fe13f434d118147aed67780 @sgilda sgilda committed Jul 30, 2012
Showing with 139 additions and 132 deletions.
  1. +5 −5 README.md
  2. +27 −17 helloworld-mdb/README.md
  3. +17 −8 helloworld-rs/README.md
  4. +32 −68 jax-rs-client/README.md
  5. +31 −19 template/README.md
  6. +27 −15 wsat-simple/README.md
View
@@ -246,18 +246,18 @@ You can run these tests using either a remote or managed container. The quicksta
* Find the "jbossHome" property and replace the "/path/to/jboss/as" value with the actual path to your JBoss Enterprise Application Platform 6 or JBoss AS 7 server.
* Run the test goal with the following profile activated:
- For JBoss AS 7 or JBoss Enterprise Application Platform 6 (Maven user settings configured):
-
- mvn clean test -Parq-jbossas-managed
-
For JBoss Enterprise Application Platform 6 (Maven user settings NOT configured):
mvn clean test -Parq-jbossas-managed -s PATH_TO_QUICKSTARTS/example-settings.xml
+ For JBoss AS 7 or JBoss Enterprise Application Platform 6 (Maven user settings configured):
+
+ mvn clean test -Parq-jbossas-managed
+
<a id="useeclipse"></a>
Use JBoss Developer Studio or Eclipse to Run the Quickstarts
-------------------------------------
-You can also deploy the quickstarts from Eclipse using JBoss tools. For more information on how to set up Maven and the JBoss tools, refer to the [JBoss Enterprise Application Platform 6 Development Guide](http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/6/html/Development_Guide/index.html) or [Get Started Developing Applications](http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/guide/Introduction/ "Get Started Developing Applications").
+You can also deploy the quickstarts from Eclipse using JBoss tools. For more information on how to set up Maven and the JBoss tools, refer to the [JBoss Enterprise Application Platform 6 Development Guide](https://access.redhat.com/knowledge/docs/JBoss_Enterprise_Application_Platform/) or [Get Started Developing Applications](http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/guide/Introduction/ "Get Started Developing Applications").
<a id="optionalcomponents"></a>
View
@@ -92,9 +92,6 @@ If you want to debug the source code or look at the Javadocs of any library in t
mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc
-You can also start JBoss AS 7 and deploy the project using Eclipse. See the JBoss AS 7
-[Getting Started Developing Applications Guide](http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/guide/GettingStarted/#_starting_the_jboss_server_from_jbds_or_eclipse_with_jboss_tools)
-for more information.
Build and Deploy the Quickstart - to OpenShift
-------------------------
@@ -105,13 +102,13 @@ If you do not yet have an OpenShift account and domain, [Sign in to OpenShift](h
### Create the OpenShift Application
-Open a shell command prompt and change to a directory of your choice. Enter the following command:
+Open a shell command prompt and change to a directory of your choice. Enter the following command, replacing APPLICATION_TYPE with `jbosseap-6.0` for quickstarts running on JBoss Enterprise Application Platform 6, or `jbossas-7` for quickstarts running on JBoss AS 7:
- rhc app create -a hellworldmdb -t jbossas-7
+ rhc app create -a hellworldmdb -t APPLICATION_TYPE
-_NOTE_: The domain name for this application will be `helloworldmdb-YOUR_DOMAIN_NAME.rhcloud.com`. Here we use the _quickstart_ domain. You will need to replace it with your own OpenShift domain name.
+The domain name for this application will be `helloworldmdb-YOUR_DOMAIN_NAME.rhcloud.com`. Here we use the _quickstart_ domain. You will need to replace it with your own OpenShift domain name.
-This command creates an OpenShift application with the name you entered above and will run the application inside a `jbossas-7` container. You should see some output similar to the following:
+This command creates an OpenShift application called `helloworldmdb` and will run the application inside the `jbosseap-6.0` or `jbossas-7` container. You should see some output similar to the following:
Creating application: helloworldmdb
Now your new domain name is being propagated worldwide (this might take a minute)...
@@ -122,29 +119,35 @@ This command creates an OpenShift application with the name you entered above an
git url: ssh://b92047bdc05e46c980cc3501c3577c1e@helloworldmdb-quickstart.rhcloud.com/~/git/helloworldmdb.git/
Successfully created application: helloworldmdb
-The create command creates a git repository in the current directory with the same name as the application. Notice that the output also reports the URL at which the application can be accessed. Make sure it is available by typing the published url <http://helloworldmdb-quickstart.rhcloud.com/> into a browser or use command line tools such as curl or wget.
+The create command creates a git repository in the current directory with the same name as the application. Notice that the output also reports the URL at which the application can be accessed. Make sure it is available by typing the published url <http://helloworldmdb-quickstart.rhcloud.com/> into a browser or use command line tools such as curl or wget. Be sure to replace the `quickstart` in the URL with your domain name.
+
### Migrate the Quickstart Source
-Now that you have confirmed it is working you can now migrate the quickstart source. You no longer need the default application so change directory into the new git repository and tell git to remove the source files and pom:
+Now that you have confirmed it is working you can migrate the quickstart source. You do not need the generated default application, so navigate to the new git repository directory and tell git to remove the source and pom files:
cd helloworldmdb
git rm -r src pom.xml
-Copy the source for the this quickstart into this new git repository:
+Copy the source for the `helloworld-mdb` quickstart into this new git repository:
cp -r QUICKSTART_HOME/helloworld-mdb/src .
cp QUICKSTART_HOME/helloworld-mdb/pom.xml .
-Now we need enable HornetQ, JBoss AS' messaging provider.
+### Configure the OpenShift Server
-First, add the the messaging extension. Under `<extensions>`, add:
+Next, you must enable HornetQ messaging provider. Open the `.openshift/config/standalone.xml` file (this file may be hidden) in an editor and make the following changes:
- <extension module="org.jboss.as.messaging"/>
+1. If the following extension does not exist, add it under the `<extensions>` element:
-Now, enable MDBs. In the `ejb3` subsytem, un-comment the `mdb` elements.
+ <extension module="org.jboss.as.messaging"/>
+2. If the following `<mdb>` elements are commented out or missing from the the `ejb3` subsytem, un-comment or add them:
-Finally, we need to enable and configure HorentQ. Add this subsystem to `.openshift/config/standalone.xml` under the `<profile>` element:
+ <mdb>
+ <resource-adapter-ref resource-adapter-name="hornetq-ra" />
+ <bean-instance-pool-ref pool-name="mdb-strict-max-pool" />
+ </mdb>
+3. If the messaging subsystem is not already configured under the `<profile>` element, copy the following under the `<profile>` element to enable and configure HornetQ:
<subsystem xmlns='urn:jboss:domain:messaging:1.1'>
<hornetq-server>
@@ -199,6 +202,7 @@ Finally, we need to enable and configure HorentQ. Add this subsystem to `.opensh
</hornetq-server>
</subsystem>
+### Deploy the OpenShift Application
You can now deploy the changes to your OpenShift application using git as follows:
@@ -208,9 +212,11 @@ You can now deploy the changes to your OpenShift application using git as follow
The final push command triggers the OpenShift infrastructure to build and deploy the changes.
-Note that the `openshift` profile in `pom.xml` is activated by OpenShift, and causes the war build by openshift to be copied to the `deployments` directory, and deployed without a context path.
+Note that the `openshift` profile in the `pom.xml` file is activated by OpenShift. This causes the WAR built by OpenShift to be copied to the `deployments` directory and deployed without a context path.
+
+### Test the OpenShift Application
-When the push command returns you can retest the application by getting the following URLs either via a browser or using tools such as curl or wget:
+When the push command returns you can test the application by getting the following URL either via a browser or using tools such as curl or wget. Be sure to replace the `quickstart` in the URL with your domain name.
* <http://helloworldmdb-quickstart.rhcloud.com/>
@@ -236,4 +242,8 @@ You can use the OpenShift command line tools or the OpenShift web console to dis
When you are finished with the application you can destroy it as follows:
rhc app destroy -a helloworldmdb
+
+_Note_: There is a limit to the number of applications you can deploy concurrently to OpenShift. If the `rhc app create` command returns an error indicating you have reached that limit, you must destroy an existing application before you continue.
+* To view the list of your OpenShift applications, type: `rhc domain show`
+* To destroy an application, type the following, substituting the application name you want to destroy: `rhc app destroy -a APPLICATION_NAME_TO_DESTROY`
View
@@ -83,6 +83,7 @@ If you want to debug the source code or look at the Javadocs of any library in t
mvn dependency:resolve -Dclassifier=javadoc
+<a id="openShiftInstructions"></a>
Build and Deploy the Quickstart - to OpenShift
-------------------------
@@ -92,13 +93,13 @@ If you do not yet have an OpenShift account and domain, [Sign in to OpenShift](h
### Create the OpenShift Application
-Open a shell command prompt and change to a directory of your choice. Enter the following command:
+Open a shell command prompt and change to a directory of your choice. Enter the following command, replacing APPLICATION_TYPE with `jbosseap-6.0` for quickstarts running on JBoss Enterprise Application Platform 6, or `jbossas-7` for quickstarts running on JBoss AS 7:
- rhc app create -a helloworldrs -t jbossas-7
+ rhc app create -a helloworldrs -t APPLICATION_TYPE
_NOTE_: The domain name for this application will be `helloworldrs-YOUR_DOMAIN_NAME.rhcloud.com`. Here we use the _quickstart_ domain. You will need to replace it with your own OpenShift domain name.
-This command creates an OpenShift application called `helloworldrs` and will run the application inside a `jbossas-7` container. You should see some output similar to the following:
+This command creates an OpenShift application named `helloworldrs` and will run the application inside the `jbosseap-6.0` or `jbossas-7` container. You should see some output similar to the following:
Creating application: helloworldrs
Now your new domain name is being propagated worldwide (this might take a minute)...
@@ -109,11 +110,11 @@ This command creates an OpenShift application called `helloworldrs` and will run
git url: ssh://b92047bdc05e46c980cc3501c3577c1e@helloworldrs-quickstart.rhcloud.com/~/git/helloworldrs.git/
Successfully created application: helloworldrs
-The create command creates a git repository in the current directory with the same name as the application. Notice that the output also reports the URL at which the application can be accessed. Make sure it is available by typing the published url <http://helloworldrs-quickstart.rhcloud.com/> into a browser or use command line tools such as curl or wget.
+The create command creates a git repository in the current directory with the same name as the application. Notice that the output also reports the URL at which the application can be accessed. Make sure it is available by typing the published url <http://helloworldrs-quickstart.rhcloud.com/> into a browser or use command line tools such as curl or wget. Be sure to replace the `quickstart` in the URL with your domain name.
### Migrate the Quickstart Source
-Now that you have confirmed it is working you can now migrate the quickstart source. You no longer need the default application so change directory into the new git repository and tell git to remove the source files and pom:
+Now that you have confirmed it is working you can migrate the quickstart source. You do not need the generated default application, so navigate to the new git repository directory and tell git to remove the source and pom files:
cd helloworldrs
git rm -r src pom.xml
@@ -123,6 +124,8 @@ Copy the source for the `helloworld-rs` quickstart into this new git repository:
cp -r <quickstarts>/helloworld-rs/src .
cp <quickstarts>/helloworld-rs/pom.xml .
+### Deploy the OpenShift Application
+
You can now deploy the changes to your OpenShift application using git as follows:
git add src pom.xml
@@ -131,9 +134,11 @@ You can now deploy the changes to your OpenShift application using git as follow
The final push command triggers the OpenShift infrastructure to build and deploy the changes.
-Note that the `openshift` profile in `pom.xml` is activated by OpenShift, and causes the war build by openshift to be copied to the `deployments` directory, and deployed without a context path.
+Note that the `openshift` profile in the `pom.xml` file is activated by OpenShift. This causes the WAR built by OpenShift to be copied to the `deployments` directory and deployed without a context path.
+
+### Test the OpenShift Application
-When the push command returns you can retest the application by getting the following URLs either via a browser or using tools such as curl or wget:
+When the push command returns you can test the application by getting the following URLs either via a browser or using tools such as curl or wget. Be sure to replace the `quickstart` in the URL with your domain name.
* <http://helloworldrs-quickstart.rhcloud.com/rest/xml> if you want *xml* or
* <http://helloworldrs-quickstart.rhcloud.com/rest/json> if you want *json*
@@ -142,7 +147,11 @@ You can use the OpenShift command line tools or the OpenShift web console to dis
### Destroy the OpenShift Application
-When you are finished with the application you can destroy it as follows:
+If you plan to test the `jax-rs-client` quickstart on OpenShift, you may want to wait to destroy this application because it is also used by that quickstart for testing. When you are finished with the application you can destroy it as follows:
rhc app destroy -a helloworldrs
+_Note_: There is a limit to the number of applications you can deploy concurrently to OpenShift. If the `rhc app create` command returns an error indicating you have reached that limit, you must destroy an existing application before you continue.
+
+* To view the list of your OpenShift applications, type: `rhc domain show`
+* To destroy an existing application, type the following, substituting the application name you want to destroy: `rhc app destroy -a APPLICATION_NAME_TO_DESTROY`
Oops, something went wrong.

0 comments on commit 2c772ee

Please sign in to comment.