Skip to content

Commit

Permalink
Merge pull request #870 from untergeek/move_to_5
Browse files Browse the repository at this point in the history
Move to 5
  • Loading branch information
untergeek committed Jan 24, 2017
2 parents 46224d2 + cb43c7d commit e6f29de
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 158 deletions.
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ python:
- "3.5"

env:
- ES_VERSION=2.0.0
- ES_VERSION=2.1.1
- ES_VERSION=2.2.2
- ES_VERSION=2.3.5
- ES_VERSION=2.4.2
- ES_VERSION=5.0.2
- ES_VERSION=5.1.1
- ES_VERSION=5.1.2

os: linux

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2011–2016 Elasticsearch <http://elastic.co> and contributors.
Copyright 2011–2017 Elasticsearch <http://elastic.co> and contributors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions binary_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ def get_version():
# Unsupported platform?
print('Your platform ({0}) is not yet supported for binary build/distribution.'.format(platform))
sys.exit(1)

#sys_string = sys_type + '-' + sys_arch
#build_name = 'exe.' + sys_string + '-' + pyver
#print('Expected build directory: {0}'.format(build_name))
build_path = os.path.join('build', build_name)

if os.path.exists(build_path):
#print("I found the path: {0}".format(build_path))

target_path = os.path.join('.', target_name)

# Check to see if an older directory exists...
Expand Down
2 changes: 1 addition & 1 deletion curator/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '4.2.5'
__version__ = '5.0.0'
4 changes: 2 additions & 2 deletions curator/defaults/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

# Elasticsearch versions supported
def version_max():
return (5, 1, 99)
return (5, 99, 99)
def version_min():
return (2, 0, 0)
return (5, 0, 0)

# Default Config file location
def config_file():
Expand Down
22 changes: 22 additions & 0 deletions docs/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
Changelog
=========

5.0.0 (25 January 2017)

**General**

* Update Curator to use version 5.1 of the ``elasticsearch-py`` python module.
With this change, there will be no reverse compatibility with Elasticsearch
2.x. For 2.x versions, continue to use the 4.x branches of Curator.
* Tests were updated to reflect the changes in API calls, which were minimal.
* Remove "official" support for Python 2.6. If you must use Curator on a
system that uses Python 2.6 (RHEL/CentOS 6 users), it is recommended that
you use the official RPM package as it is a frozen binary built on Python
3.5.x which will not conflict with your system Python.
* Use ``isinstance()`` to verify client object. #862 (cp2587)
* Prune older versions from Travis CI tests.
* Update ``certifi`` dependency to latest version

**Documentation**

* Add version compatibility section to official documentation.
* Update docs to reflect changes. Remove cruft and references to older
versions.

4.2.5 (22 December 2016)
------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/asciidoc/about.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Python API].
[[license]]
== License

Copyright (c) 2011–2016 Elasticsearch <http://elastic.co>
Copyright (c) 2011–2017 Elasticsearch <http://elastic.co>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
7 changes: 4 additions & 3 deletions docs/asciidoc/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
:curator_version: 4.2.5
:curator_major: 4
:es_py_version: 2.4.0
:curator_version: 5.0.0
:curator_major: 5
:es_py_version: 5.1.0
:ref: http://www.elastic.co/guide/en/elasticsearch/reference/current

[[curator-reference]]
= Curator Reference

include::about.asciidoc[]
include::versions.asciidoc[]
include::installation.asciidoc[]
include::command-line.asciidoc[]
include::configuration.asciidoc[]
Expand Down
44 changes: 13 additions & 31 deletions docs/asciidoc/installation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ version, or a specified one. Specify a specific version by adding `==` followed
by the version you'd like to install, like this:

-------------------------------------------
pip install -U elasticsearch-curator==3.5.1
pip install -U elasticsearch-curator==X.Y.Z
-------------------------------------------

=== System-wide vs. User-only installation
Expand All @@ -73,7 +73,7 @@ You can make an alias or a symlink to this so you can call it more easily.
The `--user` flag can also be used in conjunction with the `-U` flag:

----------------------------------------
pip install -U --user elasticsearch-curator==3.5.1
pip install -U --user elasticsearch-curator==X.Y.Z
----------------------------------------

