diff --git a/.gitignore b/.gitignore index d5a1397719..95cdb08516 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ sdist develop-eggs .installed.cfg lib +!devstack/lib lib64 # Installer logs diff --git a/contrib/devstack/README.rst b/contrib/devstack/README.rst deleted file mode 100644 index 461bc763d0..0000000000 --- a/contrib/devstack/README.rst +++ /dev/null @@ -1,20 +0,0 @@ -=============================== -Installing Rally using devstack -=============================== - -The contrib/devstack/ directory contains the files necessary to integrate Rally with devstack. - -To install:: - - $ DEVSTACK_DIR=.../path/to/devstack - $ cp lib/rally ${DEVSTACK_DIR}/lib - $ cp extras.d/70-rally.sh ${DEVSTACK_DIR}/extras.d - -To configure devstack to run rally:: - - $ cd ${DEVSTACK_DIR} - $ echo "enable_service rally" >> localrc - -Run devstack as normal:: - - $ ./stack.sh diff --git a/contrib/devstack/extras.d/70-rally.sh b/contrib/devstack/extras.d/70-rally.sh deleted file mode 100644 index 449aff9dc3..0000000000 --- a/contrib/devstack/extras.d/70-rally.sh +++ /dev/null @@ -1,18 +0,0 @@ -# rally.sh - DevStack extras script to install Rally - -if is_service_enabled rally; then - if [[ "$1" == "source" ]]; then - # Initial source - source $TOP_DIR/lib/rally - elif [[ "$1" == "stack" && "$2" == "install" ]]; then - echo_summary "Installing Rally" - install_rally - elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then - echo_summary "Configuring Rally" - configure_rally - create_rally_accounts - elif [[ "$1" == "stack" && "$2" == "extra" ]]; then - echo_summary "Initializing Rally" - init_rally - fi -fi diff --git a/devstack/README.rst b/devstack/README.rst new file mode 100644 index 0000000000..cc0a45c089 --- /dev/null +++ b/devstack/README.rst @@ -0,0 +1,14 @@ +=============================== +Installing Rally using devstack +=============================== + +This directory contains the files necessary to integrate Rally with devstack. + +To configure devstack to run rally:: + + $ cd ${DEVSTACK_DIR} + $ echo "enable_plugin rally https://github.com/openstack/rally master" >> localrc + +Run devstack as normal:: + + $ ./stack.sh diff --git a/contrib/devstack/lib/rally b/devstack/lib/rally similarity index 67% rename from contrib/devstack/lib/rally rename to devstack/lib/rally index f3445b90df..34056b8f25 100644 --- a/contrib/devstack/lib/rally +++ b/devstack/lib/rally @@ -10,7 +10,6 @@ # # - install_rally # - configure_rally -# - create_rally_accounts # - init_rally # Save trace setting @@ -21,10 +20,6 @@ set +o xtrace # Defaults # -------- -# Set up default repos -RALLY_REPO=${RALLY_REPO:-${GIT_BASE}/openstack/rally.git} -RALLY_BRANCH=${RALLY_BRANCH:-master} - # Set up default directories RALLY_DIR=$DEST/rally RALLY_CONF_DIR=${RALLY_CONF_DIR:-/etc/rally} @@ -33,16 +28,6 @@ RALLY_CONF_FILE=rally.conf # Debug mode RALLY_DEBUG=${RALLY_DEBUG:-False} -# Support entry points installation of console scripts -if [[ -d $RALLY_DIR/bin ]]; then - RALLY_BIN_DIR=$NOVA_DIR/bin -else - RALLY_BIN_DIR=$(get_python_exec_prefix) -fi - -# Benchmark accounts -BENCHMARK_TENANT=${BENCHMARK_TENANT:-benchmark} - # Create deployment RALLY_ADD_DEPLOYMENT=${RALLY_ADD_DEPLOYMENT:-"True"} RALLY_ADD_DEPLOYMENT=$(trueorfalse True $RALLY_ADD_DEPLOYMENT) @@ -66,7 +51,7 @@ function _create_deployment_config() { "admin": { "username": "admin", "password": "$ADMIN_PASSWORD", - "tenant_name": "benchmark" + "tenant_name": "admin" } } EOF @@ -74,7 +59,6 @@ EOF # install_rally() - Collect source and prepare function install_rally() { - git_clone $RALLY_REPO $RALLY_DIR $RALLY_BRANCH setup_develop $RALLY_DIR } @@ -96,30 +80,17 @@ function configure_rally() { iniset $RALLY_CONF_DIR/$RALLY_CONF_FILE DEFAULT use_syslog $SYSLOG } -# create_rally_accounts() - Sets up common required rally accounts -create_rally_accounts() { - ADMIN_USER=$(keystone user-list | awk "/ admin / { print \$2 }") - ADMIN_ROLE=$(keystone role-list | awk "/ admin / { print \$2 }") - - BENHCMARK_TENANT=$(keystone tenant-create \ - --name benchmark \ - | grep " id " | get_field 2) - keystone user-role-add \ - --user-id $ADMIN_USER \ - --role-id $ADMIN_ROLE \ - --tenant-id $BENHCMARK_TENANT -} # init_rally() - Initialize databases, etc. function init_rally() { recreate_database rally utf8 # Recreate rally database - $RALLY_BIN_DIR/rally-manage --config-file $RALLY_CONF_DIR/$RALLY_CONF_FILE db recreate + rally-manage --config-file $RALLY_CONF_DIR/$RALLY_CONF_FILE db recreate # Add current DevStack deployment to Rally if [ "$RALLY_ADD_DEPLOYMENT" = "True" ]; then local tmpfile=$(mktemp) _create_deployment_config $tmpfile - $RALLY_BIN_DIR/rally --config-file $RALLY_CONF_DIR/$RALLY_CONF_FILE deployment create --name devstack --filename $tmpfile + rally --config-file $RALLY_CONF_DIR/$RALLY_CONF_FILE deployment create --name devstack --filename $tmpfile fi } diff --git a/devstack/plugin.sh b/devstack/plugin.sh new file mode 100644 index 0000000000..e2e246a982 --- /dev/null +++ b/devstack/plugin.sh @@ -0,0 +1,24 @@ +# DevStack extras script to install Rally + +# Save trace setting +XTRACE=$(set +o | grep xtrace) +set -o xtrace + +source $DEST/rally/devstack/lib/rally + +if [[ "$1" == "source" ]]; then + # Initial source + source $TOP_DIR/lib/rally +elif [[ "$1" == "stack" && "$2" == "install" ]]; then + echo_summary "Installing Rally" + install_rally +elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then + echo_summary "Configuring Rally" + configure_rally +elif [[ "$1" == "stack" && "$2" == "extra" ]]; then + echo_summary "Initializing Rally" + init_rally +fi + +# Restore xtrace +$XTRACE diff --git a/devstack/settings b/devstack/settings new file mode 100644 index 0000000000..7500844204 --- /dev/null +++ b/devstack/settings @@ -0,0 +1,3 @@ +# Devstack settings + +enable_service rally diff --git a/rally-jobs/rally.yaml b/rally-jobs/rally.yaml index e4710c301f..2aae1ac25d 100644 --- a/rally-jobs/rally.yaml +++ b/rally-jobs/rally.yaml @@ -590,37 +590,6 @@ sla: failure_rate: max: 0 - - - - args: - sleep: 0.01 - runner: - type: "constant" - times: 1 - concurrency: 1 - context: - quotas: - nova: - instances: 200 - cores: 200 - ram: -1 - floating_ips: 200 - fixed_ips: 200 - metadata_items: -1 - injected_files: -1 - injected_file_content_bytes: -1 - injected_file_path_bytes: -1 - key_pairs: 500 - security_groups: 400 - security_group_rules: 600 - cinder: - gigabytes: -1 - snapshots: -1 - volumes: -1 - sla: - failure_rate: - max: 0 - - args: sleep: 0.01 @@ -809,40 +778,6 @@ failure_rate: max: 0 - SaharaNodeGroupTemplates.create_and_list_node_group_templates: - - - args: - flavor: - name: "m1.small" - runner: - type: "constant" - times: 20 - concurrency: 20 - context: - users: - tenants: 1 - users_per_tenant: 1 - sla: - failure_rate: - max: 0 - - SaharaNodeGroupTemplates.create_delete_node_group_templates: - - - args: - flavor: - name: "m1.small" - runner: - type: "constant" - times: 20 - concurrency: 20 - context: - users: - tenants: 1 - users_per_tenant: 1 - sla: - failure_rate: - max: 0 - Authenticate.validate_glance: - args: diff --git a/tests/ci/rally-gate.sh b/tests/ci/rally-gate.sh index b77e3cfc96..abbb541a3e 100755 --- a/tests/ci/rally-gate.sh +++ b/tests/ci/rally-gate.sh @@ -21,6 +21,10 @@ if [ ! -d $RALLY_JOB_DIR ]; then RALLY_JOB_DIR=$BASE/new/$PROJECT/rally-jobs fi +echo $RALLY_JOB_DIR +echo $RALLY_DIR +ls $BASE/new/$PROJECT + BASE_FOR_TASK=${RALLY_JOB_DIR}/${RALLY_SCENARIO} TASK=${BASE_FOR_TASK}.yaml