Skip to content

Commit 7c0ae2f

Browse files
authored
Merge pull request #36 from al4/master
Support for Python3, fix for /versions, bump to 0.2 and more
2 parents fd6fd8a + 1cb59cc commit 7c0ae2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+729
-290
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ orlo/_version.py
6565
.vagrant
6666
*.swp
6767
*.deb
68+
69+
# OSX
70+
.DS_Store

Vagrantfile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Vagrant.configure(2) do |config|
1212

1313
# Every Vagrant development environment requires a box. You can search for
1414
# boxes at https://atlas.hashicorp.com/search.
15-
config.vm.box = "ubuntu/trusty64"
15+
config.vm.box = "ubuntu/xenial64"
1616

1717
# Disable automatic box update checking. If you disable this, then
1818
# boxes will only be checked for updates when the user runs
@@ -38,6 +38,7 @@ Vagrant.configure(2) do |config|
3838
# the path on the guest to mount the folder. And the optional third
3939
# argument is a set of non-required options.
4040
# config.vm.synced_folder "../data", "/vagrant_data"
41+
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
4142

4243
# Provider-specific configuration so you can fine-tune various
4344
# backing providers for Vagrant. These expose provider-specific options.
@@ -70,6 +71,9 @@ Vagrant.configure(2) do |config|
7071
# sudo apt-get install -y apache2
7172
# SHELL
7273
config.vm.provision "shell", inline: <<-SHELL
74+
# ubuntu 16.04 fix see https://github.com/mitchellh/vagrant/issues/7288
75+
echo 127.0.0.1 `hostname` |sudo tee -a /etc/hosts
76+
7377
# sudo sed -i 's/archive.ubuntu.com/nl.archive.ubuntu.com/g' /etc/apt/sources.list
7478
apt-get update
7579
apt-get -y install python-pip python-dev postgresql postgresql-server-dev-all
@@ -80,32 +84,31 @@ Vagrant.configure(2) do |config|
8084
apt-get install -y python-dev libldap2-dev libsasl2-dev libssl-dev
8185
8286
# Build tools
83-
apt-get -y install build-essential git-buildpackage debhelper python-dev dh-systemd python-virtualenv
87+
apt-get -y install build-essential git-buildpackage debhelper python-dev \
88+
python3-dev dh-systemd python-virtualenv
8489
wget -P /tmp/ \
8590
'https://launchpad.net/ubuntu/+archive/primary/+files/dh-virtualenv_0.11-1_all.deb'
8691
dpkg -i /tmp/dh-virtualenv_0.11-1_all.deb
8792
apt-get -f install -y
8893
89-
pip install --upgrade pip
90-
pip install virtualenv
94+
pip install --upgrade pip setuptools
95+
pip install --upgrade virtualenv
9196
9297
# Virtualenv is to avoid conflict with Debian's python-six
93-
virtualenv /home/vagrant/virtualenv/orlo
94-
source /home/vagrant/virtualenv/orlo/bin/activate
95-
echo "source ~/virtualenv/orlo/bin/activate" >> /home/vagrant/.profile
98+
virtualenv /home/ubuntu/virtualenv/orlo
99+
source /home/ubuntu/virtualenv/orlo/bin/activate
100+
echo "source ~/virtualenv/orlo/bin/activate" >> /home/ubuntu/.profile
96101
97102
pip install -r /vagrant/requirements.txt
98103
pip install -r /vagrant/requirements_testing.txt
99104
pip install -r /vagrant/docs/requirements.txt
100105
101-
# Flask-Testing hasn't been released to pip in ages :(
102-
pip install --upgrade git+https://github.com/jarus/flask-testing.git
103-
104-
sudo chown -R vagrant:vagrant /home/vagrant/virtualenv
106+
sudo chown -R ubuntu:ubuntu /home/ubuntu/virtualenv
105107
106108
# Create the database
107109
python /vagrant/create_db.py
110+
python /vagrant/setup.py develop
108111
mkdir /etc/orlo
109-
chown vagrant:root /etc/orlo
112+
chown ubuntu:root /etc/orlo
110113
SHELL
111114
end
File renamed without changes.