&nbsp;
Expand Down Expand Up @@ -131,14 +131,14 @@ file and the installation should work as expected.
[[apt-binary]]
=== Binary Package Installation

Starting with version 4.1.2, Curator comes with a binary version. What this
really means is that the source is compiled, and all required libraries are
bundled with the `curator` binary, so there are no conflicts.
The APT version of Curator is a binary version. What this really means is that
the source is frozen, and all required libraries are bundled with the
`curator` binary, so there are no conflicts.

The binary packages resulting from the creation process have been tested on
Debian 8, and Ubuntu 12.04, 14.04, & 16.04. It was also tested on Debian 7, but
that failed due to a libc library mismatch. This binary package may work on
other similar or derivative variants, but they have not been tested.
The packages resulting from the creation process have been tested on Debian 8,
and Ubuntu 12.04, 14.04, & 16.04. It was also tested on Debian 7, but that
failed due to a libc library mismatch. This binary package may work on other
similar or derivative variants, but they have not been tested.

[source,sh]
--------------------------------------------------
Expand All @@ -149,15 +149,6 @@ This will install the necessary files into `/opt/elasticsearch-curator` and
make a symlink at `/usr/bin/curator` that points to the `curator` binary in the
aforementioned directory.

[WARNING]
====================================================
The `elasticsearch-curator` binary package cannot coexist with the older
`python-elasticsearch-curator` packages. This collision is explicitly defined
in packages since 4.1.2, but not in previous packages. If it is installed, you
_must_ uninstall the `python-elasticsearch-curator` package before installing
the `elasticsearch-curator` binary package.
====================================================

[[yum-repository]]
== YUM repository

Expand Down Expand Up @@ -219,9 +210,9 @@ enabled=1
[[yum-binary]]
=== Binary Package Installation

Starting with version 4.1.2, Curator comes with a binary version. What this
really means is that the source is compiled, and all required libraries are
bundled with the `curator` binary, so there are no conflicts.
The RPM version of Curator is a binary version. What this really means is that
the source is frozen, and all required libraries are bundled with the
`curator` binary, so there are no conflicts.

There are separate binary packages for RedHat variants. The binary packages
resulting from the creation process have been tested on CentOS 6 & 7, with a
Expand All @@ -237,15 +228,6 @@ This will install the necessary files into `/opt/elasticsearch-curator` and
make a symlink at `/usr/bin/curator` that points to the `curator` binary in the
aforementioned directory.

[WARNING]
====================================================
The `elasticsearch-curator` binary package cannot coexist with the older
`python-elasticsearch-curator` packages. This collision is explicitly defined
in packages since 4.1.2, but not in previous packages. If it is installed, you
_must_ uninstall the `python-elasticsearch-curator` package before installing
the `elasticsearch-curator` binary package.
====================================================

[[windows-zip]]
== Windows Binary Zip Package
If you do not wish to install and maintain Python on Windows, there is a
Expand Down Expand Up @@ -353,7 +335,7 @@ or uncompress and run `python setup.py install`
Download and install the `certifi` dependency. Always use the most recent
version:

. `wget https://github.com/certifi/python-certifi/archive/2016.09.26.tar.gz -O certifi.tar.gz`
. `wget https://github.com/certifi/python-certifi/archive/2017.1.23.tar.gz -O certifi.tar.gz`
. `pip install certifi.tar.gz`

&nbsp;
Expand Down
51 changes: 51 additions & 0 deletions docs/asciidoc/versions.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[[versions]]
= Versions

[partintro]
--
Elasticsearch Curator has been around for many different versions of
Elasticsearch. The following document helps clarify which versions of Curator
work with which versions of Elasticsearch.

The current version of Curator is {curator_version}

* <<version-compatibility,Version Compatibility>>
--

[[version-compatibility]]
== Version Compatibility
&emsp14;

IMPORTANT: Each listed version of Elasticsearch Curator has been fully tested
against unmodified release versions of Elasticsearch. **Modified versions of Elasticsearch may not be fully supported.**

The current version of Curator is {curator_version}

