Skip to content

Commit

Permalink
Merge pull request #247 from jantman/release0.7.0
Browse files Browse the repository at this point in the history
Release 0.7.0
  • Loading branch information
jantman authored Jan 15, 2017
2 parents 7bb5b78 + 3468e28 commit ccb5543
Show file tree
Hide file tree
Showing 77 changed files with 2,467 additions and 3,282 deletions.
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ __IMPORTANT:__ Please take note of the below checklist, especially the first two
refrain from using the "fixes #x" notation unless you are *sure* that the
the issue is fixed in that commit.
- [ ] Git history is fully intact; please do not squash or rewrite history.
- [ ] If you made changes to the ``versioncheck`` code, be sure to locally run the
``-versioncheck`` tox tests.

## Contributor License Agreement

Expand Down
18 changes: 7 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,25 @@ cache:
matrix:
include:
- python: "2.6"
env: TOXENV=py26-unit PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
env: TOXENV=py26 PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
- python: "2.7"
env: TOXENV=py27-unit PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
env: TOXENV=py27 PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
- python: "3.2"
env: TOXENV=py32-unit PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
env: TOXENV=py32 PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
- python: "3.3"
env: TOXENV=py33-unit PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
env: TOXENV=py33 PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
- python: "3.4"
env: TOXENV=py34-unit PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
env: TOXENV=py34 PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
- python: "3.5"
env: TOXENV=py35-unit PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
- python: "2.7"
env: TOXENV=py27-versioncheck PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
- python: "3.5"
env: TOXENV=py35-versioncheck PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
env: TOXENV=py35 PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
- python: "2.7"
env: TOXENV=docs PIP_DOWNLOAD_CACHE=$HOME/.pip-cache
- python: "2.7"
env: TOXENV=integration
- python: "3.4"
env: TOXENV=integration3
install:
- virtualenv --version; test $TOXENV = "py32-unit" -o $TOXENV = "py32-versioncheck" -o $TOXENV = "pypy3-unit" -o $TOXENV = "pypy3-versioncheck" && pip install --upgrade virtualenv==13.1.2 || /bin/true
- virtualenv --version; test $TOXENV = "py32" -o $TOXENV = "pypy3" && pip install --upgrade virtualenv==13.1.2 || /bin/true
- git config --global user.email "[email protected]"
- git config --global user.name "travisci"
- pip install tox
Expand Down
57 changes: 56 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,61 @@
Changelog
=========

0.7.0 (2017-01-15)
------------------

This release deprecates support for Python 3.2. It will be removed in the
next release.

This release introduces support for automatically refreshing Trusted Advisor
checks on accounts that support this. If you use this new feature,
awslimitchecker will require a new permission, ``trustedadvisor:RefreshCheck``.
See `Getting Started - Trusted Advisor <http://awslimitchecker.readthedocs.io/en/latest/getting_started.html#trusted-advisor>`_ for further information.

* `#231 <https://github.com/jantman/awslimitchecker/issues/231>`_ - add support
for new f1, r4 and t2.(xlarge|2xlarge) instance types, introduced in November
2016.
* `#230 <https://github.com/jantman/awslimitchecker/issues/230>`_ - replace the
built-in ``versioncheck.py`` with `versionfinder <http://versionfinder.readthedocs.io/en/latest/>`_. Remove all of the many versioncheck tests.
* `#233 <https://github.com/jantman/awslimitchecker/issues/233>`_ - refactor
tests to replace yield-based tests with parametrize, as yield-based tests are
deprecated and will be removed in pytest 4.
* `#235 <https://github.com/jantman/awslimitchecker/issues/235>`_ - Deprecate
Python 3.2 support. There don't appear to have been any downloads on py32
in the last 6 months, and the effort to support it is too high.
* A bunch of Sphinx work to use README.rst in the generated documentation.
* Changed DEBUG-level logging format to include timestamp.
* `#239 <https://github.com/jantman/awslimitchecker/issues/239>`_ - Support
refreshing Trusted Advisor check results during the run, and optionally waiting
for refresh to finish. See
`Getting Started - Trusted Advisor <http://awslimitchecker.readthedocs.io/en/latest/getting_started.html#trusted-advisor>`_
for further information.
* `#241 <https://github.com/jantman/awslimitchecker/issues/241>`_ / `PR #242 <https://github.com/jantman/awslimitchecker/pull/242>`_ -
Fix default ElastiCache/Nodes limit from 50 to 100, as that's `now <http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_elasticache>`_
what the docs say.
* `#220 <https://github.com/jantman/awslimitchecker/issues/220>`_ / `PR #243 <https://github.com/jantman/awslimitchecker/pull/243>`_ /
`PR #245 <https://github.com/jantman/awslimitchecker/pull/245>`_ - Fix for ExpiredTokenException Errors.
**awslimitchecker.connectable.credentials has been removed.**
In previous releases, awslimitchecker had been using a ``Connectable.credentials`` class attribute
to store AWS API credentials and share them between ``Connectable`` subclass instances. The side-effect
of this was that AWS credentials were set at the start of the Python process and never changed. For users
taking advantage of the Python API and either using short-lived STS credentials or using long-running
or threaded implementations, the same credentials persisted for the life of the process, and would often
result in ExpiredTokenExceptions. The fix was to move
`_boto_conn_kwargs <http://awslimitchecker.readthedocs.io/en/latest/awslimitchecker.checker.html#awslimitchecker.checker.AwsLimitChecker._boto_conn_kwargs>`_
and `_get_sts_token <http://awslimitchecker.readthedocs.io/en/latest/awslimitchecker.checker.html#awslimitchecker.checker.AwsLimitChecker._get_sts_token>`_
from `connectable <http://awslimitchecker.readthedocs.io/en/develop/awslimitchecker.connectable.html>`_ to the top-level
`AwsLimitChecker <http://awslimitchecker.readthedocs.io/en/latest/awslimitchecker.checker.html#awslimitchecker.checker.AwsLimitChecker>`_
class itself, get the value of the ``_boto_conn_kwargs`` property in the constructor, and pass that value in to all
``Connectable`` subclasses. This means that each instance of AwsLimitChecker has its own unique connection-related kwargs
and credentials, and constructing a new instance will work intuitively - either use the newly-specified credentials,
or regenerate STS credentials if configured to use them. I have to extend my deepest gratitude to the folks who
identified and fixed this issue, specifically `cstewart87 <https://github.com/cstewart87>`_ for the initial
bug report and description, `aebie <https://github.com/aebie>`_ for the tireless and relentlessly thorough
investigation and brainstorming and for coordinating work for a fix, and `willusher <https://github.com/willusher>`_
for the final implementation and dealing (wonderfully) with the dizzying complexity of many of the unit tests
(and even matching the existing style).