debian/changelog

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,101 @@
1+
orlo (0.2.0.pre5) UNRELEASED; urgency=medium
2+
3+
[ Alex Forbes ]
4+
* Add dependant python virtualenv package to Vagrantfile
5+
* Add outline for Deploy process
6+
* Use release object instead of re-declaring, add live server test
7+
8+
[ Ivan Coppa ]
9+
* Support for Release metadata attributes, Deploy endpoint
10+
* disabling debug
11+
12+
[ Alex Forbes ]
13+
* Add integrated dummy deployer test
14+
* Use relative path for deployer.rb
15+
16+
[ Marcel Kuiper ]
17+
* Added POC for Token based AUthentication
18+
19+
[ Ivan Coppa ]
20+
* enable deploy api call
21+
22+
[ Marcel Kuiper ]
23+
* processed flake8 recommendations on user_auth.py
24+
25+
[ ivancoppa ]
26+
* create base data
27+
28+
[ Alex Forbes ]
29+
* Add last minute changes to create script
30+
* Add last minute hacks to make everything work
31+
* Add orlo_release to deployer env
32+
* Create configuration for auth +
33+
* Make URL a parameter for auth tests
34+
* Only apply login_required when security is enabled
35+
* Rename test classes to start with "Test"
36+
* Move auth config into setup/teardown
37+
* Add root page, test fixes
38+
* Skip deploy test for now
39+
* Move route_api to route_releases, rename metadatas => metadata
40+
* Make token lifetime configurable, update orlo.ini with new options
41+
* Bump version of Flask-HTTPAuth
42+
* Add status code to OrloAuthError and add OrloConfigError
43+
* Remove login_handler in favour or separate TokenAuth module
44+
* Seperate token auth from http basic auth
45+
* Only require auth when configured
46+
* Implement deployer.py test deployer script
47+
* Bump orloclient version, use py.test for travis
48+
* Add pytz to requirements.txt
49+
* Add requirements_testing.txt
50+
* Move pytest to requirements_testing
51+
* Use /bin/true in deploy shell test
52+
53+
[ Dustin Nguyen ]
54+
* Added ldap auth
55+
* Added ldap mock test
56+
57+
[ Alex Forbes ]
58+
* Misc changes to deploy
59+
* Tidy up example deployer
60+
* Bump to pre-release 0.2
61+
* Tidy comments in example deployer
62+
* Use absolute path for version file
63+
* Use orlo.cli as entry point instead of custom script
64+
* Update Vagrantfile
65+
* Fix silly bug, read config from file after set
66+
* Move debian packaging files in to debian dir
67+
* Explicitly set synced_folder to virtualbox provider
68+
* [lintian] fix description
69+
* Add /version url and test
70+
* Add --version option to command line
71+
* Handle getting an invalid release id gracefully
72+
* Reduce test verbosity by disabling debug and removing prints
73+
* [debian] Add prerm script to stop service
74+
* Separate post_releases_start and post_releases_deploy
75+
* Log output of deploy
76+
* Use json.dumps instead of str() for reliable conversion
77+
* Return output of deploy to client
78+
* Add .DS_Store to gitignore
79+
* Add payload of arguments to error
80+
* Add configuration to documentation
81+
* Break out ExecStart command into multiple lines for clarity
82+
* Add note to test_auth file
83+
* Make config file configurable by environment variable
84+
* Include logger name in logs
85+
* Update requirements for py3, use >= where possible
86+
* Remove indirect dependencies
87+
* Update Vagrantfile to Ubuntu Xenial
88+
* Remove indirect imports
89+
* [py3] fix import errors
90+
* Fix tests to run under python3
91+
* Fix for python2 again
92+
* Add own fork of flask-testing
93+
* Fix /versions sometimes returning wrong version
94+
95+
[ Ubuntu ]
96+
97+
-- Alex Forbes <[email protected]> Thu, 14 Apr 2016 16:17:34 +0000
98+
199
orlo (0.1.1) stable; urgency=medium
2100

3101
* Cast package_rollback as a boolean

debian/control

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ Build-Depends: debhelper (>= 9), python, dh-virtualenv, gcc, python-dev, postgre
66
Standards-Version: 3.9.5
77

88
Package: orlo
9-
Architecture: all
10-
Depends: ${python:Depends}, ${misc:Depends}
11-
Description: An API for tracking deployments, written with Python, Flask and SqlAlchemy.
9+
Architecture: amd64
10+
Depends: ${misc:Depends}
11+
Description: API for tracking deployments
12+
Written with Python, Flask and SQLAlchemy
13+
See http://orlo.readthedocs.org/en/latest/
1214

1315

debian/install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
bin/orlo usr/bin
1+
debian/bin/orlo usr/bin
22
etc/orlo.ini /etc/orlo
3-
systemd/orlo.service /lib/systemd/system
3+
debian/systemd/orlo.service /lib/systemd/system

debian/orlo.lintian-overrides

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Obviously, many of these are legitimate packaging problems and should be resolved.
2+
# Most though, are by virtue of dh-virtualenv
3+
#
4+
orlo binary: wrong-path-for-interpreter
5+
# Python is packaged in:
6+
orlo binary: python-script-but-no-python-dep
7+
# Several pip packages cause this:
8+
orlo binary: executable-not-elf-or-script
9+
orlo binary: souce-is-missing docs/
10+
# Werkzeug, sphinx:
11+
orlo binary: embedded-javascript-library
12+
orlo binary: package-installs-python-egg usr/share/python/orlo/lib/python2.7/site-packages/flask/testsuite/test_apps/lib/python2.5/site-packages/SiteEgg.egg
13+
14+
# Binary files within the virtualenv:
15+
orlo binary: arch-dependent-file-in-usr-share usr/share/python/orlo/bin/python
16+
orlo binary: arch-dependent-file-in-usr-share usr/share/python/orlo/lib/python2.7/site-packages/_ldap.so
17+
18+
# Can't be overridden, would be nice if dh-virtualenv handled this
19+
orlo binary: package-installs-python-bytecode

debian/preinst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ touch /var/log/orlo/app.log
1414
chown -R orlo:orlo /var/{lib,log}/orlo
1515
chmod 755 /var/{lib,log}/orlo
1616
chmod 664 /var/log/orlo/app.log
17+
18+
#DEBHELPER#

debian/prerm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
systemctl stop orlo.service

debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
dh $@ --with systemd --with python-virtualenv
55

66
override_dh_virtualenv:
7-
dh_virtualenv --no-test
7+
dh_virtualenv --no-test --python /usr/bin/python

0 commit comments

Comments
 (0)