[cols="<,<,<,<",options="header",grid="cols"]
|===
|Curator Version
|ES 1.x
|ES 2.x
|ES 5.x

|&emsp14; &emsp14; &emsp14; &emsp14; &emsp14; 3
|&emsp14; &#9989; footnoteref:[aws_ss,Curator is unable to make snapshots for modified versions of ES which do not allow access to the snapshot status API endpoint. As a result&comma; Curator is unable to make snapshots in AWS ES.]
|&emsp14; &#9989; footnoteref:[aws_ss]
|&emsp14; &#10060;

|&emsp14; &emsp14; &emsp14; &emsp14; &emsp14; 4
|&emsp14; &#10060;
|&emsp14; &#9989; footnote:[If using AWS ES (which is different from installing Elasticsearch on your own EC2 instances)&comma; please see the FAQ question, <<faq_aws_iam,Why doesn't Curator 4 work with AWS Elasticsearch?>>]
|&emsp14; &#9989; footnote:[Not all of the APIs available in Elasticsearch 5 are available in Curator 4.]

|&emsp14; &emsp14; &emsp14; &emsp14; &emsp14; 5
|&emsp14; &#10060;
|&emsp14; &#10060;
|&emsp14; &#9989;
|===

Learn more about the different versions at:

* https://www.elastic.co/guide/en/elasticsearch/client/curator/3.5/index.html[Curator 3 Documentation]
* https://www.elastic.co/guide/en/elasticsearch/client/curator/4.2/index.html[Curator 4 Documentation]
* https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html[Curator 5 Documentation]
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_version():

intersphinx_mapping = {
'python': ('https://docs.python.org/3.5', None),
'elasticsearch': ('http://elasticsearch-py.readthedocs.io/en/2.3.0', None),
'elasticsearch': ('http://elasticsearch-py.readthedocs.io/en/5.1.0', None),
}

autoclass_content = "both"
Expand All @@ -67,7 +67,7 @@ def get_version():

# General information about the project.
project = u'Elasticsearch Curator'
copyright = u'2011-2016, Elasticsearch'
copyright = u'2011-2017, Elasticsearch'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def get_version():
return VERSION

def get_install_requires():
res = ['elasticsearch>=2.4.0,<3.0.0' ]
res = ['elasticsearch>=5.0.0,<6.0.0' ]
res.append('click>=6.0')
res.append('pyyaml>=3.10')
res.append('voluptuous>=0.9.3')
res.append('certifi>=2016.09.26')
res.append('certifi>=2017.1.23')
return res

try:
Expand Down Expand Up @@ -113,7 +113,6 @@ def get_install_requires():
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
Expand Down Expand Up @@ -152,7 +151,6 @@ def get_install_requires():
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
Expand Down
22 changes: 3 additions & 19 deletions test/integration/test_alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_alias_remove_only(self):
)
self.assertEqual(
{'dummy': {'aliases': {}}, 'my_index': {'aliases': {}}},
self.client.indices.get_aliases()
self.client.indices.get_alias(index='dummy,my_index')
)
def test_add_only_skip_closed(self):
alias = 'testalias'
Expand Down Expand Up @@ -128,25 +128,9 @@ def test_add_and_remove(self):
],
)
self.assertEqual(
{'dummy': {'aliases': {}}, 'my_index': {'aliases': {alias: {}}}},
self.client.indices.get_aliases()
{u'my_index': {u'aliases': {alias: {}}}},
self.client.indices.get_alias(name=alias)
)
# def test_add_only_huge_list(self):
# alias = 'testalias'
# self.write_config(
# self.args['configfile'], testvars.client_config.format(host, port))
# self.write_config(self.args['actionfile'],
# testvars.alias_add_only.format(alias))
# self.create_indices(365)
# test = clicktest.CliRunner()
# result = test.invoke(
# curator.cli,
# [
# '--config', self.args['configfile'],
# self.args['actionfile']
# ],
# )
# self.assertEquals(365, len(self.client.indices.get_alias(name=alias)))
def test_no_add_remove(self):
alias = 'testalias'
self.write_config(
Expand Down

0 comments on commit e6f29de

Please sign in to comment.