Skip to content

Commit 6416282

Browse files
committed
[RELEASE] - Release version 2.0.2 - Python3 required
1 parent fbee602 commit 6416282

File tree

8 files changed

+56
-62
lines changed

8 files changed

+56
-62
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.0.0
2+
current_version = 2.0.2
33
commit = True
44
tag = True
55
tag_name = {new_version}

.travis.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,15 @@ script:
2525
# Killing background sleep loop
2626
- kill %1
2727

28+
before_deploy:
29+
- git add requirements.txt
2830
deploy:
31+
- provider: pypi
32+
user: adobe
33+
password:
34+
secure: lRjP7ej0IeJilu8JedGfKS9an9JZNGLYG6ODdMbfJODblvEWzImjBkHXUeVAJ7YVmppT2kv5f2zGfrO2JiFUVevnlvlbRU0owQf2kCRIeDmafqqHk9WwdsWuOHDbRZ5zE+hkP7dQh3XG4OM3f9//9CI0gk19AkZs5d76aFrDgjkIAMMV7aMw2gz7blkHU/n7ZKRdcLzsdFOFrSS507kiI1x3NTGgzCU+1jYqds6JLLVJMXCVlSlxQV9SkP3HcvE+JIVQ9UfsuwwoFFFAOm/tEYmJAMIeOhIbCNcXYRdwRHByoEuG3OHIChLKfPpf+c47G1oReFPtSmZVbYHdkr3gPoKU05X0zbNY8lN/biuYq6ykp0nB6+swst3kG/l4HRx5WaCtPDB6TefTzFtIvwETuAKdFq6UoB1sSgu3GAK2hucFPsKYLEXPct2i8O3GAtgUrT5VSPgx9oEk9fNqhonP2kC95yEiBeRdZ7ZdqWdFKApQccBmrncp/vRVPDKAlGWiVg22yPYbbxgW/f7qX2vvCqc9BUJFsgv4FfInHWhfWA6pX6slNIEj/92g8ecBGBDPGTojIAZ2GpU6DFzlGMhNQWQm7XJaq/s/E6ZaUfi9JkT3MmEX5YZ+01yh2ovQR1wq/ZyxdUkQS1DBvrk8sIV8ZUFurpNV8uILUtLr8eJUyUs=
35+
on:
36+
tags: true
2937
- provider: releases
3038
api_key: "$GITHUB_API_KEY"
3139
skip_cleanup: true
@@ -37,9 +45,4 @@ deploy:
3745
script: bash build_scripts/docker_push.sh
3846
on:
3947
tags: true
40-
- provider: pypi
41-
user: adobe
42-
password:
43-
secure: lRjP7ej0IeJilu8JedGfKS9an9JZNGLYG6ODdMbfJODblvEWzImjBkHXUeVAJ7YVmppT2kv5f2zGfrO2JiFUVevnlvlbRU0owQf2kCRIeDmafqqHk9WwdsWuOHDbRZ5zE+hkP7dQh3XG4OM3f9//9CI0gk19AkZs5d76aFrDgjkIAMMV7aMw2gz7blkHU/n7ZKRdcLzsdFOFrSS507kiI1x3NTGgzCU+1jYqds6JLLVJMXCVlSlxQV9SkP3HcvE+JIVQ9UfsuwwoFFFAOm/tEYmJAMIeOhIbCNcXYRdwRHByoEuG3OHIChLKfPpf+c47G1oReFPtSmZVbYHdkr3gPoKU05X0zbNY8lN/biuYq6ykp0nB6+swst3kG/l4HRx5WaCtPDB6TefTzFtIvwETuAKdFq6UoB1sSgu3GAK2hucFPsKYLEXPct2i8O3GAtgUrT5VSPgx9oEk9fNqhonP2kC95yEiBeRdZ7ZdqWdFKApQccBmrncp/vRVPDKAlGWiVg22yPYbbxgW/f7qX2vvCqc9BUJFsgv4FfInHWhfWA6pX6slNIEj/92g8ecBGBDPGTojIAZ2GpU6DFzlGMhNQWQm7XJaq/s/E6ZaUfi9JkT3MmEX5YZ+01yh2ovQR1wq/ZyxdUkQS1DBvrk8sIV8ZUFurpNV8uILUtLr8eJUyUs=
44-
on:
45-
tags: true
48+

README.md

