From b25eaa58cb41c34854baf90ed098784a270fe0d6 Mon Sep 17 00:00:00 2001 From: Vineet Reynolds Date: Wed, 12 Nov 2014 05:58:14 +0530 Subject: [PATCH] Additional corrections for creating ePub and PDF files. --- tutorial/OpenShiftDeployment.asciidoc | 28 +++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/tutorial/OpenShiftDeployment.asciidoc b/tutorial/OpenShiftDeployment.asciidoc index cf591db97..0b0ad08cf 100644 --- a/tutorial/OpenShiftDeployment.asciidoc +++ b/tutorial/OpenShiftDeployment.asciidoc @@ -132,9 +132,9 @@ Online and OpenShift Tools, omit the one-time steps as appropriate. === Create an OpenShift Account and Domain -If you do not yet have an OpenShift account and domain, link:browse to OpenShift[https://openshift.com/] to create the account and domain. +If you do not yet have an OpenShift account and domain, https://openshift.com/[browse to OpenShift] to create the account and domain. -link:Get Started with OpenShift[https://openshift.redhat.com/app/getting_started] details how to install the OpenShift Client tools. +https://openshift.redhat.com/app/getting_started[Get Started with OpenShift] details how to install the OpenShift Client tools. === Create the OpenShift Application @@ -142,9 +142,9 @@ link:Get Started with OpenShift[https://openshift.redhat.com/app/getting_started ===================================================================================== The following variables are used in these instructions. Be sure to replace them as follows: -YOUR_DOMAIN_NAME should be replaced with the OpenShift domain name. -APPLICATION_UUID should be replaced with the UUID generated by OpenShift for your application, for example: 52864af85973ca430200006f -TICKETMONSTER_MAVEN_PROJECT_ROOT is the location of the Maven project sources for the TicketMonster application. +* YOUR_DOMAIN_NAME should be replaced with the OpenShift domain name. +* APPLICATION_UUID should be replaced with the UUID generated by OpenShift for your application, for example: 52864af85973ca430200006f +* TICKETMONSTER_MAVEN_PROJECT_ROOT is the location of the Maven project sources for the TicketMonster application. ===================================================================================== Open a shell command prompt and change to a directory of your choice. Enter the following command to create a JBoss EAP 6 application: @@ -162,7 +162,7 @@ This command creates an OpenShift application named ticketmonster and will run t ---- Application Options -------------------- +\------------------- Domain: YOUR_DOMAIN Cartridges: jbosseap-6 (addtl. costs may apply) Gear Size: default @@ -214,7 +214,7 @@ The final push command triggers the OpenShift infrastructure to build and deploy 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. -Now you can see the application running at http://ticketmonster-YOUR_DOMAIN/. +Now you can see the application running at http://ticketmonster-YOUR_DOMAIN.rhcloud.com/. == Using MySQL as the database @@ -248,7 +248,6 @@ export MAVEN_ARGS="clean package -Popenshift,mysql-openshift -DskipTests" ---- + This OpenShift action hook sets up the `MAVEN_ARGS` environment variable used by OpenShift to configure the Maven build process. The exported variable now activates the `mysql-openshift` profile, in addition to the default values originally present in the variable. - . Publish the changes to OpenShift: .. If you are using JBoss Developer Studio, right-click the project, go to *Team*→*Commit...* to commit the changes. Select the `pre_build_jbosseap` file to add to the commit. Choose the *Commit and Push* button during committing, to push the changes to the OpenShift repository. .. If you are using the command line, add the `pre_build_jbosseap` file to the git index, and commit it, and push to the OpenShift repository, as follows: @@ -283,7 +282,7 @@ You can deploy TicketMonster to OpenShift, making use of a 'real' database like [[edit-embedded-cartridge-openshift-for-postgres]] .Edit Embedded Cartidges for an OpenShift application image::gfx/edit-embedded-cartridge-openshift.png[] -+ ++ Select the PostgreSQL 9.2 cartidge, and click *Finish*. + [[add-postgresql-embedded-cartridge]] @@ -291,9 +290,9 @@ Select the PostgreSQL 9.2 cartidge, and click *Finish*. image::gfx/add-postgresql-embedded-cartridge.png[] .. If you are using the command-line, execute the following command, to add the PostgreSQL 9.2 cartridge to the `ticketmonster` application: + ----- +------ rhc cartridge add postgresql-9.2 -a ticketmonster ----- +------ . Configure the OpenShift build process, to use the `postgresql-openshift` profile within the project POM. As you would know, the Maven build on OpenShift uses the `openshift` profile by default - this profile does not contain any instructions or configuration to create a WAR file with the JPA deployment descriptor for MySQL on OpenShift. The `postgresql-openshift` profile contains this configuration. Since it is not activated during the build on OpenShift, we need to instruct OpenShift to use it as well. + To do so, create a file named `pre_build_jbosseap` under the `.openshift/action_hooks` directory located in the git repository of the OpenShift application, with the following contents: @@ -304,17 +303,16 @@ export MAVEN_ARGS="clean package -Popenshift,postgresql-openshift -DskipTests" ---- + This OpenShift action hook sets up the `MAVEN_ARGS` environment variable used by OpenShift to configure the Maven build process. The exported variable now activates the `postgresql-openshift` profile, in addition to the default values originally present in the variable. - . Publish the changes to OpenShift: .. If you are using JBoss Developer Studio, right-click the project, go to *Team*→*Commit...* to commit the changes. Select the `pre_build_jbosseap` file to add to the commit. Choose the *Commit and Push* button during committing, to push the changes to the OpenShift repository. .. If you are using the command line, add the `pre_build_jbosseap` file to the git index, and commit it, and push to the OpenShift repository, as follows: + ----- +------ cd git add .openshift/build_hooks/pre_build_jbosseap -git commit -m "Added pre-build action hook for MySQL" +git commit -m "Added pre-build action hook for PostgreSQL" git push ----- +------ [NOTE] ======