Merge pull request #21 from gabemontero/issue3358

get names consistent; associated doc updates based on test walkthrough
This commit is contained in:
Ben Parees 2015-07-01 14:44:43 -04:00
commit c84b9f85de
3 changed files with 31 additions and 29 deletions

View file

@ -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.
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:
@ -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:
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
@ -185,7 +187,7 @@ If there is more than one replica, you can also specify a POD by index:
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

View file

@ -17,7 +17,7 @@
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "django-frontend",
"name": "django-postgresql-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
@ -31,7 +31,7 @@
}
],
"selector": {
"name": "django-frontend"
"name": "django-postgresql-example"
}
}
},
@ -39,13 +39,13 @@
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "django-route"
"name": "django-postgresql-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "django-frontend"
"name": "django-postgresql-example"
}
}
},
@ -53,7 +53,7 @@
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "django-example",
"name": "django-postgresql-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
@ -63,7 +63,7 @@
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "django-example",
"name": "django-postgresql-example",
"annotations": {
"description": "Defines how to build the application"
}
@ -90,7 +90,7 @@
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "django-example:latest"
"name": "django-postgresql-example:latest"
}
},
"triggers": [
@ -110,7 +110,7 @@
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "django-frontend",
"name": "django-postgresql-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
@ -125,11 +125,11 @@
"imageChangeParams": {
"automatic": true,
"containerNames": [
"django-example"
"django-postgresql-example"
],
"from": {
"kind": "ImageStreamTag",
"name": "django-example:latest"
"name": "django-postgresql-example:latest"
}
}
},
@ -139,20 +139,20 @@
],
"replicas": 1,
"selector": {
"name": "django-frontend"
"name": "django-postgresql-example"
},
"template": {
"metadata": {
"name": "django-frontend",
"name": "django-postgresql-example",
"labels": {
"name": "django-frontend"
"name": "django-postgresql-example"
}
},
"spec": {
"containers": [
{
"name": "django-example",
"image": "django-example",
"name": "django-postgresql-example",
"image": "django-postgresql-example",
"ports": [
{
"containerPort": 8080
@ -293,7 +293,7 @@
{
"name": "APPLICATION_DOMAIN",
"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",

View file

@ -17,7 +17,7 @@
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "django-frontend",
"name": "django-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
@ -31,7 +31,7 @@
}
],
"selector": {
"name": "django-frontend"
"name": "django-example"
}
}
},
@ -39,13 +39,13 @@
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "django-route"
"name": "django-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "django-frontend"
"name": "django-example"
}
}
},
@ -110,7 +110,7 @@
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "django-frontend",
"name": "django-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
@ -139,13 +139,13 @@
],
"replicas": 1,
"selector": {
"name": "django-frontend"
"name": "django-example"
},
"template": {
"metadata": {
"name": "django-frontend",
"name": "django-example",
"labels": {
"name": "django-frontend"
"name": "django-example"
}
},
"spec": {