Lines changed: 38 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# Ops CLI
22
[![Build Status](https://www.travis-ci.com/adobe/ops-cli.svg?token=8uHqfhgsxdvJ93qWAxhn&branch=master)](https://www.travis-ci.com/adobe/ops-cli) [![Docker pull](https://img.shields.io/docker/pulls/adobe/ops-cli)](https://hub.docker.com/r/adobe/ops-cli) [![](https://images.microbadger.com/badges/version/adobe/ops-cli.svg)](https://microbadger.com/images/adobe/ops-cli "Get your own version badge on microbadger.com") [![License](https://img.shields.io/github/license/adobe/ops-cli)](https://github.com/adobe/ops-cli/blob/master/LICENSE)
33

4+
**From version 2.0 onward, `ops-cli` requires Python3.
5+
If you're still using Python2, use `ops-cli` version <2.0**
6+
47
**ops-cli** is a python wrapper for [Terraform](https://www.terraform.io/), [Ansible](https://www.ansible.com/) and SSH for cloud automation.
58

69
We use multiple tools to manage our infrastructure at Adobe. The purpose of `ops-cli` is to gather the common cluster configurations in a single place and, based on these, interact with the above mentioned tools. In this way, we can avoid duplication and can quickly spin up new clusters (either production or development ones). All we need to do is customize the cluster configuration file ([example here](https://github.com/adobe/ops-cli/blob/master/examples/aws-kubernetes/clusters/my-kubernetes-cluster.yaml)).
710

811
`ops-cli` integrates with the Azure and AWS cli, in order to provide inventory, ssh, sync, tunnel and the possibility to run ansible playbooks on a fleet of EC2 instances.
912
It can be used to add a layer of templating (using jinja2) on top of Terraform files. This is useful for removing duplicated code when it comes to spinning up infrastructure across multiple environments (stage/sandbox/prod) and across teams. Useful for both AWS and [Kubernetes deployments](https://github.com/adobe/ops-cli/tree/master/examples/aws-kubernetes).
1013

11-
Table of Contents
12-
=================
14+
# Table of Contents
15+
16+
<!--ts-->
1317
* [How it works?](#how-it-works)
1418
* [Use cases](#use-cases)
1519
* [Manage AWS EC2 instances](#manage-aws-ec2-instances)
@@ -21,13 +25,11 @@ Table of Contents
2125
* [Virtualenv](#virtualenv)
2226
* [Ops tool installation](#ops-tool-installation)
2327
* [Python 3](#python-3)
24-
* [Python 2](#python-2)
2528
* [Terraform](#terraform-1)
2629
* [Using docker image](#using-docker-image)
27-
* [Optional: install ops in development mode](#optional-install-ops-in-development-mode)
2830
* [Configuring](#configuring)
2931
* [AWS](#aws)
30-
* [Azure](#azure)
32+
* [Azure](#azure)
3133
* [Examples](#examples)
3234
* [Usage help](#usage-help)
3335
* [More help](#more-help)
@@ -50,10 +52,16 @@ Table of Contents
5052
* [Amazon Secrets Manager (SSM)](#amazon-secrets-manager-ssm)
5153
* [Using jinja2 filters in playbooks and terraform templates](#using-jinja2-filters-in-playbooks-and-terraform-templates)
5254
* [SKMS](#skms)
53-
* [Development](#development)
54-
* [Running tests](#running-tests)
55-
* [Troubleshooting](#troubleshooting)
56-
55+
* [Development](#development)
56+
* [Install ops in development mode](#install-ops-in-development-mode)
57+
* [Running tests](#running-tests)
58+
* [Troubleshooting](#troubleshooting)
59+
* [License](#license)
60+
61+
<!-- Added by: amuraru, at: Tue Nov 12 10:23:17 EET 2019 -->
62+
63+
<!--te-->
64+
5765
# How it works?
5866

5967
You define a cluster configuration, using a yaml file. The yaml file contains different kind of sections, one for each plugin. For instance, you could have a section for Terraform files, a section for AWS instructions, Kubernetes Helm charts and so forth.
@@ -142,29 +150,10 @@ workon ops
142150
# uninstall previous `ops` version (if you have it)
143151
pip uninstall ops --yes
144152

145-
# install ops-cli v2.0.0 stable release
153+
# install ops-cli v2.0.2 stable release
146154
pip install --upgrade ops-cli
147155
```
148156

149-
#### Python 2
150-
```sh
151-
# Make sure pip is up to date
152-
curl https://bootstrap.pypa.io/2.6/get-pip.py | python2
153-
154-
# Install virtualenv
155-
pip2 install -U virtualenv
156-
157-
# create virtualenv
158-
virtualenv ops
159-
source ops/bin/activate
160-
161-
# uninstall previous `ops` version (if you have it)
162-
pip uninstall ops --yes
163-
164-
# install ops-cli v2.0.0 stable release
165-
pip2 install --upgrade ops-cli
166-
```
167-
168157

169158
### Terraform
170159
Optionally, install terraform to be able to access terraform plugin. See https://www.terraform.io/intro/getting-started/install.html
@@ -177,7 +166,7 @@ You can try out `ops-cli`, by using docker. The docker image has all required pr
177166

178167
To start out a container, running the latest `ops-cli` docker image run:
179168
```sh
180-
docker run -it adobe/ops-cli:2.0.0 bash
169+
docker run -it adobe/ops-cli:2.0.2 bash
181170
```
182171

183172
After the container has started, you can start using `ops-cli`:
@@ -199,24 +188,16 @@ ops clusters/my-kubernetes-cluster.yaml terraform --path-name aws-eks plan
199188
# in order to setup aws-kubernetes follow the steps from https://github.com/adobe/ops-cli/blob/master/examples/aws-kubernetes/README.md
200189
```
201190

202-
#### Optional: install `ops` in development mode
203-
204-
```
205-
git clone https://github.com/adobe/ops-cli.git
206-
cd ops
207-
# Install openssl
208-
brew install openssl libyaml
209-
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" python setup.py develop
210-
```
211191

212192
## Configuring
193+
213194
### AWS
214195
If you plan to use ops with AWS, you must configure credentials for each account
215196
```shell
216197
$ aws configure --profile aws_account_name
217198
```
218199

219-
## Azure
200+
### Azure
220201
TBD
221202

222203
## Examples
@@ -460,15 +441,15 @@ In case you want to use the OSX Keychain to store your password and reuse across
460441

461442
1. Open `Keychain Access` app on OSX
462443
1. Create a new keychain (`File -> New Keychain`), let's say `aam`
463-
1. Select the `aam` keychain and add a new password entry in this (`File -> New Password Item`):
444+
2. Select the `aam` keychain and add a new password entry in this (`File -> New Password Item`):
464445
- Name: `idm`
465446
- Kind: `application password`
466447
- Account: `your_ldap_account` (e.g. `johnsmith`)
467448
- Where: `idm`
468449

469-
1. Create `$HOME/bin` dir - this is where the scripts below are saved
450+
2. Create `$HOME/bin` dir - this is where the scripts below are saved
470451

471-
1. Create `~/bin/askpass` script and update the ldap account there:
452+
3. Create `~/bin/askpass` script and update the ldap account there:
472453

473454
```bash
474455
cat > ~/bin/askpass <<"EOF"
@@ -700,13 +681,23 @@ username: <username>
700681
password: <password>
701682
```
702683
703-
## Development
684+
# Development
685+
686+
## Install `ops` in development mode
687+
688+
```
689+
git clone https://github.com/adobe/ops-cli.git
690+
cd ops
691+
# Install openssl
692+
brew install openssl libyaml
693+
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" python setup.py develop
694+
```
704695
705-
### Running tests
696+
## Running tests
706697
707698
- on your machine: `py.test tests`
708699
709-
## Troubleshooting
700+
# Troubleshooting
710701
711702
- Permission issues when installing: you should install the tool in a python virtualenv
712703
@@ -726,5 +717,5 @@ Either install the tool in a virtualenv or:
726717
brew link openssl --force
727718
```
728719
729-
## License
720+
# License
730721
[Apache License 2.0](/LICENSE)

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Release
22

33
1. Install: `pip install bump2version`
4-
2. Bump version: `bump2version minor`
4+
2. Bump version: `bump2version patch`
55
3. Push the release commit: `git push --follow-tags`
66
4. Wait for Travis to build at https://www.travis-ci.com/adobe/ops-cli:
77
* This will publish a release to https://github.com/adobe/ops-cli/releases

build_scripts/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ RUN adduser ops -Du 2342 -h /home/ops \
4141
# Install ops python package
4242
&& pip --no-cache-dir install --upgrade /dist/ops-*.tar.gz \
4343
&& rm -rf /dist \
44+
# Dry-run
45+
&& ops --verbose -h \
4446
&& apk del --purge build \
4547
&& wget -q https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl -O /usr/local/bin/kubectl \
4648
&& chmod +x /usr/local/bin/kubectl \

build_scripts/docker_push.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33

44
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
5-
docker tag ops adobe/ops-cli:2.0.0
6-
docker push adobe/ops-cli:2.0.0
5+
docker tag ops adobe/ops-cli:2.0.2
6+
docker push adobe/ops-cli:2.0.2

build_scripts/freeze_requirements.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ pip install pipenv
77
rm -rf Pipfile* deps
88
pipenv lock --clear --three --requirements 1>deps
99
grep '==' deps | sed "s/;\\sextra.*//" > requirements.txt
10+
rm -rf Pipfile* deps

setup.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
_requires = [r for r in open(os.path.sep.join((_mydir, 'requirements.txt')), "r").read().split('\n') if len(r) > 1]
2424
setup(
2525
name='ops-cli',
26-
version='2.0.0',
26+
version='2.0.2',
2727
description='Ops - wrapper for Terraform, Ansible, and SSH for cloud automation',
2828
long_description=_readme + '\n\n',
2929
long_description_content_type='text/markdown',
3030
url='https://github.com/adobe/ops-cli',
31-
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
31+
python_requires='>=3.5',
3232
author='Adobe',
3333
author_email='[email protected]',
3434
license='Apache2',
@@ -38,10 +38,7 @@
3838
'Intended Audience :: Developers',
3939
'License :: OSI Approved :: Apache Software License',
4040
'Operating System :: OS Independent',
41-
'Programming Language :: Python :: 2',
42-
'Programming Language :: Python :: 2.7',
4341
'Programming Language :: Python :: 3',
44-
'Programming Language :: Python :: 3.4',
4542
'Programming Language :: Python :: 3.5',
4643
'Programming Language :: Python :: 3.6',
4744
'Programming Language :: Python :: 3.7',

0 commit comments

Comments
 (0)