Skip to content

Commit c84b9f8

Browse files
committed
Merge pull request #21 from gabemontero/issue3358
get names consistent; associated doc updates based on test walkthrough
2 parents d89bae6 + 9cf2c50 commit c84b9f8

File tree

3 files changed

+31
-29
lines changed

3 files changed

+31
-29
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ After adding your templates, you can go to your OpenShift web console, browse to
8080

8181
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.
8282

83-
Alternatively, you can use the command line to create your new app:
83+
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:
8484

85-
oc new-app --template=<TEMPLATE_NAME> --param=GIT_REPOSITORY=...,...
85+
oc new-app openshift/templates/django.json -p SOURCE_REPOSITORY_URL=<your repository location>
8686

8787
Your application will be built and deployed automatically. If that doesn't happen, you can debug your build:
8888

@@ -92,9 +92,11 @@ Your application will be built and deployed automatically. If that doesn't happe
9292

9393
And you can see information about your deployment too:
9494

95-
oc describe dc/django
95+
oc describe dc/django-example
9696

97-
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.
97+
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
98+
99+
oc get svc
98100

99101

100102
### Without an application template
@@ -185,7 +187,7 @@ If there is more than one replica, you can also specify a POD by index:
185187

186188
Or both together:
187189

188-
POD_NAME=frontend POD_INDEX=2 ./run-in-container.sh ./manage.py shell
190+
POD_NAME=django-example POD_INDEX=2 ./run-in-container.sh ./manage.py shell
189191

190192

191193
## Data persistence

openshift/templates/django-postgresql.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"kind": "Service",
1818
"apiVersion": "v1",
1919
"metadata": {
20-
"name": "django-frontend",
20+
"name": "django-postgresql-example",
2121
"annotations": {
2222
"description": "Exposes and load balances the application pods"
2323
}
@@ -31,29 +31,29 @@
3131
}
3232
],
3333
"selector": {
34-
"name": "django-frontend"
34+
"name": "django-postgresql-example"
3535
}
3636
}
3737
},
3838
{
3939
"kind": "Route",
4040
"apiVersion": "v1",
4141
"metadata": {
42-
"name": "django-route"
42+
"name": "django-postgresql-example"
4343
},
4444
"spec": {
4545
"host": "${APPLICATION_DOMAIN}",
4646
"to": {
4747
"kind": "Service",
48-
"name": "django-frontend"
48+
"name": "django-postgresql-example"
4949
}
5050
}
5151
},
5252
{
5353
"kind": "ImageStream",
5454
"apiVersion": "v1",
5555
"metadata": {
56-
"name": "django-example",
56+
"name": "django-postgresql-example",
5757
"annotations": {
5858
"description": "Keeps track of changes in the application image"
5959
}
@@ -63,7 +63,7 @@
6363
"kind": "BuildConfig",
6464
"apiVersion": "v1",
6565
"metadata": {
66-
"name": "django-example",
66+
"name": "django-postgresql-example",
6767
"annotations": {
6868
"description": "Defines how to build the application"
6969
}
@@ -90,7 +90,7 @@
9090
"output": {
9191
"to": {
9292
"kind": "ImageStreamTag",
93-
"name": "django-example:latest"
93+
"name": "django-postgresql-example:latest"
9494
}
9595
},
9696
"triggers": [
@@ -110,7 +110,7 @@
110110
"kind": "DeploymentConfig",
111111
"apiVersion": "v1",
112112
"metadata": {
113-
"name": "django-frontend",
113+
"name": "django-postgresql-example",
114114
"annotations": {
115115
"description": "Defines how to deploy the application server"
116116
}
@@ -125,11 +125,11 @@
125125
"imageChangeParams": {
126126
"automatic": true,
127127
"containerNames": [
128-
"django-example"
128+
"django-postgresql-example"
129129
],
130130
"from": {
131131
"kind": "ImageStreamTag",
132-
"name": "django-example:latest"
132+
"name": "django-postgresql-example:latest"
133133
}
134134
}
135135
},
@@ -139,20 +139,20 @@
139139
],
140140
"replicas": 1,
141141
"selector": {
142-
"name": "django-frontend"
142+
"name": "django-postgresql-example"
143143
},
144144
"template": {
145145
"metadata": {
146-
"name": "django-frontend",
146+
"name": "django-postgresql-example",
147147
"labels": {
148-
"name": "django-frontend"
148+
"name": "django-postgresql-example"
149149
}
150150
},
151151
"spec": {
152152
"containers": [
153153
{
154-
"name": "django-example",
155-
"image": "django-example",
154+
"name": "django-postgresql-example",
155+
"image": "django-postgresql-example",
156156
"ports": [
157157
{
158158
"containerPort": 8080
@@ -293,7 +293,7 @@
293293
{
294294
"name": "APPLICATION_DOMAIN",
295295
"description": "The exposed hostname that will route to the Django service",
296-
"value": "django-example.openshiftapps.com"
296+
"value": "django-postgresql-example.openshiftapps.com"
297297
},
298298
{
299299
"name": "GITHUB_WEBHOOK_SECRET",

openshift/templates/django.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"kind": "Service",
1818
"apiVersion": "v1",
1919
"metadata": {
20-
"name": "django-frontend",
20+
"name": "django-example",
2121
"annotations": {
2222
"description": "Exposes and load balances the application pods"
2323
}
@@ -31,21 +31,21 @@
3131
}
3232
],
3333
"selector": {
34-
"name": "django-frontend"
34+
"name": "django-example"
3535
}
3636
}
3737
},
3838
{
3939
"kind": "Route",
4040
"apiVersion": "v1",
4141
"metadata": {
42-
"name": "django-route"
42+
"name": "django-example"
4343
},
4444
"spec": {
4545
"host": "${APPLICATION_DOMAIN}",
4646
"to": {
4747
"kind": "Service",
48-
"name": "django-frontend"
48+
"name": "django-example"
4949
}
5050
}
5151
},
@@ -110,7 +110,7 @@
110110
"kind": "DeploymentConfig",
111111
"apiVersion": "v1",
112112
"metadata": {
113-
"name": "django-frontend",
113+
"name": "django-example",
114114
"annotations": {
115115
"description": "Defines how to deploy the application server"
116116
}
@@ -139,13 +139,13 @@
139139
],
140140
"replicas": 1,
141141
"selector": {
142-
"name": "django-frontend"
142+
"name": "django-example"
143143
},
144144
"template": {
145145
"metadata": {
146-
"name": "django-frontend",
146+
"name": "django-example",
147147
"labels": {
148-
"name": "django-frontend"
148+
"name": "django-example"
149149
}
150150
},
151151
"spec": {

0 commit comments

Comments
 (0)