get names consistent; associated doc updates based on test walkthrough; incorporate Ben's comments; more name corrections
This commit is contained in:
parent
d89bae6957
commit
9cf2c50ce8
3 changed files with 31 additions and 29 deletions
12
README.md
12
README.md
|
@ -80,9 +80,9 @@ After adding your templates, you can go to your OpenShift web console, browse to
|
||||||
|
|
||||||
Adjust the parameter values to suit your configuration. Most times you can just accept the default values, however you will probably want to set the `GIT_REPOSITORY` parameter to point to your fork and the `DATABASE_*` parameters to match your database configuration.
|
Adjust the parameter values to suit your configuration. Most times you can just accept the default values, however you will probably want to set the `GIT_REPOSITORY` parameter to point to your fork and the `DATABASE_*` parameters to match your database configuration.
|
||||||
|
|
||||||
Alternatively, you can use the command line to create your new app:
|
Alternatively, you can use the command line to create your new app, assuming your OpenShift deployment has the default set of ImageStreams defined. Instructions for installing the default ImageStreams are available [here](http://docs.openshift.org/latest/admin_guide/install/first_steps.html). If you are defining the set of ImageStreams now, remember to pass in the proper cluster-admin credentials and to create the ImageStreams in the 'openshift' namespace:
|
||||||
|
|
||||||
oc new-app --template=<TEMPLATE_NAME> --param=GIT_REPOSITORY=...,...
|
oc new-app openshift/templates/django.json -p SOURCE_REPOSITORY_URL=<your repository location>
|
||||||
|
|
||||||
Your application will be built and deployed automatically. If that doesn't happen, you can debug your build:
|
Your application will be built and deployed automatically. If that doesn't happen, you can debug your build:
|
||||||
|
|
||||||
|
@ -92,9 +92,11 @@ Your application will be built and deployed automatically. If that doesn't happe
|
||||||
|
|
||||||
And you can see information about your deployment too:
|
And you can see information about your deployment too:
|
||||||
|
|
||||||
oc describe dc/django
|
oc describe dc/django-example
|
||||||
|
|
||||||
In the web console, the overview tab shows you a service, by default called "django", that encapsulates all pods running your Django application. You can access your application by browsing to the service's IP address and port.
|
In the web console, the overview tab shows you a service, by default called "django-example", that encapsulates all pods running your Django application. You can access your application by browsing to the service's IP address and port. You can determine these by running
|
||||||
|
|
||||||
|
oc get svc
|
||||||
|
|
||||||
|
|
||||||
### Without an application template
|
### Without an application template
|
||||||
|
@ -185,7 +187,7 @@ If there is more than one replica, you can also specify a POD by index:
|
||||||
|
|
||||||
Or both together:
|
Or both together:
|
||||||
|
|
||||||
POD_NAME=frontend POD_INDEX=2 ./run-in-container.sh ./manage.py shell
|
POD_NAME=django-example POD_INDEX=2 ./run-in-container.sh ./manage.py shell
|
||||||
|
|
||||||
|
|
||||||
## Data persistence
|
## Data persistence
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
"kind": "Service",
|
"kind": "Service",
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "django-frontend",
|
"name": "django-postgresql-example",
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"description": "Exposes and load balances the application pods"
|
"description": "Exposes and load balances the application pods"
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"selector": {
|
"selector": {
|
||||||
"name": "django-frontend"
|
"name": "django-postgresql-example"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -39,13 +39,13 @@
|
||||||
"kind": "Route",
|
"kind": "Route",
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "django-route"
|
"name": "django-postgresql-example"
|
||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
"host": "${APPLICATION_DOMAIN}",
|
"host": "${APPLICATION_DOMAIN}",
|
||||||
"to": {
|
"to": {
|
||||||
"kind": "Service",
|
"kind": "Service",
|
||||||
"name": "django-frontend"
|
"name": "django-postgresql-example"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
"kind": "ImageStream",
|
"kind": "ImageStream",
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "django-example",
|
"name": "django-postgresql-example",
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"description": "Keeps track of changes in the application image"
|
"description": "Keeps track of changes in the application image"
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
"kind": "BuildConfig",
|
"kind": "BuildConfig",
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "django-example",
|
"name": "django-postgresql-example",
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"description": "Defines how to build the application"
|
"description": "Defines how to build the application"
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
"output": {
|
"output": {
|
||||||
"to": {
|
"to": {
|
||||||
"kind": "ImageStreamTag",
|
"kind": "ImageStreamTag",
|
||||||
"name": "django-example:latest"
|
"name": "django-postgresql-example:latest"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"triggers": [
|
"triggers": [
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
"kind": "DeploymentConfig",
|
"kind": "DeploymentConfig",
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "django-frontend",
|
"name": "django-postgresql-example",
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"description": "Defines how to deploy the application server"
|
"description": "Defines how to deploy the application server"
|
||||||
}
|
}
|
||||||
|
@ -125,11 +125,11 @@
|
||||||
"imageChangeParams": {
|
"imageChangeParams": {
|
||||||
"automatic": true,
|
"automatic": true,
|
||||||
"containerNames": [
|
"containerNames": [
|
||||||
"django-example"
|
"django-postgresql-example"
|
||||||
],
|
],
|
||||||
"from": {
|
"from": {
|
||||||
"kind": "ImageStreamTag",
|
"kind": "ImageStreamTag",
|
||||||
"name": "django-example:latest"
|
"name": "django-postgresql-example:latest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -139,20 +139,20 @@
|
||||||
],
|
],
|
||||||
"replicas": 1,
|
"replicas": 1,
|
||||||
"selector": {
|
"selector": {
|
||||||
"name": "django-frontend"
|
"name": "django-postgresql-example"
|
||||||
},
|
},
|
||||||
"template": {
|
"template": {
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "django-frontend",
|
"name": "django-postgresql-example",
|
||||||
"labels": {
|
"labels": {
|
||||||
"name": "django-frontend"
|
"name": "django-postgresql-example"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
"containers": [
|
"containers": [
|
||||||
{
|
{
|
||||||
"name": "django-example",
|
"name": "django-postgresql-example",
|
||||||
"image": "django-example",
|
"image": "django-postgresql-example",
|
||||||
"ports": [
|
"ports": [
|
||||||
{
|
{
|
||||||
"containerPort": 8080
|
"containerPort": 8080
|
||||||
|
@ -293,7 +293,7 @@
|
||||||
{
|
{
|
||||||
"name": "APPLICATION_DOMAIN",
|
"name": "APPLICATION_DOMAIN",
|
||||||
"description": "The exposed hostname that will route to the Django service",
|
"description": "The exposed hostname that will route to the Django service",
|
||||||
"value": "django-example.openshiftapps.com"
|
"value": "django-postgresql-example.openshiftapps.com"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "GITHUB_WEBHOOK_SECRET",
|
"name": "GITHUB_WEBHOOK_SECRET",
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
"kind": "Service",
|
"kind": "Service",
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "django-frontend",
|
"name": "django-example",
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"description": "Exposes and load balances the application pods"
|
"description": "Exposes and load balances the application pods"
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"selector": {
|
"selector": {
|
||||||
"name": "django-frontend"
|
"name": "django-example"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -39,13 +39,13 @@
|
||||||
"kind": "Route",
|
"kind": "Route",
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "django-route"
|
"name": "django-example"
|
||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
"host": "${APPLICATION_DOMAIN}",
|
"host": "${APPLICATION_DOMAIN}",
|
||||||
"to": {
|
"to": {
|
||||||
"kind": "Service",
|
"kind": "Service",
|
||||||
"name": "django-frontend"
|
"name": "django-example"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
"kind": "DeploymentConfig",
|
"kind": "DeploymentConfig",
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "django-frontend",
|
"name": "django-example",
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"description": "Defines how to deploy the application server"
|
"description": "Defines how to deploy the application server"
|
||||||
}
|
}
|
||||||
|
@ -139,13 +139,13 @@
|
||||||
],
|
],
|
||||||
"replicas": 1,
|
"replicas": 1,
|
||||||
"selector": {
|
"selector": {
|
||||||
"name": "django-frontend"
|
"name": "django-example"
|
||||||
},
|
},
|
||||||
"template": {
|
"template": {
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "django-frontend",
|
"name": "django-example",
|
||||||
"labels": {
|
"labels": {
|
||||||
"name": "django-frontend"
|
"name": "django-example"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
|
|
Loading…
Reference in a new issue