2016-04-30 04:39:32 +00:00
2016-04-18 19:28:19 +00:00
[[_openshift]]
2016-05-10 07:20:49 +00:00
== Running {{book.project.name}} Server on OpenShift
2016-04-18 19:28:19 +00:00
2016-05-10 07:20:49 +00:00
{{book.project.name}} provides a OpenShift cartridge to make it easy to get it running on OpenShift.
2016-04-18 19:28:19 +00:00
If you don't already have an account or don't know how to create applications go to https://www.openshift.com/ first.
2016-05-10 07:20:49 +00:00
You can create the {{book.project.name}} instance either with the web tool or the command line tool, both approaches are described below.
2016-04-18 19:28:19 +00:00
2016-05-10 07:20:49 +00:00
WARNING: It's important that immediately after creating a {{book.project.name}} instance you open the `Administration Console` and login to reset the password.
If this is not done anyone can easily gain admin rights to your {{book.project.name}} instance.
2016-04-18 19:28:19 +00:00
2016-05-10 07:20:49 +00:00
=== Create {{book.project.name}} instance with the web tool
2016-04-18 19:28:19 +00:00
. Open https://openshift.redhat.com/app/console/applications and click on `Add Application`.
. Scroll down to the bottom of the page to find the `Code Anything` section.
. Insert `http://cartreflect-claytondev.rhcloud.com/github/keycloak/openshift-keycloak-cartridge` into the `URL to a cartridge definition` field and click on `Next`.
. Fill in the following form and click on `Create Application`.
. Click on `Continue to the application overview page`.
2016-05-10 07:20:49 +00:00
. Under the list of applications you should find your {{book.project.name}} instance and the status should be `Started`.
. Click on it to open the {{book.project.name}} servers homepage.
2016-04-18 19:28:19 +00:00
2016-05-10 07:20:49 +00:00
=== Create {{book.project.name}} instance with the command-line tool
2016-04-18 19:28:19 +00:00
. Run the following command from a terminal:
[source]
----
rhc app create <APPLICATION NAME> http://cartreflect-claytondev.rhcloud.com/github/keycloak/openshift-keycloak-cartridge
----
2016-05-23 07:04:17 +00:00
. Replace `<APPLICATION NAME>` with the name you want (for example {{book.project.name}}).
2016-04-18 19:28:19 +00:00
Once the instance is created the rhc tool outputs details about it.
2016-05-10 07:20:49 +00:00
Open the returned `URL` in a browser to open the {{book.project.name}} servers homepage.
2016-04-18 19:28:19 +00:00
2016-04-21 14:26:04 +00:00
=== Next steps
2016-04-18 19:28:19 +00:00
2016-05-10 07:20:49 +00:00
The {{book.project.name}} servers homepage shows the {{book.project.name}} logo and `Welcome to {{book.project.name}}`.
2016-04-18 19:28:19 +00:00
There is also a link to the `Administration Console`.
Open that and log in using username `admin` and password `admin`.
On the first login you are required to change the password.
2016-05-10 07:20:49 +00:00
TIP: On OpenShift {{book.project.name}} has been configured to only accept requests over https.
2016-04-18 19:28:19 +00:00
If you try to use http you will be redirected to https.