Global requirements for OpenStack
Go to file
Tony Breeds 8bf1b46bd8 [tools/grep-all] Hide eol releases by default
As we collect more history displaying all the EOL releases becomes noise
to filter out.  Hide eol tags by default but provide a quick way to
display them again if wanted.

Change-Id: I89d0c9ae2fa2e94505d44bfa8d2e0b0f00e1d842
2018-09-12 13:26:19 +10:00
.zuul.d remove documentation job from in-tree config 2018-08-29 12:41:05 +00:00
babel-test Babel Integration tests 2016-04-24 17:21:18 -05:00
doc/source Fix bug URL for report a bug link 2017-08-27 10:42:10 +02:00
openstack_requirements Remove PyKafka from global-requirements 2018-09-03 10:42:26 +02:00
playbooks Remove unused job requirements-integration-dsvm-ubuntu-trusty 2018-08-25 09:56:27 +02:00
tools [tools/grep-all] Hide eol releases by default 2018-09-12 13:26:19 +10:00
.gitignore add stestr directory to gitignore 2018-05-29 16:50:18 -05:00
.gitreview Added .gitreview 2012-08-06 17:05:39 -05:00
.stestr.conf Move requirements to the PTI 2018-05-21 14:58:48 -07:00
bindep.txt Ensure we install libssl-dev on dpkg systems 2018-08-30 00:30:34 +00:00
blacklist.txt Update comment in blacklist for networking repos 2018-07-20 08:42:27 +02:00
detail.py Trivial: Update pypi url to new url 2018-04-21 02:32:36 +00:00
global-requirements.txt Merge "Add confluent-kafka to global-requirements" 2018-09-07 12:54:55 +00:00
MANIFEST.in Make openstack.requirements installable. 2013-07-05 00:31:50 -04:00
projects.txt Merge "Add metalsmith to projects.txt" 2018-06-06 04:16:47 +00:00
README.rst add tox env for running requirements-check 2018-07-11 07:34:10 -04:00
requirements.txt Updated from global requirements 2018-03-04 10:29:16 +00:00
setup.cfg add build-lower-constraints command 2018-07-02 11:29:34 -04:00
setup.py Updated from global requirements 2017-03-02 11:55:44 +00:00
test-requirements.txt Move requirements to the PTI 2018-05-21 14:58:48 -07:00
tox.ini add tox env for running requirements-check 2018-07-11 07:34:10 -04:00
update.py Move commands into cmds subdir. 2015-06-29 15:27:25 +12:00
upper-constraints-xfails.txt remove mitmproxy 2018-03-22 13:50:56 -05:00
upper-constraints.txt update constraint for reno to new release 2.11.0 2018-09-11 12:46:53 +00:00

Global Requirements for OpenStack Projects

image

Why Global Requirements?

Refer to the Dependency Management section of the Project Team Guide for information about the history of the project and the files involved.

Tools

All the tools require openstack_requirements to be installed (e.g. in a Python virtualenv). They all have help, which is the authoritative documentation.

update-requirements

This will update the requirements in a project from the global requirements file found in .. Alternatively, pass --source to use a different global requirements file:

update-requirements --source /opt/stack/requirements /opt/stack/nova

Entries in all requirements files will have their versions updated to match the entries listed in the global requirements. Excess entries will cause errors in hard mode (the default) or be ignored in soft mode.

generate-constraints

Compile a constraints file showing the versions resulting from installing all of global-requirements.txt:

generate-constraints -p /usr/bin/python2.7 -p /usr/bin/python3 \
  -b blacklist.txt -r global-requirements.txt > new-constraints.txt

edit-constraints

Replace all references to a package in a constraints file with a new specification. Used by DevStack to enable git installations of libraries that are normally constrained:

edit-constraints oslo.db "-e file://opt/stack/oslo.db#egg=oslo.db"

build-lower-constraints

Combine multiple lower-constraints.txt files to produce a list of the highest version of each package mentioned in the files. This can be used to produce the "highest minimum" for a global lower constraints list (a.k.a., the "TJ Maxx").

To use the script, run:

$ tox -e venv -- build-lower-constraints input1.txt input2.txt

Where the input files are lower-constraints.txt or requirements.txt files from one or more projects.

If the inputs are requirements files, a lower constraints list for the requirements is produced. If the inputs are lower-constraints.txt, the output includes the highest version of each package referenced in the files.

check-requirements

Run the validation checks from the requirements-check job locally using the requirements-check tox environment.

Run:

$ tox -e requirements-check -- /path/to/repo/to/test

Proposing changes

Look at the Review Guidelines and make sure your change meets them.

All changes to global-requirements.txt may dramatically alter the contents of upper-constraints.txt due to adding or removing transitive dependencies. As such you should always generate a diff against the current merged constraints, otherwise your change may fail if it is incompatible with the current tested constraints.

Regenerating involves five steps.

  1. Install the dependencies needed to compile various Python packages:

    sudo apt-get install $(bindep -b)
  2. Create a reference file (do this without your patch applied):

    generate-constraints -p /usr/bin/python2.7 -p /usr/bin/python3 \
      -b blacklist.txt -r global-requirements.txt > baseline
  3. Apply your patch and generate a new reference file:

    generate-constraints -p /usr/bin/python2.7 -p /usr/bin/python3 \
      -b blacklist.txt -r global-requirements.txt > updated
  4. Diff them:

    diff -p baseline updated
  5. Apply the patch to upper-constraints.txt. This may require some fiddling. edit-constraint can do this for you when the change does not involve multiple lines for one package.

Resources