0.6.0 (2016-11-12)
------------------

Expand Down Expand Up @@ -76,7 +131,7 @@ This release requires the following new IAM permissions to function:
0.5.0 (2016-07-06)
------------------

This release includes a change to ``awslimitchecker``'s Python API. `awslimitchecker.limit.AwsLimit.get_limit <https://awslimitchecker.readthedocs.io/en/latest/awslimitchecker.limit.html#awslimitchecker.limit.AwsLimit.get_limit>` can now return either an ``int`` or ``None``, as TrustedAdvisor now lists some service limits as being explicitly "unlimited".
This release includes a change to ``awslimitchecker``'s Python API. `awslimitchecker.limit.AwsLimit.get_limit <https://awslimitchecker.readthedocs.io/en/latest/awslimitchecker.limit.html#awslimitchecker.limit.AwsLimit.get_limit>`_ can now return either an ``int`` or ``None``, as TrustedAdvisor now lists some service limits as being explicitly "unlimited".

* `#195 <https://github.com/jantman/awslimitchecker/issues/195>`_ - Handle TrustedAdvisor explicitly reporting some limits as "unlimited". This introduces the concept of unlimited limits, where the effective limit is ``None``.

Expand Down
86 changes: 21 additions & 65 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
awslimitchecker
========================
===============

.. image:: https://img.shields.io/pypi/v/awslimitchecker.svg
:target: https://pypi.python.org/pypi/awslimitchecker
Expand Down Expand Up @@ -70,7 +70,7 @@ and only alerts *weekly*. awslimitchecker provides a command line script and reu
usage of AWS resources and compares it to limits (hard-coded AWS defaults that you can override, API-based limits where available, or data from Trusted
Advisor where available), notifying you when you are approaching or at your limits.

Full project documentation is available at `http://awslimitchecker.readthedocs.org <http://awslimitchecker.readthedocs.org>`_.
Full project documentation for the latest release is available at `http://awslimitchecker.readthedocs.io/en/latest/ <http://awslimitchecker.readthedocs.io/en/latest/>`_.

Status
------
Expand All @@ -93,79 +93,45 @@ What It Does
- where possible, pull current limits from each service's API (for services that provide this information)
- Supports explicitly setting the AWS region
- Supports using `STS <http://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html>`_ to assume roles in other accounts, including using ``external_id``.
- Optionally refresh Trusted Advisor "Service Limits" check before polling
Trusted Advisor data, and optionally wait for the refresh to complete (up to
an optional maximum time limit). See
`Getting Started - Trusted Advisor <http://awslimitchecker.readthedocs.io/en/latest/getting_started.html#trusted-advisor>`_
for more information.

Requirements
------------

* Python 2.6 through 3.5 (it should work, but is no longer tested, with PyPy and PyPy3).
* Python 2.6, 2.7, 3.3+. It should work, but is no longer tested, with PyPy and
PyPy3. Python 3.2 support is deprecated as of 0.7.0 and
`will be removed <https://github.com/jantman/awslimitchecker/issues/236>`_
in the next release.
* Python `VirtualEnv <http://www.virtualenv.org/>`_ and ``pip`` (recommended installation method; your OS/distribution should have packages for these)
* `boto3 <http://boto3.readthedocs.org/>`_ >= 1.2.3

