parameterize db image

This commit is contained in:
Ben Parees 2015-07-31 14:18:23 -04:00
parent 1b284ff6a5
commit b10d0e8e1a

View file

@ -165,19 +165,19 @@
}, },
{ {
"name": "MONGODB_USER", "name": "MONGODB_USER",
"value": "${MONGODB_USER}" "value": "${DATABASE_USER}"
}, },
{ {
"name": "MONGODB_PASSWORD", "name": "MONGODB_PASSWORD",
"value": "${MONGODB_PASSWORD}" "value": "${DATABASE_PASSWORD}"
}, },
{ {
"name": "MONGODB_DATABASE", "name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}" "value": "${DATABASE_NAME}"
}, },
{ {
"name": "MONGODB_ADMIN_PASSWORD", "name": "MONGODB_ADMIN_PASSWORD",
"value": "${MONGODB_ADMIN_PASSWORD}" "value": "${DATABASE_ADMIN_PASSWORD}"
} }
] ]
} }
@ -241,7 +241,7 @@
"containers": [ "containers": [
{ {
"name": "mongodb", "name": "mongodb",
"image": "openshift/mongodb-24-centos7", "image": "${MONGODB_IMAGE}",
"ports": [ "ports": [
{ {
"containerPort": 27017 "containerPort": 27017
@ -250,19 +250,19 @@
"env": [ "env": [
{ {
"name": "MONGODB_USER", "name": "MONGODB_USER",
"value": "${MONGODB_USER}" "value": "${DATABASE_USER}"
}, },
{ {
"name": "MONGODB_PASSWORD", "name": "MONGODB_PASSWORD",
"value": "${MONGODB_PASSWORD}" "value": "${DATABASE_PASSWORD}"
}, },
{ {
"name": "MONGODB_DATABASE", "name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}" "value": "${DATABASE_NAME}"
}, },
{ {
"name": "MONGODB_ADMIN_PASSWORD", "name": "MONGODB_ADMIN_PASSWORD",
"value": "${MONGODB_ADMIN_PASSWORD}" "value": "${DATABASE_ADMIN_PASSWORD}"
} }
] ]
} }
@ -303,27 +303,32 @@
"value": "mongodb" "value": "mongodb"
}, },
{ {
"name": "MONGODB_USER", "name": "DATABASE_USER",
"description": "Username for MongoDB user that will be used for accessing the database", "description": "Username for MongoDB user that will be used for accessing the database",
"generate": "expression", "generate": "expression",
"from": "user[A-Z0-9]{3}" "from": "user[A-Z0-9]{3}"
}, },
{ {
"name": "MONGODB_PASSWORD", "name": "DATABASE_PASSWORD",
"description": "Password for the MongoDB user", "description": "Password for the MongoDB user",
"generate": "expression", "generate": "expression",
"from": "[a-zA-Z0-9]{16}" "from": "[a-zA-Z0-9]{16}"
}, },
{ {
"name": "MONGODB_DATABASE", "name": "DATABASE_NAME",
"description": "Database name", "description": "Database name",
"value": "sampledb" "value": "sampledb"
}, },
{ {
"name": "MONGODB_ADMIN_PASSWORD", "name": "DATABASE_ADMIN_PASSWORD",
"description": "Password for the database admin user", "description": "Password for the database admin user",
"generate": "expression", "generate": "expression",
"from": "[a-zA-Z0-9]{16}" "from": "[a-zA-Z0-9]{16}"
},
{
"name": "MONGODB_IMAGE",
"description": "Image to use for mongodb",
"value": "openshift/mongodb-24-centos7"
} }
] ]
} }