-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation and offline dist improvements #1043
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,9 +33,8 @@ Once ``pyenv`` is installed, install a compatible Python version:: | |
# see https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global for details | ||
pyenv global 3.8.0 | ||
|
||
# Install pip3 | ||
curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py | ||
python3 get-pip.py --user | ||
# Upgrade pip | ||
python3 -m pip install --user --upgrade pip | ||
|
||
git | ||
~~~ | ||
|
@@ -113,32 +112,19 @@ To find the JDK, Rally expects the environment variable ``JAVA_HOME`` to be set | |
Installing Rally | ||
---------------- | ||
|
||
Simply install Rally with pip: ``pip3 install esrally`` | ||
|
||
.. note:: | ||
|
||
Depending on your system setup you may need to prepend this command with ``sudo``. | ||
1. Ensure ``~/.local/bin`` is in your ``$PATH``. | ||
2. Install Rally: ``python3 -m pip install --user esrally``. | ||
|
||
If you get errors during installation, it is probably due to the installation of ``psutil`` which we use to gather system metrics like CPU utilization. Ensure that you have installed the Python development package as documented in the prerequisites section above. | ||
|
||
Non-sudo Install | ||
---------------- | ||
|
||
If you don't want to use ``sudo`` when installing Rally, installation is still possible but a little more involved: | ||
|
||
1. Specify the ``--user`` option when installing Rally (step 2 above), so the command to be issued is: ``python3 setup.py develop --user``. | ||
2. Check the output of the install script or lookup the `Python documentation on the variable site.USER_BASE <https://docs.python.org/3/library/site.html#site.USER_BASE>`_ to find out where the script is located. On Linux, this is typically ``~/.local/bin``. | ||
|
||
You can now either add ``~/.local/bin`` to your path or invoke Rally via ``~/.local/bin/esrally`` instead of just ``esrally``. | ||
|
||
VirtualEnv Install | ||
------------------ | ||
|
||
You can also use Virtualenv to install Rally into an isolated Python environment without sudo. | ||
|
||
1. Set up a new virtualenv environment in a directory with ``virtualenv --python=python3 .`` | ||
1. Set up a new virtualenv environment in a directory with ``python3 -m venv .`` | ||
2. Activate the environment with ``source /path/to/virtualenv/dir/bin/activate`` | ||
3. Install Rally with ``pip install esrally`` | ||
3. Install Rally with ``python3 -m pip install esrally`` | ||
|
||
Whenever you want to use Rally, run the activation script (step 2 above) first. When you are done, simply execute ``deactivate`` in the shell to exit the virtual environment. | ||
|
||
|
@@ -161,12 +147,12 @@ Offline Install | |
This documentation is for the version of Rally currently under development. We do not provide offline installation packages for development versions. | ||
Were you looking for the `documentation of the latest stable version <//esrally.readthedocs.io/en/stable/>`_? | ||
|
||
If you are in a corporate environment where your servers do not have any access to the Internet, you can use Rally's offline installation package. Follow these steps to install Rally: | ||
If you are in a corporate environment using Linux servers that do not have any access to the Internet, you can use Rally's offline installation package. Follow these steps to install Rally: | ||
|
||
1. Install all prerequisites as documented above. | ||
2. Download the offline installation package for the `latest release <https://github.com/elastic/rally/releases/latest>`_ and copy it to the target machine(s). | ||
3. Decompress the installation package with ``tar -xzf esrally-dist-*.tar.gz``. | ||
4. Run the install script with ``sudo ./esrally-dist-*/install.sh``. | ||
3. Decompress the installation package with ``tar -xzf esrally-dist-linux-*.tar.gz``. | ||
4. Run the install script with ``sudo ./esrally-dist-linux-*/install.sh``. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, should this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
(If I understand the question correctly): Yeah it's not present now, but it will be after we release in the future due the changes here |
||
|
||
Next Steps | ||
---------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively
--user
can be skipped and thenesrally
lives (in the form of a pyenv shim) in~/.pyenv/shims/esrally
. In this case the user would still need to either logout/login orexec $SHELL
to make the shim active.Since we are anyway upgrading pip (earlier) in a
--user
context, I think we should stick to that convention, which IMHO is a better practice, cleaner approach and ultimately a more discoverable location (~/.local/bin
) for binaries to be stored. The requirement to have~/.local/bin
is also IMHO a best practice that users should follow.All these instructions have been tested -- at least -- in CentOS 8 and Ubuntu 18.04. More testing very welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, let's keep this as you've done it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for some reason
python3 -m pip install --user esrally
keeps installing 1.4.1 rally for me on Linux SUSEThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i think that's because python version is 3.6 not 3.8