diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 692c203..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.tox -.build -*.pyc -*.rpm diff --git a/LICENSE b/LICENSE deleted file mode 100644 index e06d208..0000000 --- a/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/README.md b/README.md deleted file mode 100644 index d88a53f..0000000 --- a/README.md +++ /dev/null @@ -1,35 +0,0 @@ -Openstack Rally plugin -======================= - -Provides a separate role for deployment of the Rally benchmarking tool - -Building the plugin -------------------- - -1. Clone the fuel-plugin repo: - - ``git clone https://review.openstack.org/openstack/fuel-plugin-rally`` - -2. Install the Fuel Plugin Builder: - - ``pip install fuel-plugin-builder`` - -3. Build Rally Fuel plugin: - - ``fpb --build fuel-plugin-rally/`` - -4. The fuel-plugin-rally-.rpm plugin package will be created in the plugin folder - (uel-plugin-rally/). - -5. Move this file to the Fuel Master node with secure copy (scp): - - ``scp fuel-plugin-rally/fuel-plugin-rally-.rpm root@::/tmp`` - ``ssh root@:`` - ``cd /tmp`` - -6. Install the Ceilometer Rallyre plugin: - - ``fuel plugins --install fuel-plugin-rally-.rpm`` - -7. Plugin is ready to be used and can be enabled on the Settings tab of the Fuel web UI. - diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..86e34d6 --- /dev/null +++ b/README.rst @@ -0,0 +1,10 @@ +This project is no longer maintained. + +The contents of this repository are still available in the Git +source code management system. To see the contents of this +repository before it reached its end of life, please check out the +previous commit with "git checkout HEAD^1". + +For any further questions, please email +openstack-discuss@lists.openstack.org or join #openstack-dev on +Freenode. diff --git a/deployment_scripts/puppet/manifests/deploy.pp b/deployment_scripts/puppet/manifests/deploy.pp deleted file mode 100644 index fbc2ade..0000000 --- a/deployment_scripts/puppet/manifests/deploy.pp +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -include rally \ No newline at end of file diff --git a/deployment_scripts/puppet/manifests/hiera_override.pp b/deployment_scripts/puppet/manifests/hiera_override.pp deleted file mode 100644 index 04bacb1..0000000 --- a/deployment_scripts/puppet/manifests/hiera_override.pp +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 2016 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -$plugin_name = 'fuel-plugin-rally' - -$rally_hash = hiera_hash('fuel-plugin-rally', undef) - -if $rally_hash { - - if ($rally_hash['repository_type'] == 'default') { - $repository_url = 'https://github.com/openstack/rally' - $repository_tag = $rally_hash['repository_tag'] - } else { - $repository_url = $rally_hash['repository_custom'] - $repository_tag = $rally_hash['repository_custom_tag'] - } - - $public_ssl = hiera_hash('public_ssl', undef) - $proto = $public_ssl['services'] ? { - true => 'https', - default => 'http', - } - $public_hostname = $public_ssl['hostname'] - $public_vip = hiera('public_vip', undef) - $auth_url = "${proto}://${public_vip}:5000/v2.0" - - $access_hash = hiera_hash('access', undef) - $username = $access_hash['user'] - $password = $access_hash['password'] - $tenant_name = $access_hash['tenant'] - - $hiera_file = "/etc/hiera/plugins/${plugin_name}.yaml" - - $calculated_content = inline_template(' ---- -rally::repository_url: <%= @repository_url %> -rally::repository_tag: <%= @repository_tag %> -rally::auth_url: <%= @auth_url %> -rally::public_hostname: <%= @public_hostname %> -rally::public_vip: <%= @public_vip %> -rally::username: <%= @username %> -rally::password: <%= @password %> -rally::tenant_name: <%= @tenant_name %> -') - - file { '/etc/hiera/plugins': - ensure => 'directory', - } -> - file { "${hiera_file}": - ensure => file, - content => $calculated_content, - } -} diff --git a/deployment_scripts/puppet/modules/rally/files/install_rally.sh b/deployment_scripts/puppet/modules/rally/files/install_rally.sh deleted file mode 100644 index b99a43a..0000000 --- a/deployment_scripts/puppet/modules/rally/files/install_rally.sh +++ /dev/null @@ -1,813 +0,0 @@ -#!/usr/bin/env bash -# -# This script installs Rally. -# Specifically, it is able to install and configure -# Rally either globally (system-wide), or isolated in -# a virtual environment using the virtualenv tool. -# -# NOTE: The script assumes that you have the following -# programs already installed: -# -> Python 2.6, Python 2.7 or Python 3.4 - -set -e - -PROG=$(basename "${0}") - -running_as_root() { - test "$(/usr/bin/id -u)" -eq 0 -} - -VERBOSE="" -ASKCONFIRMATION=1 -RECREATEDEST="ask" -USEVIRTUALENV="yes" -DEVELOPMENT_MODE="false" - -# ansi colors for formatting heredoc -ESC=$(printf "\e") -GREEN="$ESC[0;32m" -NO_COLOR="$ESC[0;0m" -RED="$ESC[0;31m" - -PYTHON2=$(which python || true) -PYTHON3=$(which python3 || true) -PYTHON=${PYTHON2:-$PYTHON3} -BASE_PIP_URL=${BASE_PIP_URL:-"https://pypi.python.org/simple"} -VIRTUALENV_191_URL="https://raw.github.com/pypa/virtualenv/1.9.1/virtualenv.py" - -RALLY_GIT_URL="https://git.openstack.org/openstack/rally" -RALLY_GIT_BRANCH="master" -RALLY_CONFIGURATION_DIR=/etc/rally -RALLY_DATABASE_DIR=/var/lib/rally/database -DBTYPE=sqlite -DBNAME=rally.sqlite - -# Variable used by script_interrupted to know what to cleanup -CURRENT_ACTION="none" - -## Exit status codes (mostly following ) -# successful exit -EX_OK=0 - -# wrong command-line invocation -EX_USAGE=64 - -# missing dependencies (e.g., no C compiler) -EX_UNAVAILABLE=69 - -# wrong python version -EX_SOFTWARE=70 - -# cannot create directory or file -EX_CANTCREAT=73 - -# user aborted operations -EX_TEMPFAIL=75 - -# misused as: unexpected error in some script we call -EX_PROTOCOL=76 - -# abort RC [MSG] -# -# Print error message MSG and abort shell execution with exit code RC. -# If MSG is not given, read it from STDIN. -# -abort () { - local rc="$1" - shift - (echo -en "$RED$PROG: ERROR: $NO_COLOR"; - if [ $# -gt 0 ]; then echo "$@"; else cat; fi) 1>&2 - exit "$rc" -} - -# die RC HEADER <<... -# -# Print an error message with the given header, then abort shell -# execution with exit code RC. Additional text for the error message -# *must* be passed on STDIN. -# -die () { - local rc="$1" - header="$2" - shift 2 - cat 1>&2 <<__EOF__ -$RED========================================================== -$PROG: ERROR: $header -========================================================== -$NO_COLOR -__EOF__ - if [ $# -gt 0 ]; then - # print remaining arguments one per line - for line in "$@"; do - echo "$line" 1>&2; - done - else - # additional message text provided on STDIN - cat 1>&2; - fi - cat 1>&2 <<__EOF__ - -If the above does not help you resolve the issue, please contact the -Rally team by sending an email to the OpenStack mailing list -openstack-dev@lists.openstack.org. Include the full output of this -script to help us identifying the problem. -$RED -Aborting installation!$NO_COLOR -__EOF__ - exit "$rc" -} - -script_interrupted () { - echo "Interrupted by the user. Cleaning up..." - [ -n "${VIRTUAL_ENV}" -a "${VIRTUAL_ENV}" == "$VENVDIR" ] && deactivate - - case $CURRENT_ACTION in - creating_venv|venv-created) - if [ -d "$VENVDIR" ] - then - if ask_yn "Do you want to delete the virtual environment in '$VENVDIR'?" - then - rm -rf "$VENVDIR" - fi - fi - ;; - downloading-src|src-downloaded) - # This is only relevant when installing with --system, - # otherwise the git repository is cloned into the - # virtualenv directory - if [ -d "$SOURCEDIR" ] - then - if ask_yn "Do you want to delete the downloaded source in '$SOURCEDIR'?" - then - rm -rf "$SOURCEDIR" - fi - fi - ;; - esac - - abort $EX_TEMPFAIL "Script interrupted by the user" -} - -trap script_interrupted SIGINT - -print_usage () { - cat <<__EOF__ -Usage: $PROG [options] - -This script will install Rally in your system. - -Options: -$GREEN -h, --help $NO_COLOR Print this help text -$GREEN -v, --verbose $NO_COLOR Verbose mode -$GREEN -s, --system $NO_COLOR Install system-wide. -$GREEN -d, --target DIRECTORY$NO_COLOR Install Rally virtual environment into DIRECTORY. - (Default: $HOME/rally if not root). -$GREEN --url $NO_COLOR Git repository public URL to download Rally from. - This is useful when you have only installation script and want to install Rally - from custom repository. - (Default: ${RALLY_GIT_URL}). - (Ignored when you are already in git repository). -$GREEN --branch $NO_COLOR Git branch name, tag (Rally release), commit hash, ref, or other - tree-ish to install. (Default: master) - Ignored when you are already in git repository. -$GREEN -f, --overwrite $NO_COLOR Deprecated. Use -r instead. -$GREEN -r, --recreate $NO_COLOR Remove target directory if it already exist. - If neither '-r' nor '-R' is set default behaviour is to ask. -$GREEN -R, --no-recreate $NO_COLOR Do not remove target directory if it already exist. - If neither '-r' nor '-R' is set default behaviour is to ask. -$GREEN -y, --yes $NO_COLOR Do not ask for confirmation: assume a 'yes' reply - to every question. -$GREEN -D, --dbtype TYPE $NO_COLOR Select the database type. TYPE can be one of - 'sqlite', 'mysql', 'postgres'. - Default: sqlite -$GREEN --db-user USER $NO_COLOR Database user to use. Only used when --dbtype - is either 'mysql' or 'postgres'. -$GREEN --db-password PASSWORD$NO_COLOR Password of the database user. Only used when - --dbtype is either 'mysql' or 'postgres'. -$GREEN --db-host HOST $NO_COLOR Database host. Only used when --dbtype is - either 'mysql' or 'postgres' -$GREEN --db-name NAME $NO_COLOR Name of the database. Only used when --dbtype is - either 'mysql' or 'postgres' -$GREEN -p, --python EXE $NO_COLOR The python interpreter to use. Default: $PYTHON -$GREEN --develop $NO_COLOR Install Rally with editable source code try. - (Default: false) -$GREEN --no-color $NO_COLOR Disable output coloring. - -__EOF__ -} - -# ask_yn PROMPT -# -# Ask a Yes/no question preceded by PROMPT. -# Set the env. variable REPLY to 'yes' or 'no' -# and return 0 or 1 depending on the users' -# answer. -# -ask_yn () { - if [ $ASKCONFIRMATION -eq 0 ]; then - # assume 'yes' - REPLY='yes' - return 0 - fi - while true; do - read -p "$1 [yN] " REPLY - case "$REPLY" in - [Yy]*) REPLY='yes'; return 0 ;; - [Nn]*|'') REPLY='no'; return 1 ;; - *) echo "Please type 'y' (yes) or 'n' (no)." ;; - esac - done -} - -have_command () { - type "$1" >/dev/null 2>/dev/null -} - -require_command () { - if ! have_command "$1"; then - abort 1 "Could not find required command '$1' in system PATH. Aborting." - fi -} - -require_python () { - require_command "$PYTHON" - if "$PYTHON" -c 'import sys; sys.exit(sys.version_info[:2] >= (2, 6))' - then - die $EX_UNAVAILABLE "Wrong version of python is installed" <<__EOF__ - -Rally requires Python version 2.6+. Unfortunately, we do not support -your version of python: $("$PYTHON" -V 2>&1 | sed 's/python//gi'). - -If a version of Python suitable for using Rally is present in some -non-standard location, you can specify it from the command line by -running this script again with option '--python' followed by the path of -the correct 'python' binary. -__EOF__ - fi -} - -have_sw_package () { - # instead of guessing which distribution this is, we check for the - # package manager name as it basically identifies the distro - if have_command dpkg; then - (dpkg -l "$1" | egrep -q ^i ) >/dev/null 2>/dev/null - elif have_command rpm; then - rpm -q "$1" >/dev/null 2>/dev/null - fi -} - -which_missing_packages () { - local missing='' - for pkgname in "$@"; do - if have_sw_package "$pkgname"; then - continue; - else - missing="$missing $pkgname" - fi - done - echo "$missing" -} - -# Download command -download() { - wget -nv $VERBOSE --no-check-certificate -O "$@"; -} - -install_required_sw () { - # instead of guessing which distribution this is, we check for the - # package manager name as it basically identifies the distro - local missing pkg_manager - if have_command apt-get; then - # Debian/Ubuntu - missing=$(which_missing_packages build-essential libssl-dev libffi-dev python-dev libxml2-dev libxslt1-dev libpq-dev git wget) - - if [ "$ASKCONFIRMATION" -eq 0 ]; then - pkg_manager="apt-get install --yes" - else - pkg_manager="apt-get install" - fi - elif have_command dnf; then - # dnf based RHEL/CentOS/Fedora - missing=$(which_missing_packages gcc libffi-devel python-devel openssl-devel gmp-devel libxml2-devel libxslt-devel postgresql-devel redhat-rpm-config git wget) - - if [ "$ASKCONFIRMATION" -eq 0 ]; then - pkg_manager="dnf install -y" - else - pkg_manager="dnf install" - fi - elif have_command yum; then - # yum based RHEL/CentOS/Fedora - missing=$(which_missing_packages gcc libffi-devel python-devel openssl-devel gmp-devel libxml2-devel libxslt-devel postgresql-devel redhat-rpm-config git wget) - - if [ "$ASKCONFIRMATION" -eq 0 ]; then - pkg_manager="yum install -y" - else - pkg_manager="yum install" - fi - elif have_command zypper; then - # SuSE - missing=$(which_missing_packages gcc libffi48-devel python-devel openssl-devel gmp-devel libxml2-devel libxslt-devel postgresql93-devel git wget) - - if [ "$ASKCONFIRMATION" -eq 0 ]; then - pkg_manager="zypper -n --no-gpg-checks --non-interactive install --auto-agree-with-licenses" - else - pkg_manager="zypper install" - fi - else - # MacOSX maybe? - echo "Cannot determine what package manager this system has, so I cannot check if requisite software is installed. I'm proceeding anyway, but you may run into errors later." - fi - if ! have_command pip; then - missing="$missing python-pip" - fi - - if [ -n "$missing" ]; then - cat <<__EOF__ -The following software packages need to be installed -in order for Rally to work:$GREEN $missing -$NO_COLOR -__EOF__ - - # If we are root - if running_as_root; then - cat <<__EOF__ -In order to install the required software you would need to run as -'root' the following command: -$GREEN - $pkg_manager $missing -$NO_COLOR -__EOF__ - # ask if we have to install it - if ask_yn "Do you want me to install these packages for you?"; then - # install - if [[ "$missing" == *python-pip* ]]; then - missing=${missing//python-pip/} - if ! $pkg_manager python-pip; then - if ask_yn "Error installing python-pip. Install from external source?"; then - local pdir=$(mktemp /tmp/tmp.XXXXXXXXXX -d) - local getpip="$pdir/get-pip.py" - download "$getpip" https://bootstrap.pypa.io/get-pip.py - if ! "$PYTHON" "$getpip"; then - abort $EX_PROTOCOL "Error while installing python-pip from external source." - fi - else - abort $EX_TEMPFAIL \ - "Please install python-pip manually." - fi - fi - fi - if ! $pkg_manager $missing; then - abort $EX_UNAVAILABLE "Error while installing $missing" - fi - # installation successful - else # don't want to install the packages - die $EX_UNAVAILABLE "missing software prerequisites" <<__EOF__ -Please, install the required software before installing Rally - -__EOF__ - fi - else # Not running as root - cat <<__EOF__ -There is a small chance that the required software -is actually installed though we failed to detect it, -so you may choose to proceed with Rally installation -anyway. Be warned however, that continuing is very -likely to fail! - -__EOF__ - if ask_yn "Proceed with installation anyway?" - then - echo "Proceeding with installation at your request... keep fingers crossed!" - else - die $EX_UNAVAILABLE "missing software prerequisites" <<__EOF__ -Please ask your system administrator to install the missing packages, -or, if you have root access, you can do that by running the following -command from the 'root' account: -$GREEN - $pkg_manager $missing -$NO_COLOR -__EOF__ - fi - fi - fi - -} - -install_db_connector () { - case $DBTYPE in - mysql) - pip install pymysql - ;; - postgres) - pip install psycopg2 - ;; - esac -} - -install_virtualenv () { - DESTDIR=$1 - - if [ -n "$VIRTUAL_ENV" ]; then - die $EX_SOFTWARE "Virtualenv already active" <<__EOF__ -A virtual environment seems to be already active. This will cause -this script to FAIL. - -Run 'deactivate', then run this script again. -__EOF__ - fi - - # Use the latest virtualenv that can use `.tar.gz` files - VIRTUALENV_DST="$DESTDIR/virtualenv-191.py" - mkdir -p "$DESTDIR" - download "$VIRTUALENV_DST" "$VIRTUALENV_191_URL" - "$PYTHON" "$VIRTUALENV_DST" $VERBOSE -p "$PYTHON" "$DESTDIR" - - cd "${DESTDIR}" && . bin/activate - - # Setuptools>=0.8 is required to support "wheel" format, otherwise - # pip will fail with an error. To be sure, just run upgrade to the - # recent version of setuptools - download - https://bootstrap.pypa.io/ez_setup.py | python - --insecure\ - || die ${EX_SOFTWARE}\ - "Failed to install the latest version of Python 'setuptools'" <<__EOF__ - -The required Python package setuptools could not be installed. - -__EOF__ -} - -setup_rally_configuration () { - SRCDIR=$1 - ETCDIR=$RALLY_CONFIGURATION_DIR - DBDIR=$RALLY_DATABASE_DIR - - [ -d "$ETCDIR" ] || mkdir -p "$ETCDIR" - cp "$SRCDIR"/etc/rally/rally.conf.sample "$ETCDIR"/rally.conf - - [ -d "$DBDIR" ] || mkdir -p "$DBDIR" - local CONF_TMPFILE=$(mktemp /tmp/tmp.XXXXXXXXXX) - sed "s|#connection *=.*|connection = \"$DBCONNSTRING\"|" "$ETCDIR"/rally.conf > "$CONF_TMPFILE" - cat "$CONF_TMPFILE" > "$ETCDIR"/rally.conf - rm "$CONF_TMPFILE" - rally-manage db recreate -} - -rally_venv () { - echo "Installing Rally virtualenv in directory '$VENVDIR' ..." - CURRENT_ACTION="creating-venv" - if ! install_virtualenv "$VENVDIR"; then - die $EX_PROTOCOL "Unable to create a new virtualenv in '$VENVDIR': 'virtualenv.py' script exited with code $rc." <<__EOF__ -The script was unable to create a valid virtual environment. -__EOF__ - fi - CURRENT_ACTION="venv-created" - rc=0 -} - -### Main program ### -short_opts='d:vsyfrRhD:p:' -long_opts='target:,verbose,overwrite,recreate,no-recreate,system,yes,dbtype:,python:,db-user:,db-password:,db-host:,db-name:,help,url:,branch:,develop,no-color' - -set +e -if [ "x$(getopt -T)" = 'x' ]; then - # GNU getopt - args=$(getopt --name "$PROG" --shell sh -l "$long_opts" -o "$short_opts" -- "$@") - if [ $? -ne 0 ]; then - abort 1 "Type '$PROG --help' to get usage information." - fi - # use 'eval' to remove getopt quoting - eval set -- "$args" -else - # old-style getopt, use compatibility syntax - args=$(getopt "$short_opts" "$@") - if [ $? -ne 0 ]; then - abort 1 "Type '$PROG -h' to get usage information." - fi - eval set -- "$args" -fi -set -e - -# Command line parsing -while true -do - case "$1" in - -d|--target) - shift - VENVDIR=$(readlink -m "$1") - ;; - -h|--help) - print_usage - exit $EX_OK - ;; - -v|--verbose) - VERBOSE="-v" - ;; - -s|--system) - USEVIRTUALENV="no" - ;; - -f|--overwrite) - RECREATEDEST=yes - ;; - -r|--recreate) - RECREATEDEST=yes - ;; - -R|--no-recreate) - RECREATEDEST=no - ;; - -y|--yes) - ASKCONFIRMATION=0 - ;; - --url) - shift - RALLY_GIT_URL=$1 - ;; - --branch) - shift - RALLY_GIT_BRANCH=$1 - ;; - -D|--dbtype) - shift - DBTYPE=$1 - case $DBTYPE in - sqlite|mysql|postgres);; - *) - print_usage | die $EX_USAGE \ - "An invalid option has been detected." - ;; - esac - ;; - --db-user) - shift - DBUSER=$1 - ;; - --db-password) - shift - DBPASSWORD=$1 - ;; - --db-host) - shift - DBHOST=$1 - ;; - --db-name) - shift - DBNAME=$1 - ;; - -p|--python) - shift - PYTHON=$1 - ;; - --develop) - DEVELOPMENT_MODE=true - ;; - --no-color) - RED="" - GREEN="" - NO_COLOR="" - ;; - --) - shift - break - ;; - *) - print_usage | die $EX_USAGE "An invalid option has been detected." - esac - shift -done - -### Post-processing ### - -if [ "$USEVIRTUALENV" == "no" ] && [ -n "$VENVDIR" ]; then - die $EX_USAGE "Ambiguous arguments" <<__EOF__ -Option -d/--target can not be used with --system. -__EOF__ -fi - -if running_as_root; then - if [ -z "$VENVDIR" ]; then - USEVIRTUALENV='no' - fi -else - if [ "$USEVIRTUALENV" == 'no' ]; then - die $EX_USAGE "Insufficient privileges" <<__EOF__ -$REDRoot permissions required in order to install system-wide. -As non-root user you may only install in virtualenv.$NO_COLOR -__EOF__ - fi - if [ -z "$VENVDIR" ]; then - VENVDIR="$HOME"/rally - fi -fi - -# Fix RALLY_DATABASE_DIR if virtualenv is used -if [ "$USEVIRTUALENV" = 'yes' ] -then - RALLY_CONFIGURATION_DIR=$VENVDIR/etc/rally - RALLY_DATABASE_DIR="$VENVDIR"/database -fi - -if [ "$DBTYPE" = 'sqlite' ]; then - if [ "${DBNAME:0:1}" = '/' ]; then - DBFILE="$DBNAME" - else - DBFILE="${RALLY_DATABASE_DIR}/${DBNAME}" - fi - DBCONNSTRING="sqlite:///${DBFILE}" -else - if [ -z "$DBUSER" -o -z "$DBPASSWORD" -o -z "$DBHOST" -o -z "$DBNAME" ] - then - die $EX_USAGE "Missing mandatory options" <<__EOF__ -When specifying a database type different than 'sqlite', you also have -to specify the database name, host, and username and password of a -valid user with write access to the database. - -Please, re-run the script with valid values for the options: -$GREEN - --db-host - --db-name - --db-user - --db-password$NO_COLOR -__EOF__ - fi - DBAUTH="$DBUSER:$DBPASSWORD@$DBHOST" - if [ "$DBTYPE" = 'mysql' ]; then - DBCONNSTRING="$DBTYPE+pymysql://$DBAUTH/$DBNAME" - else - DBCONNSTRING="$DBTYPE://$DBAUTH/$DBNAME" - fi -fi - -# check and install prerequisites -install_required_sw -require_python - - -# Install virtualenv, if required -if [ "$USEVIRTUALENV" = 'yes' ]; then - if [ -d "$VENVDIR" ] - then - if [ $RECREATEDEST = 'ask' ]; then - echo "Destination directory '$VENVDIR' already exists." - echo "I can wipe it out in order to make a new installation," - echo "but this means any files in that directory, and the ones" - echo "underneath it will be deleted." - echo - - if ! ask_yn "Do you want to wipe the installation directory '$VENVDIR'?" - then - echo "*Not* overwriting destination directory '$VENVDIR'." - RECREATEDEST=no - else - RECREATEDEST=yes - - fi - fi - - if [ $RECREATEDEST = 'yes' ]; - then - echo "Removing directory $VENVDIR as requested." - rm $VERBOSE -rf "$VENVDIR" - rally_venv - elif [ $RECREATEDEST = 'no' ]; - then - echo "Using existing virtualenv at $VENVDIR..." - . "$VENVDIR"/bin/activate - else - abort 66 "Internal error: unexpected value '$RECREATEDEST' for RECREATEDEST." - fi - else - rally_venv - fi -fi - -# Install rally -ORIG_WD=$(pwd) - -BASEDIR=$(dirname "$(readlink -e "$0")") - -# If we are inside the git repo, don't download it again. -if [ -d "$BASEDIR"/.git ] -then - SOURCEDIR=$BASEDIR - ( - cd "$BASEDIR" - if find . -name '*.py[co]' -exec rm -f {} +; then - echo "Wiped python compiled files." - else - echo "Warning! Unable to wipe python compiled files" - fi - ) -else - if [ "$USEVIRTUALENV" = 'yes' ] - then - SOURCEDIR="$VENVDIR"/src - else - SOURCEDIR="$ORIG_WD"/rally.git - fi - - if ! [ -d "$SOURCEDIR"/.git ] - then - echo "Downloading Rally from git repository $RALLY_GIT_URL ..." - CURRENT_ACTION="downloading-src" - git clone "$RALLY_GIT_URL" "$SOURCEDIR" - ( - cd "$SOURCEDIR" - git checkout "$RALLY_GIT_BRANCH" - ) - if ! [ -d "$SOURCEDIR"/.git ]; then - abort $EX_CANTCREAT "Unable to download git repository" - fi - CURRENT_ACTION="src-downloaded" - fi -fi - -install_db_connector - -# Install rally -cd "$SOURCEDIR" -# Get latest available pip and reset shell cache -pip install -i "$BASE_PIP_URL" -U 'pip!=8' -hash -r - -# Install dependencies -pip install -i "$BASE_PIP_URL" pbr 'tox<=1.6.1' -# Uninstall possible previous version -pip uninstall -y rally || true -# Install rally -if [ "$DEVELOPMENT_MODE" = "true" ]; then - pip install -i "$BASE_PIP_URL" -e . -else - pip install -i "$BASE_PIP_URL" . -fi - -cd "$ORIG_WD" - -# Post-installation -if [ "$USEVIRTUALENV" = 'yes' ] -then - # Fix bash_completion - cat >> "$VENVDIR"/bin/activate <<__EOF__ - -. "$VENVDIR/etc/bash_completion.d/rally.bash_completion" -__EOF__ - - setup_rally_configuration "$SOURCEDIR" - - if ! [ "$DEVELOPMENT_MODE" = "true" ]; then - SAMPLESDIR=$VENVDIR/samples - mkdir -p "$SAMPLESDIR" - cp -r "$SOURCEDIR"/samples/* "$SAMPLESDIR"/ - fi - mkdir -p "$VENVDIR"/etc/bash_completion.d - install "$SOURCEDIR"/etc/rally.bash_completion \ - "$VENVDIR"/etc/bash_completion.d/ - - cat <<__EOF__ -$GREEN============================== -Installation of Rally is done! -============================== -$NO_COLOR -In order to work with Rally you have to enable the virtual environment -with the command: - - . $VENVDIR/bin/activate - -You need to run the above command on every new shell you open before -using Rally, but just once per session. - -Information about your Rally installation: - - * Method:$GREEN virtualenv$NO_COLOR - * Virtual Environment at:$GREEN $VENVDIR$NO_COLOR - * Database at:$GREEN $RALLY_DATABASE_DIR$NO_COLOR - * Configuration file at:$GREEN $RALLY_CONFIGURATION_DIR$NO_COLOR - * Samples at:$GREEN $SAMPLESDIR$NO_COLOR - -__EOF__ -else - setup_rally_configuration "$SOURCEDIR" - - if ! [ "$DEVELOPMENT_MODE" = "true" ]; then - SAMPLESDIR=/usr/share/rally/samples - mkdir -p "$SAMPLESDIR" - cp -r "$SOURCEDIR"/samples/* "$SAMPLESDIR"/ - fi - ln -s /usr/local/etc/bash_completion.d/rally.bash_completion \ - /etc/bash_completion.d/ 2> /dev/null || true - if [ -f "${DBFILE}" ]; then - chmod 777 "$DBFILE" - fi - - cat <<__EOF__ -$GREEN============================== -Installation of Rally is done! -============================== -$NO_COLOR -Rally is now installed in your system. Information about your Rally -installation: - - * Method:$GREEN system$NO_COLOR - * Database at:$GREEN $RALLY_DATABASE_DIR$NO_COLOR - * Configuration file at:$GREEN $RALLY_CONFIGURATION_DIR$NO_COLOR - * Samples at:$GREEN $SAMPLESDIR$NO_COLOR -__EOF__ -fi diff --git a/deployment_scripts/puppet/modules/rally/manifests/config.pp b/deployment_scripts/puppet/modules/rally/manifests/config.pp deleted file mode 100644 index 3f382ae..0000000 --- a/deployment_scripts/puppet/modules/rally/manifests/config.pp +++ /dev/null @@ -1,96 +0,0 @@ -# Class: rally::config -# -# This class configures rally tool and creates existing deployment - -class rally::config inherits rally { - - $rally_config = '/etc/rally/rally.conf' - $rally_deployment = 'existing' - $rally_deployment_config = '/etc/rally/deployment/existing.json' - - $rally_hostname = hiera('rally::public_hostname') - $rally_vip = hiera('rally::public_vip') - - $fuel_version = hiera('fuel_version') - - host { "${rally_hostname}": - ensure => present, - ip => $rally_vip, - } - - define rally_deployment_configuration($rally_config, $key, $value) { - augeas { "${rally_config}_${key}": - lens => "Puppet.lns", - incl => "${rally_config}", - context => "/files/${rally_config}/DEFAULT/", - onlyif => "get $key != '$value'", - changes => [ - "ins $key after #comment[. =~ regexp('$key = .*')]", - "set $key $value", - ], - } - } - - $rally_deployment_config_values = { - - verbose => { - key => 'verbose', - value => 'true', - }, - log_dir => { - key => 'log_dir', - value => '/var/log/rally/' }, - } - - $defaults = { - rally_config => $rally_config, - before => Exec['register_deployment'], - } - - create_resources(rally_deployment_configuration, $rally_deployment_config_values, $defaults) - - file { "$rally_deployment_config_values['log_dir']['key']": - ensure => directory, - path => $rally_deployment_config_values['log_dir']['value'], - } - - file {'deployment': - ensure => directory, - path => '/etc/rally/deployment' - } -> - file { "${rally_deployment_config}": - ensure => file, - content => template('rally/existing.json.erb'), - owner => $rally::rally_user, - group => $rally::rally_group, - mode => '0644', - } - - $cmd = "/usr/local/bin/rally deployment create \ - --file=${rally_deployment_config} \ - --name ${rally_deployment}" - - exec { 'dependencies_upgrade': - command => 'pip install --upgrade "python-keystoneclient>=2.0.0"', - path => ['/usr/bin', '/usr/sbin'], - timeout => 100, - before => Exec['register_deployment'], - onlyif => 'test "$fuel_version" = "8.0"', - } - - exec { 'register_deployment': - command => $cmd, - path => [ - '/bin', - '/sbin', - '/usr/bin', - '/usr/sbin', - '/usr/local/bin', - ], - user => $rally::rally_user, - cwd => $rally::rally_home, - require => File[$rally_deployment_config], - unless => "/usr/local/bin/rally deployment show \ - --deployment ${rally_deployment}", - } -} diff --git a/deployment_scripts/puppet/modules/rally/manifests/init.pp b/deployment_scripts/puppet/modules/rally/manifests/init.pp deleted file mode 100644 index 39561d6..0000000 --- a/deployment_scripts/puppet/modules/rally/manifests/init.pp +++ /dev/null @@ -1,24 +0,0 @@ -# == Class: rally -# -# Install and configure a Rally node -# -# === Parameters -# -# See below for a complete list of parameters accepted. - -class rally ( - $repository_url = $rally::params::repository_url, - $repository_tag = $rally::params::repository_tag, - $auth_url = $rally::params::auth_url, - $public_hostname = $rally::params::public_hostname, - $public_vip = $rally::params::public_vip, - $username = $rally::params::usermame, - $password = $rally::params::password, - $tenant_name = $rally::params::tenant_name, -) inherits rally::params { - - anchor { 'rally::begin': } -> - class { 'rally::install': } -> - class { 'rally::config': } -> - anchor { 'rally::end': } -} diff --git a/deployment_scripts/puppet/modules/rally/manifests/install.pp b/deployment_scripts/puppet/modules/rally/manifests/install.pp deleted file mode 100644 index 2ef467e..0000000 --- a/deployment_scripts/puppet/modules/rally/manifests/install.pp +++ /dev/null @@ -1,46 +0,0 @@ -# == Class: rally::install -# -# Install rally and all it's dependencies - -class rally::install inherits rally { - - $rally_installer = '/tmp/install_rally.sh' - - $cmd = "${rally_installer} \ - --yes \ - --no-color \ - --system \ - --url ${rally::repository_url} \ - --branch ${rally::repository_tag}" - - file { "${rally_installer}": - ensure => file, - mode => '0755', - source => 'puppet:///modules/rally/install_rally.sh', - before => Exec[$rally_installer], - } - - $packages = { - 'libssl-dev' => {}, - 'libffi-dev' => {}, - 'python-dev' => {}, - 'libxml2-dev' => {}, - 'libxslt1-dev' => {}, - 'libpq-dev' => {}, - 'git' => {}, - 'python-pip' => {}, - 'augeas-tools' => {}, - } - $defaults = { - ensure => installed, - before => Exec[$rally_installer], - } - create_resources(package, $packages, $defaults) - - exec { "${rally_installer}": - command => $cmd, - path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin'], - timeout => 500, - unless => 'test -x /usr/local/bin/rally', - } -} diff --git a/deployment_scripts/puppet/modules/rally/manifests/params.pp b/deployment_scripts/puppet/modules/rally/manifests/params.pp deleted file mode 100644 index d5eeb08..0000000 --- a/deployment_scripts/puppet/modules/rally/manifests/params.pp +++ /dev/null @@ -1,14 +0,0 @@ -# Class: rally::params -# -# This class configures parameters for the puppet rally module. - -class rally::params { - $repository_url = 'https://github.com/openstack/rally' - $repository_tag = 'master' - $auth_url = undef - $public_hostname = undef - $public_vip = undef - $username = undef - $password = undef - $tenant_name = undef -} diff --git a/deployment_scripts/puppet/modules/rally/templates/existing.json.erb b/deployment_scripts/puppet/modules/rally/templates/existing.json.erb deleted file mode 100644 index a389d42..0000000 --- a/deployment_scripts/puppet/modules/rally/templates/existing.json.erb +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "ExistingCloud", - "auth_url": "<%= @auth_url %>", - "region_name": "RegionOne", - "endpoint_type": "public", - "admin": { - "username": "<%= @username %>", - "password": "<%= @password %>", - "tenant_name": "<%= @tenant_name %>" - }, - "https_insecure": true, - "https_cacert": "" -} diff --git a/deployment_tasks.yaml b/deployment_tasks.yaml deleted file mode 100644 index ac9ce5b..0000000 --- a/deployment_tasks.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# These tasks will be merged into deployment graph. Here you -# can specify new tasks for any roles, even built-in ones. - -- id: rally - type: group - version: 2.0.0 - role: [rally] - tasks: - - hiera - - setup_repositories - - fuel_pkgs - - globals - - tools - - logging - - netconfig - - hosts - - rally-hiera-override - - rally-deploy - requires: [deploy_start] - required_for: [deploy_end] - parameters: - strategy: - type: one_by_one - - -# Tasks definitions for the deployment -###################################### - -# This task needs to be reexecuted to adapt the configuration parameters which -# depend on the number of nodes in the cluster -- id: rally-hiera-override - type: puppet - version: 2.0.0 - requires: [netconfig] - required_for: [deploy_end] - parameters: - puppet_manifest: "puppet/manifests/hiera_override.pp" - puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 120 - -- id: rally-deploy - type: puppet - version: 2.0.0 - role: [rally] - requires: [netconfig] - required_for: [deploy_end] - parameters: - puppet_manifest: puppet/manifests/deploy.pp - puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 600 \ No newline at end of file diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 567609b..0000000 --- a/doc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build/ diff --git a/doc/source/appendix.rst b/doc/source/appendix.rst deleted file mode 100644 index e1e5816..0000000 --- a/doc/source/appendix.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _user_appendix: - -Appendix -======== - -* The `Rally plugin `_ project at GitHub. -* The official `Rally documentation `_. diff --git a/doc/source/index.rst b/doc/source/index.rst deleted file mode 100644 index 630497d..0000000 --- a/doc/source/index.rst +++ /dev/null @@ -1,21 +0,0 @@ -============================================================================ -Welcome to the Mirantis OpenStack Rally Plugin Documentation! -============================================================================ - -User documentation -================== - -.. toctree:: - :maxdepth: 2 - - overview - releases - installation - user - licenses - appendix - -Indices and Tables -================== - -* :ref:`search` diff --git a/doc/source/installation.rst b/doc/source/installation.rst deleted file mode 100644 index f84ecb7..0000000 --- a/doc/source/installation.rst +++ /dev/null @@ -1,79 +0,0 @@ -.. _user_installation: - -Installation Guide -================== - -Rally Fuel Plugin install using the RPM file of the Fuel Plugins Catalog ---------------------------------------------------------------------------------------- - -To install the Rally Fuel Plugin using the RPM file of the Fuel Plugins -Catalog, you need to follow these steps: - -1. Download the RPM file from the `Fuel Plugins Catalog `_. - -2. Copy the RPM file to the Fuel Master node:: - - [root@home ~]# scp fuel-plugin-rally-0.1-0.1.0-1.noarch.rpm \ - root@: - -3. Install the plugin using the `Fuel CLI `_:: - - [root@fuel ~]# fuel plugins --install fuel-plugin-rally-0.1-0.1.0-1.noarch.rpm - -4. Verify that the plugin is installed correctly:: - - [root@fuel ~]# fuel plugins --list - id | name | version | package_version - ---|----------------------|---------|---------------- - 1 | fuel-plugin-rally | 0.1.0 | 3.0.0 - -Rally Fuel Plugin install from source ----------------------------------------------------- - -Alternatively, you may want to build the RPM file of the plugin from source -if, for example, you want to test the latest features, modify some built-in -configuration or implement your own customization. -But note that running a Fuel plugin that you have built yourself is at your own risk. - -To install Rally Plugin from source, you first need to prepare an -environment to build the RPM file. -The recommended approach is to build the RPM file directly onto the Fuel Master -node so that you won't have to copy that file later on. - -**Prepare an environment for building the plugin on the Fuel Master Node** - -1. Install the standard Linux development tools:: - - [root@home ~] yum install createrepo rpm rpm-build dpkg-devel - -2. Install the Fuel Plugin Builder. To do that, you should first get pip:: - - [root@home ~] easy_install pip - -3. Then install the Fuel Plugin Builder (the `fpb` command line) with `pip`:: - - [root@home ~] pip install fuel-plugin-builder - -**Note**: You may also need to build the Fuel Plugin Builder if the package version of the -plugin is higher than package version supported by the Fuel Plugin Builder you get from `pypi`. -In this case, please refer to the section "Preparing an environment for plugin development" -of the `Fuel Plugins wiki `_ -if you need further instructions about how to build the Fuel Plugin Builder. - -4. Clone the plugin git repository:: - - [root@home ~] git clone \ - git@github.com:openstack/fuel-plugin-rally.git - -5. Check that the plugin is valid:: - - [root@home ~] fpb --check ./fuel-plugin-rally - -6. And finally, build the plugin:: - - [root@home ~] fpb --build ./fuel-plugin-rally - -7. Now that you have created the RPM file, you can install the plugin using the `fuel plugins --install` command:: - - [root@fuel ~] fuel plugins --install \ - ./fuel-plugin-rally/*.noarch.rpm diff --git a/doc/source/licenses.rst b/doc/source/licenses.rst deleted file mode 100644 index 6cda6e2..0000000 --- a/doc/source/licenses.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. _licenses: - -Licenses -======== - -Third Party Components ----------------------- - -+------------------------+-------------------------------------------------------------+------------+ -| Name | Project Web Site | License | -+========================+=============================================================+============+ -| Rally | https://wiki.openstack.org/wiki/Rally | Apache V2 | -+------------------------+-------------------------------------------------------------+------------+ -| Augeas | http://augeas.net/index.html | LGPL V2 | -+------------------------+-------------------------------------------------------------+------------+ \ No newline at end of file diff --git a/doc/source/overview.rst b/doc/source/overview.rst deleted file mode 100644 index 5d42e42..0000000 --- a/doc/source/overview.rst +++ /dev/null @@ -1,26 +0,0 @@ -.. _user_overview: - -Overview -======== - -The **Rally Fuel Plugin** is used to install and configure -Rally which automates and unifies multi-node OpenStack deployment, cloud verification, benchmarking & profiling. - -.. _plugin_requirements: - -Requirements ------------- - -+------------------------+------------------------------------------------------------------------------------------+ -| **Requirement** | **Version/Comment** | -+========================+==========================================================================================+ -| Disk space | At least 10GB | -+------------------------+------------------------------------------------------------------------------------------+ -| Fuel | Mirantis OpenStack 8.0/9.0 | -+------------------------+------------------------------------------------------------------------------------------+ - - -Limitations ------------ - -A current limitation of this plugin is that it uses system-wide installation only, which requires separate node without other roles, applied for this node. \ No newline at end of file diff --git a/doc/source/releases.rst b/doc/source/releases.rst deleted file mode 100644 index e7c5d1a..0000000 --- a/doc/source/releases.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. _releases: - -Release Notes -============= - -Version 0.1.0 -------------- - -* Initial release of the plugin. This is a beta version. diff --git a/doc/source/user.rst b/doc/source/user.rst deleted file mode 100644 index 690f483..0000000 --- a/doc/source/user.rst +++ /dev/null @@ -1,79 +0,0 @@ -.. _user_guide: - -User Guide -========== - -.. _plugin_configuration: - -Plugin configuration --------------------- - -To configure your plugin, you need to follow these steps: - -1. `Create a new environment `_ - with the Fuel web user interface. - -#. Click on the Settings tab of the Fuel web UI. - -#. Selecto Other item on the left menu and find Rally plugins listing. - -4. Select the Rally Plugin checkbox and fill-in the required fields. - - a. If official repository is used - select master or tag version. - b. If developer repository is used - type valid repository url and proper tag version - -5. Assign the *Rally* role to a new node. - -6. `Configure your environment `_ - as needed. - -#. `Verify the networks `_ on the Networks tab of the Fuel web UI. - -#. `Deploy `_ your changes. - -.. _plugin_install_verification: - -Plugin verification -------------------- - -Be aware, that depending on the number of nodes and deployment setup, -deploying a Mirantis OpenStack environment can typically take anything -from 30 minutes to several hours. - -**Rally** - -Once your deployment has completed, you should verify that Rally is -installed properly by logging into Rally node and executing :: - - rally deployment check existing - -The expected output should look like something like this:: - - keystone endpoints are valid and following services are available: - +-------------+----------------+-----------+ - | services | type | status | - +-------------+----------------+-----------+ - | __unknown__ | artifact | Available | - | __unknown__ | computev3 | Available | - | __unknown__ | volumev2 | Available | - | __unknown__ | volumev3 | Available | - | cinder | volume | Available | - | cloud | cloudformation | Available | - | glance | image | Available | - | heat | orchestration | Available | - | keystone | identity | Available | - | neutron | network | Available | - | nova | compute | Available | - | s3 | s3 | Available | - | swift | object-store | Available | - +-------------+----------------+-----------+ - -**Note:** You can retrieve the IP address where Rally is installed using -the `fuel` command line:: - - [root@fuel ~]# fuel nodes - id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id - ---|--------|------------|---------|-------------|-------------------|------------|---------------|--------|--------- - 9 | ready | rally | 2 | 10.109.10.5 | 2e:2d:42:5e:a0:54 | rally | | True | 2 - 8 | ready | compute | 2 | 10.109.10.7 | 64:3f:1a:41:a6:c4 | compute | | True | 2 - 7 | ready | controller | 2 | 10.109.10.6 | 62:04:8f:5a:69:f9 | controller | | True | 2 \ No newline at end of file diff --git a/environment_config.yaml b/environment_config.yaml deleted file mode 100644 index 140cca0..0000000 --- a/environment_config.yaml +++ /dev/null @@ -1,68 +0,0 @@ -attributes: - metadata: - label: "Rally benchmarking tool" - weight: 90 - - # Repository - repository_type: - type: "radio" - weight: 40 - value: "default" - label: "Choose repository source" - values: - - data: "default" - label: "Official openstack/rally repository" - description: "Released version of rally benchmarking tool" - - data: "custom" - label: "Custom repository" - description: "Specify repository url" - - repository_tag: - type: "select" - weight: 50 - value: "master" - label: "Select master or tag" - description: "Applicable for default repository only" - values: - - data: "master" - label: "master" - - data: "0.5.0" - label: "0.5.0" - - data: "0.4.0" - label: "0.4.0" - - data: "0.3.3" - label: "0.3.3" - - data: "0.3.2" - label: "0.3.2" - - data: "0.3.1" - label: "0.3.1" - - data: "0.3.0" - label: "0.3.0" - - data: "0.2.0" - label: "0.2.0" - restrictions: - - condition: "settings:fuel-plugin-rally.repository_type.value == 'custom'" - action: hide - - repository_custom: - type: "text" - weight: 50 - value: "" - label: "Repository path" - description: "Specify git repository path" - regex: - source: '^(ssh|git|http(s)|git).*$' - error: 'Use http(s)/ssh/git url format' - restrictions: - - condition: "settings:fuel-plugin-rally.repository_type.value == 'default'" - action: hide - - repository_custom_tag: - type: "text" - weight: 60 - value: "master" - label: "Repository tag" - description: "Leave master or specify custom tag" - restrictions: - - condition: "settings:fuel-plugin-rally.repository_type.value == 'default'" - action: hide \ No newline at end of file diff --git a/metadata.yaml b/metadata.yaml deleted file mode 100644 index 0f9d64b..0000000 --- a/metadata.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# Plugin name -name: fuel-plugin-rally -# Human-readable name for your plugin -title: Rally -# Plugin version -version: '0.1.0' -# Description -description: Deploy Rally benchmarking tool -# Required fuel version -fuel_version: ['7.0', '8.0', '9.0'] -# Specify license of your plugin -licenses: ['Apache License Version 2.0'] -# Specify author or company name -authors: ['Mirantis Inc.'] -# A link to the plugin's page -homepage: 'https://bitbucket.org/core_st/fuel-plugin-rally' -# Specify a group which your plugin implements, possible options: -# network, storage, storage::cinder, storage::glance, hypervisor, -# equipment -groups: [] -# Change `false` to `true` if the plugin can be installed in the environment -# after the deployment. -is_hotpluggable: true - -# The plugin is compatible with releases in the list -releases: - - os: ubuntu - version: 2015.1.0-7.0 - mode: ['ha'] - deployment_scripts_path: deployment_scripts/ - repository_path: repositories/ubuntu - - os: ubuntu - version: liberty-8.0 - mode: ['ha'] - deployment_scripts_path: deployment_scripts/ - repository_path: repositories/ubuntu - - os: ubuntu - version: mitaka-9.0 - mode: ['ha'] - deployment_scripts_path: deployment_scripts/ - repository_path: repositories/ubuntu - -# Version of plugin package -package_version: '3.0.0' \ No newline at end of file diff --git a/node_roles.yaml b/node_roles.yaml deleted file mode 100644 index 0804f45..0000000 --- a/node_roles.yaml +++ /dev/null @@ -1,14 +0,0 @@ -rally: - name: 'Rally' - description: 'Install Rally' - has_primary: false - public_ip_required: true - weight: 100 - limits: - max: 1 - recommended: 1 - conflicts: - - compute - - controller - - cinder - - ceph-osd \ No newline at end of file diff --git a/pre_build_hook b/pre_build_hook deleted file mode 100755 index bd1d2c4..0000000 --- a/pre_build_hook +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -set -eux - -ROOT="$(dirname "$(readlink -f "$0")")" -MODULES="${ROOT}"/deployment_scripts/puppet/modules -RPM_REPO="${ROOT}"/repositories/centos/ -DEB_REPO="${ROOT}"/repositories/ubuntu/ - -RALLY_INSTALLER_URL="https://raw.githubusercontent.com/openstack/rally/master/install_rally.sh" -RALLY_INSTALLER_DIR="${MODULES}"/rally/files - -# Downloads needed RPM or DEB packages -function download { - case "$1" in - deb) REPO=$DEB_REPO;; - rpm) REPO=$RPM_REPO;; - esac - shift - - while [ $# -gt 0 ]; do - FILE=$(basename "$1") - wget -qO - "$1" > "$REPO/$FILE" - shift - done -} - -# Packages required for Rally installer -download deb http://mirrors.kernel.org/ubuntu/pool/main/libe/liberror-perl/liberror-perl_0.17-1.1_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/p/python-defaults/libpython-dev_2.7.5-5ubuntu3_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/libx/libxslt/libxslt1-dev_1.1.28-2build1_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/libx/libxslt/libxslt1.1_1.1.28-2build1_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/p/python-defaults/python-dev_2.7.5-5ubuntu3_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/e/e2fsprogs/comerr-dev_2.1-1.42.9-3ubuntu1.3_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/g/git/git_1.9.1-1ubuntu0.3_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/g/git/git-man_1.9.1-1ubuntu0.3_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/k/krb5/krb5-multidev_1.12+dfsg-2ubuntu5.2_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/e/expat/libexpat1-dev_2.1.0-4ubuntu1.3_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi-dev_3.1~rc1+r3.0.13-12ubuntu0.1_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/k/krb5/libgssrpc4_1.12+dfsg-2ubuntu5.2_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/k/krb5/libkadm5clnt-mit9_1.12+dfsg-2ubuntu5.2_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/k/krb5/libkadm5srv-mit9_1.12+dfsg-2ubuntu5.2_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/k/krb5/libkdb5-7_1.12+dfsg-2ubuntu5.2_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/p/postgresql-9.3/libpq-dev_9.3.13-0ubuntu0.14.04_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/p/postgresql-9.3/libpq5_9.3.13-0ubuntu0.14.04_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/p/python2.7/libpython2.7-dev_2.7.6-8ubuntu0.2_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.19_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/o/openssl/libssl-doc_1.0.1f-1ubuntu2.19_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/libx/libxml2/libxml2-dev_2.9.1+dfsg1-3ubuntu4.8_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/h/html5lib/python-html5lib_0.999-3~ubuntu1_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/h/html5lib/python-html5lib-whl_0.999-3~ubuntu1_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/r/requests/python-requests-whl_2.2.1-1ubuntu0.3_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/p/python-setuptools/python-setuptools-whl_3.3-1ubuntu2_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/s/six/python-six-whl_1.5.2-1ubuntu1_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/p/python-urllib3/python-urllib3-whl_1.7.1-1ubuntu4_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/w/wheel/python-wheel_0.24.0-1~ubuntu1_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/p/python2.7/python2.7-dev_2.7.6-8ubuntu0.2_amd64.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/p/python-setuptools/python3-pkg-resources_3.3-1ubuntu2_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/universe/c/chardet-whl/python-chardet-whl_2.2.1-2~ubuntu1_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/universe/p/python-colorama/python-colorama_0.2.5-0.1ubuntu2_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/universe/p/python-colorama/python-colorama-whl_0.2.5-0.1ubuntu2_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/universe/d/distlib/python-distlib_0.1.8-1ubuntu1_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/universe/d/distlib/python-distlib-whl_0.1.8-1ubuntu1_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/universe/p/python-pip/python-pip_1.5.4-1ubuntu4_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/universe/p/python-pip/python-pip-whl_1.5.4-1ubuntu4_all.deb \ - http://mirrors.kernel.org/ubuntu/pool/main/a/augeas/augeas-tools_1.2.0-0ubuntu1_amd64.deb - -# Obtain Rally installer -mkdir -p "${RALLY_INSTALLER_DIR}" -wget -qO- "${RALLY_INSTALLER_URL}" > "${RALLY_INSTALLER_DIR}"/install_rally.sh diff --git a/repositories/centos/.gitkeep b/repositories/centos/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/repositories/ubuntu/.gitkeep b/repositories/ubuntu/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/specs/rally-plugin.rst b/specs/rally-plugin.rst deleted file mode 100644 index 3bd8f75..0000000 --- a/specs/rally-plugin.rst +++ /dev/null @@ -1,114 +0,0 @@ -.. - This work is licensed under a Creative Commons Attribution 3.0 Unported - License. - -http://creativecommons.org/licenses/by/3.0/legalcode - -=============================================== -Fuel plugin to install Rally -=============================================== - -# blueprint link - -Rally is a benchmarking tool that answers the question: “How does OpenStack work at scale?”. To make this possible, Rally automates and unifies multi-node OpenStack deployment, cloud verification, benchmarking & profiling. - -Problem description -=================== - -A QA engineer needs to verfy OpenStack cloud state, benchmark and profile existing infrastracture with Rally - -Proposed change -=============== - -Rally plugin provides separate Fuel role for deploying Rally node in cluster with out-of-box ready for use Rally tool. - -Alternatives ------------- - -* Rally can be installed manually, but this requires: - - - configuration with proper networks - - - system dependency resolution - - - deployment configuration with proper credentials - - -Data model impact ------------------ - -None - -REST API impact ---------------- - -None - -Upgrade impact --------------- - -None - -Security impact ---------------- - -None - -Notifications impact --------------------- - -None - -Other end user impact ---------------------- - -None - -Performance Impact ------------------- - -None - -Other deployer impact ---------------------- - -Rally plugin requires separate node without any other roles - -Developer impact ----------------- - -None - -Implementation -============== - -Assignee(s) ------------ - -Volodymyr Stoiko (developer) -Sergey Kulikov (developer) - - -Work Items ----------- - -* Implement the Rally plugin. - -* Implement the Puppet manifests. - -* Testing. - -* Write the documentation. - -Dependencies -============ - -* Fuel 7.0 and higher. - -* It will be installed in an empty role. - - -References -========== - -.. [#] https://wiki.openstack.org/wiki/Rally diff --git a/tasks.yaml b/tasks.yaml deleted file mode 100644 index fe51488..0000000 --- a/tasks.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/volumes.yaml b/volumes.yaml deleted file mode 100644 index 0835822..0000000 --- a/volumes.yaml +++ /dev/null @@ -1,7 +0,0 @@ -volumes_roles_mapping: - # Default role mapping - fuel-plugin-rally_role: - - {allocate_size: "min", id: "os"} - -# Set here new volumes for your role -volumes: []