Add support for minimal MongoDB testing
This commit adds scripts for creating MongoDB image and defines group of tests to check MongoDB instance creation Implements: blueprint base-mongodb-image Change-Id: I930b6288fd5fca8f3ddd6965a5e2145f2715c24a
This commit is contained in:
parent
6f85df7ec1
commit
db4aa87f40
1
scripts/files/elements/fedora-mongodb/README.md
Normal file
1
scripts/files/elements/fedora-mongodb/README.md
Normal file
@ -0,0 +1 @@
|
||||
Sets up a MongoDB install in the image.
|
9
scripts/files/elements/fedora-mongodb/install.d/10-mongodb
Executable file
9
scripts/files/elements/fedora-mongodb/install.d/10-mongodb
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# CONTEXT: GUEST during CONSTRUCTION as ROOT
|
||||
# PURPOSE: Install controller base required packages
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
yum -y install mongodb
|
9
scripts/files/elements/fedora-mongodb/install.d/25-trove-mongo-dep
Executable file
9
scripts/files/elements/fedora-mongodb/install.d/25-trove-mongo-dep
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# CONTEXT: GUEST during CONSTRUCTION as ROOT
|
||||
# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
pip-python install pymongo
|
1
scripts/files/elements/ubuntu-mongodb/README.md
Normal file
1
scripts/files/elements/ubuntu-mongodb/README.md
Normal file
@ -0,0 +1 @@
|
||||
Sets up a MongoDB install in the image.
|
11
scripts/files/elements/ubuntu-mongodb/install.d/10-mongodb
Executable file
11
scripts/files/elements/ubuntu-mongodb/install.d/10-mongodb
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# CONTEXT: GUEST during CONSTRUCTION as ROOT
|
||||
# PURPOSE: Install controller base required packages
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
apt-get -y install mongodb
|
9
scripts/files/elements/ubuntu-mongodb/install.d/25-trove-mongo-dep
Executable file
9
scripts/files/elements/ubuntu-mongodb/install.d/25-trove-mongo-dep
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# CONTEXT: GUEST during CONSTRUCTION as ROOT
|
||||
# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu
|
||||
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
pip install pymongo
|
@ -47,7 +47,8 @@ function cmd_build_image() {
|
||||
fi
|
||||
SERVICE_TYPE=$1
|
||||
|
||||
VALID_SERVICES='mysql percona redis cassandra couchbase'
|
||||
|
||||
VALID_SERVICES='mysql percona redis cassandra couchbase mongodb'
|
||||
if [ `expr "$VALID_SERVICES" : ".*$SERVICE"` -eq 0 ] ; then
|
||||
exclaim "You did not pass in a valid image type. Valid types are:" $VALID_SERVICES
|
||||
exit 1
|
||||
|
@ -288,6 +288,9 @@ function cmd_set_datastore() {
|
||||
elif [ "$DATASTORE_TYPE" == "percona" ]; then
|
||||
PACKAGES=${PACKAGES:-"percona-server-server-5.5"}
|
||||
VERSION="-5.5"
|
||||
elif [ "$DATASTORE_TYPE" == "mongodb" ]; then
|
||||
PACKAGES=${PACKAGES:-"mongodb"}
|
||||
VERSION="-2.0.4"
|
||||
elif [ "$DATASTORE_TYPE" == "redis" ]; then
|
||||
PACKAGES=${PACKAGES:-"redis-server"}
|
||||
VERSION="-2.8"
|
||||
|
@ -236,6 +236,16 @@ def import_tests():
|
||||
depends_on_groups=couchbase_groups)
|
||||
|
||||
|
||||
mongodb_groups = [
|
||||
"services.initialize",
|
||||
flavors.GROUP,
|
||||
versions.GROUP,
|
||||
instances.GROUP_START_SIMPLE,
|
||||
]
|
||||
proboscis.register(groups=["mongodb"],
|
||||
depends_on_groups=mongodb_groups)
|
||||
|
||||
|
||||
def run_main(test_importer):
|
||||
|
||||
add_support_for_localization()
|
||||
@ -347,3 +357,4 @@ def run_main(test_importer):
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_main(import_tests)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user