Installation
------------

It's recommended that you install into a virtual environment (virtualenv /
venv). See the `virtualenv usage documentation <http://www.virtualenv.org/en/latest/>`_
for information on how to create a venv. If you really want to install
system-wide, you can (using sudo).
Installation and Usage
-----------------------

.. code-block:: bash
pip install awslimitchecker
See `Getting Started <http://awslimitchecker.readthedocs.io/en/latest/getting_started.html>`_.

Credentials
-----------

Aside from STS, awslimitchecker does nothing with AWS credentials, it leaves that to boto itself.
You must either have your credentials configured in one of boto's supported config
files, or set as environment variables. See
`boto3 config <http://boto3.readthedocs.org/en/latest/guide/configuration.html#guide-configuration>`_
and
`this project's documentation <http://awslimitchecker.readthedocs.org/en/latest/getting_started.html#credentials>`_
for further information.

**Please note** that version 0.3.0 of awslimitchecker moved from using ``boto`` as its AWS API client to using
``boto3``. This change is mostly transparent, but there is a minor change in how AWS credentials are handled. In
``boto``, if the ``AWS_ACCESS_KEY_ID`` and ``AWS_SECRET_ACCESS_KEY`` environment variables were set, and the
region was not set explicitly via awslimitchecker, the AWS region would either be taken from the ``AWS_DEFAULT_REGION``
environment variable or would default to us-east-1, regardless of whether a configuration file (``~/.aws/credentials``
or ``~/.aws/config``) was present. With boto3, it appears that the default region from the configuration file will be
used if present, regardless of whether the credentials come from that file or from environment variables.

When using STS, you will need to specify the ``-r`` / ``--region`` option as well as the ``-A`` / ``--sts-account-id``
and ``-R`` / ``--sts-account-role`` options to specify the Account ID that you want to assume a role in, and the
name of the role you want to assume. If an external ID is required, you can specify it with ``-E`` / ``--external-id``.

Usage
-----

For basic usage, see:
See `Credentials <http://awslimitchecker.readthedocs.io/en/latest/getting_started.html#credentials>`_.

.. code-block:: bash
Getting Help and Asking Questions
----------------------------------

awslimitchecker --help
See the `project documentation <http://awslimitchecker.readthedocs.org>`_
for further information.

Bugs, Feature Requests, Support
-------------------------------

Questions, comments, Bug reports and feature requests are happily accepted via
the `GitHub Issue Tracker <https://github.com/jantman/awslimitchecker/issues>`_.
Pull requests are always welcome.

Please see the `Development <http://awslimitchecker.readthedocs.org/en/latest/development.html>`_
and `Getting Help <http://awslimitchecker.readthedocs.org/en/latest/getting_help.html>`_ documentation for more information.
See `Getting Help <http://awslimitchecker.readthedocs.io/en/latest/getting_help.html>`_.

For paid support and development options, please see the
`Enterprise Support Agreements and Contract Development <http://awslimitchecker.readthedocs.org/en/latest/getting_help.html#getting-help-paid-support>`_
`Enterprise Support Agreements and Contract Development <http://awslimitchecker.readthedocs.io/en/latest/getting_help.html#enterprise-support-agreements-and-contract-development>`_
section of the documentation.

Changelog
---------

See `https://github.com/jantman/awslimitchecker/blob/develop/CHANGES.rst <https://github.com/jantman/awslimitchecker/blob/develop/CHANGES.rst>`_.
See `Changelog <http://awslimitchecker.readthedocs.io/en/latest/changes.html>`_.

Contributions
-------------
Expand All @@ -178,14 +144,4 @@ License
-------

awslimitchecker is licensed under the `GNU Affero General Public License, version 3 or later <http://www.gnu.org/licenses/agpl.html>`_.
This shouldn't be much of a concern to most people.

If you're simply *running* awslimitchecker, all you must do is provide a notice on where to get the source code
in your output; this is already handled via a warning-level log message in the package. If you modify awslimitchecker's
code, you must update this URL to reflect your modifications (see ``awslimitchecker/version.py``).

If you're distributing awslimitchecker with modifications or as part of your own software (as opposed to simply a
requirement that gets installed with pip), please read the license and ensure that you comply with its terms.

If you are running awslimitchecker as part of a hosted service that users somehow interact with, please
ensure that the source code URL is visible in the output given to users.
This shouldn't be much of a concern to most people; see `Development / AGPL <http://awslimitchecker.readthedocs.io/en/latest/development.html#agpl-license>`_ for more information.
2 changes: 1 addition & 1 deletion awslimitchecker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
################################################################################
Copyright 2015 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com>
Copyright 2015-2017 Jason Antman <[email protected]>
This file is part of awslimitchecker, also known as awslimitchecker.
Expand Down
Loading

0 comments on commit ccb5543

Please sign in to comment.