Browse Source

Merge pull request #1890 from sdodson/image-stream-sync

Image stream sync
Brenton Leanhardt 9 years ago
parent
commit
bef0ae8456
16 changed files with 100 additions and 38 deletions
  1. 1 1
      roles/openshift_examples/files/examples/latest
  2. 6 6
      roles/openshift_examples/files/examples/v1.2/db-templates/mongodb-ephemeral-template.json
  3. 1 1
      roles/openshift_examples/files/examples/v1.2/db-templates/mongodb-persistent-template.json
  4. 1 1
      roles/openshift_examples/files/examples/v1.2/db-templates/mysql-ephemeral-template.json
  5. 1 1
      roles/openshift_examples/files/examples/v1.2/db-templates/postgresql-ephemeral-template.json
  6. 15 3
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/cakephp-mysql.json
  7. 1 1
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/cakephp.json
  8. 15 3
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/dancer-mysql.json
  9. 1 1
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/dancer.json
  10. 15 3
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/django-postgresql.json
  11. 1 1
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/django.json
  12. 5 5
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/jenkins-ephemeral-template.json
  13. 4 4
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/jenkins-persistent-template.json
  14. 17 3
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/nodejs-mongodb.json
  15. 1 1
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/nodejs.json
  16. 15 3
      roles/openshift_examples/files/examples/v1.2/quickstart-templates/rails-postgresql.json

+ 1 - 1
roles/openshift_examples/files/examples/latest

@@ -1 +1 @@
-v1.1
+v1.2

+ 6 - 6
roles/openshift_examples/files/examples/v1.2/db-templates/mongodb-ephemeral-template.json

