You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -167,7 +167,7 @@ If you don't see the page, check the logs that are output to your server to debu
167
167
168
168
=== Configuring the Application for {product-title}
169
169
170
-
In order to have your application communicating with the PostgreSQL database service that will be running in {product-title}, you will need to edit the `default` section in your `config/database.yml` to use link:../../using_images/db_images/postgresql.html#environment-variables[environment variables], which you will define later, upon the database service creation.
170
+
In order to have your application communicating with the PostgreSQL database service that will be running in {product-title}, you will need to edit the `default` section in your `config/database.yml` to use xref:../../using_images/db_images/postgresql.adoc#postgresql-environment-variables[environment variables], which you will define later, upon the database service creation.
171
171
172
172
The `default` section in your edited `config/database.yml` together with pre-defined variables should look like:
173
173
@@ -180,7 +180,7 @@ default: &default
180
180
adapter: postgresql
181
181
encoding: unicode
182
182
# For details on connection pooling, see rails configuration guide
After creating the the `rails-app` link:../projects.html[project], you will be automatically switched to the new project namespace.
251
+
After creating the the `rails-app` xref:../projects.adoc#dev-guide-projects[project], you will be automatically switched to the new project namespace.
252
252
253
253
Deploying your application in {product-title} involves three steps:
254
254
255
-
* Creating a database link:../../architecture/core_concepts/pods_and_services.html#services[service] from {product-title}'s link:../../using_images/db_images/postgresql.html[PostgreSQL image]
256
-
* Creating a frontend link:../../architecture/core_concepts/pods_and_services.html#services[service] from {product-title}'s link:../../using_images/s2i_images/ruby.html[Ruby 2.0 builder image] and your Ruby on Rails source code, which we wire with the database service
255
+
* Creating a database xref:../../architecture/core_concepts/pods_and_services.adoc#services[service] from {product-title}'s xref:../../using_images/db_images/postgresql.adoc#using-images-db-images-postgresql[PostgreSQL image]
256
+
* Creating a frontend xref:../../architecture/core_concepts/pods_and_services.adoc#services[service] from {product-title}'s xref:../../using_images/s2i_images/ruby.adoc#using-images-s2i-images-ruby[Ruby 2.0 builder image] and your Ruby on Rails source code, which we wire with the database service
257
257
* Creating a route for your application.
258
258
259
259
[[creating-the-database-service]]
260
260
=== Creating the Database Service
261
261
262
-
Your Rails application expects a running database link:../../architecture/core_concepts/pods_and_services.html#services[service]. For this service use link:http://www.postgresql.org/[PostgeSQL] database link:../../using_images/db_images/postgresql.html[image].
262
+
Your Rails application expects a running database xref:../../architecture/core_concepts/pods_and_services.adoc#services[service]. For this service use link:http://www.postgresql.org/[PostgeSQL] database xref:../../using_images/db_images/postgresql.adoc#using-images-db-images-postgresql[image].
263
263
264
-
To create the database link:../../architecture/core_concepts/pods_and_services.html#services[service] you will use the link:../new_app.html[oc new-app] command. To this command you will need to pass some necessary link:../../using_images/db_images/postgresql.html#environment-variables[environment variables] which will be used inside the database container. These link:../../using_images/db_images/postgresql.html#environment-variables[environment variables] are required to set the username, password, and name of the database. You can change the values of these link:../../using_images/db_images/postgresql.html#environment-variables[environment variables] to anything you would like. The variables we are going to be setting are as follows:
264
+
To create the database xref:../../architecture/core_concepts/pods_and_services.adoc#services[service] you will use the xref:../new_app.adoc#dev-guide-new-app[oc new-app] command. To this command you will need to pass some necessary xref:../../using_images/db_images/postgresql.adoc#environment-variables[environment variables] which will be used inside the database container. These xref:../../using_images/db_images/postgresql.adoc#environment-variables[environment variables] are required to set the username, password, and name of the database. You can change the values of these xref:../../using_images/db_images/postgresql.adoc#environment-variables[environment variables] to anything you would like. The variables we are going to be setting are as follows:
265
265
266
266
* POSTGRESQL_DATABASE
267
267
* POSTGRESQL_USER
@@ -293,15 +293,15 @@ $ oc get pods --watch
293
293
294
294
=== Creating the Frontend Service
295
295
296
-
To bring your application to {product-title}, you need to specify a repository in which your application lives, using once again the link:../new_app.html[oc new-app] command, in which you will need to specify database related link:../../using_images/db_images/postgresql.html#environment-variables[environment variables] we setup in the link:./ruby_on_rails.html#creating-the-database-service[Creating the Database Service]:
296
+
To bring your application to {product-title}, you need to specify a repository in which your application lives, using once again the xref:../new_app.adoc#dev-guide-new-app[oc new-app] command, in which you will need to specify database related xref:../../using_images/db_images/postgresql.adoc#environment-variables[environment variables] we setup in the xref:./ruby_on_rails.adoc#creating-the-database-service[Creating the Database Service]:
With this command, {product-title} fetches the source code, sets up the Builder image, link:../builds.html[builds] your application image, and deploys the newly created image together with the specified link:../../using_images/db_images/postgresql.html#environment-variables[environment variables]. The application is named `rails-app`.
302
+
With this command, {product-title} fetches the source code, sets up the Builder image, xref:../builds.adoc#dev-guide-builds[builds] your application image, and deploys the newly created image together with the specified xref:../../using_images/db_images/postgresql.adoc#environment-variables[environment variables]. The application is named `rails-app`.
303
303
304
-
You can verify the environment variables have been added by viewing the JSON document of the `rails-app` link:../deployments.html[DeploymentConfig]:
304
+
You can verify the environment variables have been added by viewing the JSON document of the `rails-app` xref:../deployments.adoc#dev-guide-deployments[DeploymentConfig]:
305
305
306
306
----
307
307
$ oc get dc rails-app -o json
@@ -326,13 +326,13 @@ env": [
326
326
],
327
327
----
328
328
329
-
To check the link:../builds.html[build] process, use the link:../builds.html#accessing-build-logs[build-logs] command:
329
+
To check the xref:../builds.adoc#dev-guide-builds[build] process, use the xref:../builds.adoc#accessing-build-logs[build-logs] command:
330
330
331
331
----
332
332
$ oc logs -f build rails-app-1
333
333
----
334
334
335
-
Once the link:../builds.html[build] is complete, you can look at the running link:../../architecture/core_concepts/pods_and_services.html#pods[pods] in {product-title}
335
+
Once the xref:../builds.adoc#dev-guide-builds[build] is complete, you can look at the running xref:../../architecture/core_concepts/pods_and_services.adoc#pods[pods] in {product-title}
336
336
337
337
----
338
338
$ oc get pods
@@ -344,7 +344,7 @@ Before your application will be functional, you need to initialize the database
344
344
345
345
* Manually from the running frontend container:
346
346
347
-
First you need to exec into frontend container with link:../../cli_reference/basic_cli_operations.html#troubleshooting-and-debugging-cli-operations[rsh] command:
347
+
First you need to exec into frontend container with xref:../../cli_reference/basic_cli_operations.adoc#troubleshooting-and-debugging-cli-operations[rsh] command:
348
348
349
349
$ oc rsh <FRONTEND_POD_ID>
350
350
@@ -354,11 +354,11 @@ Run the migration from inside the container:
354
354
355
355
If you are running your Rails application in a `development` or `test` environment you don't have to specify the `RAILS_ENV` environment variable.
356
356
357
-
* By adding pre-deployment link:../../dev_guide/deployments.html#lifecycle-hooks[lifecycle hooks] in your template. For example check the link:https://github.com/openshift/rails-ex/blob/master/openshift/templates/rails-postgresql.json#L122-L130[hooks example] in our link:https://github.com/openshift/rails-ex[Rails example] application.
357
+
* By adding pre-deployment xref:../../dev_guide/deployments.adoc#lifecycle-hooks[lifecycle hooks] in your template. For example check the link:https://github.com/openshift/rails-ex/blob/master/openshift/templates/rails-postgresql.json#L122-L130[hooks example] in our link:https://github.com/openshift/rails-ex[Rails example] application.
358
358
359
359
=== Creating a Route for Your Application
360
360
361
-
To expose a service by giving it an externally-reachable hostname like `www.example.com` use {product-title} link:../routes.html[route]. In your case you need to expose the frontend service by typing:
361
+
To expose a service by giving it an externally-reachable hostname like `www.example.com` use {product-title} xref:../routes.adoc#dev-guide-routes[route]. In your case you need to expose the frontend service by typing:
362
362
363
363
----
364
364
$ oc expose service rails-app --hostname=www.example.com
@@ -368,11 +368,11 @@ $ oc expose service rails-app --hostname=www.example.com
368
368
====
369
369
It's the user's responsibility to ensure the hostname they specify resolves into the IP address of the router. For more information, check the {product-title} documentation on:
0 commit comments