Skip to content

Commit

Permalink
Additional corrections for creating ePub and PDF files.
Browse files Browse the repository at this point in the history
  • Loading branch information
VineetReynolds committed Nov 12, 2014
1 parent 746b371 commit b25eaa5
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions tutorial/OpenShiftDeployment.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,19 @@ 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

[NOTE]
=====================================================================================
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:
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -283,17 +282,17 @@ 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]]
.Add PostgreSQL cartridge
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:
Expand All @@ -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 <TICKET_MONSTER_OPENSHIFT_GIT_REPO>
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]
======
Expand Down

0 comments on commit b25eaa5

Please sign in to comment.