@@ -54,7 +54,7 @@
           {
             "type": "ImageChange",
             "imageChangeParams": {
-              "automatic": false,
+              "automatic": true,
               "containerNames": [
                 "mongodb"
               ],
@@ -96,7 +96,7 @@
                   "timeoutSeconds": 1,
                   "initialDelaySeconds": 3,
                   "exec": {
-                    "command": [ "/bin/sh", "-i", "-c", "mongostat --host 127.0.0.1 -u admin -p $MONGODB_ADMIN_PASSWORD -n 1 --noheaders"]
+                    "command": [ "/bin/sh", "-i", "-c", "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""]
                   }
                 },
                 "livenessProbe": {
@@ -125,10 +125,10 @@
                   }
                 ],
                 "resources": {
-		    "limits": {
-			"memory": "${MEMORY_LIMIT}"
-		    }
-		},
+                  "limits": {
+                    "memory": "${MEMORY_LIMIT}"
+                  }
+                },
                 "volumeMounts": [
                   {
                     "name": "${DATABASE_SERVICE_NAME}-data",

+ 1 - 1
roles/openshift_examples/files/examples/v1.2/db-templates/mongodb-persistent-template.json

@@ -113,7 +113,7 @@
                   "timeoutSeconds": 1,
                   "initialDelaySeconds": 3,
                   "exec": {
-                    "command": [ "/bin/sh", "-i", "-c", "mongostat --host 127.0.0.1 -u admin -p $MONGODB_ADMIN_PASSWORD -n 1 --noheaders"]
+                    "command": [ "/bin/sh", "-i", "-c", "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""]
                   }
                 },
                 "livenessProbe": {

+ 1 - 1
roles/openshift_examples/files/examples/v1.2/db-templates/mysql-ephemeral-template.json

@@ -54,7 +54,7 @@
           {
             "type": "ImageChange",
             "imageChangeParams": {
-              "automatic": false,
+              "automatic": true,
               "containerNames": [
                 "mysql"
               ],

+ 1 - 1
roles/openshift_examples/files/examples/v1.2/db-templates/postgresql-ephemeral-template.json

@@ -54,7 +54,7 @@
           {
             "type": "ImageChange",
             "imageChangeParams": {
-              "automatic": false,
+              "automatic": true,
               "containerNames": [
                 "postgresql"
               ],

+ 15 - 3
roles/openshift_examples/files/examples/v1.2/quickstart-templates/cakephp-mysql.json

@@ -166,7 +166,7 @@
             "containers": [
               {
                 "name": "cakephp-mysql-example",
-                "image": "cakephp-mysql-example",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 8080
@@ -276,7 +276,7 @@
           {
             "type": "ImageChange",
             "imageChangeParams": {
-              "automatic": false,
+              "automatic": true,
               "containerNames": [
                 "mysql"
               ],
@@ -303,15 +303,27 @@
             }
           },
           "spec": {
+            "volumes": [
+              {
+                "name": "data",
+                "emptyDir": {}
+              }
+            ],
             "containers": [
               {
                 "name": "mysql",
-                "image": "mysql",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 3306
                   }
                 ],
+                "volumeMounts": [
+                  {
+                    "name": "data",
+                    "mountPath": "/var/lib/mysql/data"
+                  }
+                ],
                 "readinessProbe": {
                   "timeoutSeconds": 1,
                   "initialDelaySeconds": 5,

+ 1 - 1
roles/openshift_examples/files/examples/v1.2/quickstart-templates/cakephp.json

@@ -155,7 +155,7 @@
             "containers": [
               {
                 "name": "cakephp-example",
-                "image": "cakephp-example",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 8080

+ 15 - 3
roles/openshift_examples/files/examples/v1.2/quickstart-templates/dancer-mysql.json

@@ -152,7 +152,7 @@
             "containers": [
               {
                 "name": "dancer-mysql-example",
-                "image": "dancer-mysql-example",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 8080
@@ -250,7 +250,7 @@
           {
             "type": "ImageChange",
             "imageChangeParams": {
-              "automatic": false,
+              "automatic": true,
               "containerNames": [
                 "mysql"
               ],
@@ -277,15 +277,27 @@
             }
           },
           "spec": {
+            "volumes": [
+              {
+                "name": "data",
+                "emptyDir": {}
+              }
+            ],
             "containers": [
               {
                 "name": "mysql",
-                "image": "mysql",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 3306
                   }
                 ],
+                "volumeMounts": [
+                  {
+                    "name": "data",
+                    "mountPath": "/var/lib/mysql/data"
+                  }
+                ],
                 "readinessProbe": {
                   "timeoutSeconds": 1,
                   "initialDelaySeconds": 5,

+ 1 - 1
roles/openshift_examples/files/examples/v1.2/quickstart-templates/dancer.json

@@ -155,7 +155,7 @@
             "containers": [
               {
                 "name": "dancer-example",
-                "image": "dancer-example",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 8080

+ 15 - 3
roles/openshift_examples/files/examples/v1.2/quickstart-templates/django-postgresql.json

@@ -158,7 +158,7 @@
             "containers": [
               {
                 "name": "django-psql-example",
-                "image": "django-psql-example",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 8080
@@ -260,7 +260,7 @@
           {
             "type": "ImageChange",
             "imageChangeParams": {
-              "automatic": false,
+              "automatic": true,
               "containerNames": [
                 "postgresql"
               ],
@@ -287,10 +287,16 @@
             }
           },
           "spec": {
+            "volumes": [
+              {
+                "name": "data",
+                "emptyDir": {}
+              }
+            ],
             "containers": [
               {
                 "name": "postgresql",
-                "image": "postgresql",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 5432
@@ -310,6 +316,12 @@
                     "value": "${DATABASE_NAME}"
                   }
                 ],
+                "volumeMounts": [
+                  {
+                    "name": "data",
+                    "mountPath": "/var/lib/pgsql/data"
+                  }
+                ],
                 "readinessProbe": {
                   "timeoutSeconds": 1,
                   "initialDelaySeconds": 5,

+ 1 - 1
roles/openshift_examples/files/examples/v1.2/quickstart-templates/django.json

@@ -158,7 +158,7 @@
             "containers": [
               {
                 "name": "django-example",
-                "image": "django-example",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 8080

+ 5 - 5
roles/openshift_examples/files/examples/v1.2/quickstart-templates/jenkins-ephemeral-template.json

@@ -5,7 +5,7 @@
     "name": "jenkins-ephemeral",
     "creationTimestamp": null,
     "annotations": {
-      "description": "Jenkins service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
+      "description": "Jenkins service, without persistent storage.\nThe username is 'admin' and the tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
       "iconClass": "icon-jenkins",
       "tags": "instant-app,jenkins"
     }
@@ -71,7 +71,7 @@
           {
             "type": "ImageChange",
             "imageChangeParams": {
-              "automatic": false,
+              "automatic": true,
               "containerNames": [
                 "jenkins"
               ],
@@ -102,7 +102,7 @@
             "containers": [
               {
                 "name": "jenkins",
-                "image": "${JENKINS_IMAGE}",
+                "image": "JENKINS_IMAGE",
                 "readinessProbe": {
                   "timeoutSeconds": 3,
                   "initialDelaySeconds": 3,
@@ -113,7 +113,7 @@
                 },
                 "livenessProbe": {
                     "timeoutSeconds": 3,
-                    "initialDelaySeconds": 30,
+                    "initialDelaySeconds": 60,
                     "httpGet": {
                         "path": "/login",
                         "port": 8080
@@ -182,7 +182,7 @@
     {
       "name": "JENKINS_PASSWORD",
       "displayName": "Jenkins Password",
-      "description": "Password for the Jenkins user.",
+      "description": "Password for the Jenkins 'admin' user.",
       "generate": "expression",
       "value": "password"
     }

+ 4 - 4
roles/openshift_examples/files/examples/v1.2/quickstart-templates/jenkins-persistent-template.json

@@ -5,7 +5,7 @@
     "name": "jenkins-persistent",
     "creationTimestamp": null,
     "annotations": {
-      "description": "Jenkins service, with persistent storage.  You must have persistent volumes available in your cluster to use this template.",
+      "description": "Jenkins service, with persistent storage.\nThe username is 'admin' and the tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.\nYou must have persistent volumes available in your cluster to use this template.",
       "iconClass": "icon-jenkins",
       "tags": "instant-app,jenkins"
     }
@@ -119,7 +119,7 @@
             "containers": [
               {
                 "name": "jenkins",
-                "image": "${JENKINS_IMAGE}",
+                "image": "JENKINS_IMAGE",
                 "readinessProbe": {
                   "timeoutSeconds": 3,
                   "initialDelaySeconds": 3,
@@ -130,7 +130,7 @@
                 },
                 "livenessProbe": {
                     "timeoutSeconds": 3,
-                    "initialDelaySeconds": 30,
+                    "initialDelaySeconds": 60,
                     "httpGet": {
                         "path": "/login",
                         "port": 8080
@@ -199,7 +199,7 @@
     {
       "name": "JENKINS_PASSWORD",
       "displayName": "Jenkins Password",
-      "description": "Password for the Jenkins user.",
+      "description": "Password for the Jenkins 'admin' user.",
       "generate": "expression",
       "value": "password"
     },

+ 17 - 3
roles/openshift_examples/files/examples/v1.2/quickstart-templates/nodejs-mongodb.json

@@ -164,7 +164,7 @@
             "containers": [
               {
                 "name": "nodejs-mongodb-example",
-                "image": "nodejs-mongodb-example",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 8080
@@ -258,7 +258,7 @@
           {
             "type": "ImageChange",
             "imageChangeParams": {
-              "automatic": false,
+              "automatic": true,
               "containerNames": [
                 "mongodb"
               ],
@@ -288,7 +288,7 @@
             "containers": [
               {
                 "name": "mongodb",
-                "image": "mongodb",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 27017
@@ -330,6 +330,20 @@
                     "limits": {
                         "memory": "${MEMORY_MONGODB_LIMIT}"
                     }
+                },
+                "volumeMounts": [
+                  {
+                    "name": "${DATABASE_SERVICE_NAME}-data",
+                    "mountPath": "/var/lib/mongodb/data"
+                  }
+                ]
+              }
+            ],
+            "volumes": [
+              {
+                "name": "${DATABASE_SERVICE_NAME}-data",
+                "emptyDir": {
+                  "medium": ""
                 }
               }
             ]

+ 1 - 1
roles/openshift_examples/files/examples/v1.2/quickstart-templates/nodejs.json

@@ -164,7 +164,7 @@
             "containers": [
               {
                 "name": "nodejs-example",
-                "image": "nodejs-example",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 8080

+ 15 - 3
roles/openshift_examples/files/examples/v1.2/quickstart-templates/rails-postgresql.json

@@ -169,7 +169,7 @@
             "containers": [
               {
                 "name": "rails-postgresql-example",
-                "image": "rails-postgresql-example",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 8080
@@ -287,7 +287,7 @@
           {
             "type": "ImageChange",
             "imageChangeParams": {
-              "automatic": false,
+              "automatic": true,
               "containerNames": [
                 "postgresql"
               ],
@@ -314,10 +314,16 @@
             }
           },
           "spec": {
+            "volumes": [
+              {
+                "name": "data",
+                "emptyDir": {}
+              }
+            ],
             "containers": [
               {
                 "name": "postgresql",
-                "image": "postgresql",
+                "image": " ",
                 "ports": [
                   {
                     "containerPort": 5432
@@ -337,6 +343,12 @@
                     "port": 5432
                   }
                 },
+                "volumeMounts": [
+                  {
+                    "name": "data",
+                    "mountPath": "/var/lib/pgsql/data"
+                  }
+                ],
                 "env": [
                   {
                     "name": "POSTGRESQL_USER",