Skip to content

Commit

Permalink
Merge pull request #48 from al4/master
Browse files Browse the repository at this point in the history
Orlo 0.4.0
  • Loading branch information
al4 authored Apr 4, 2017
2 parents f6c7bec + 7db0223 commit 3ee2ede
Show file tree
Hide file tree
Showing 44 changed files with 681 additions and 809 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ var/
*.egg-info/
.installed.cfg
*.egg
debian/*.debhelper
debian/*.substvars
debian/orlo
debian/files

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: python
dist: trusty

notifications:
slack: ebayclassifiedsgroup:lH5V2FnojyNCh8X84Qi1FKjk
Expand All @@ -11,7 +12,7 @@ addons:
apt:
packages:
- curl
postgresql: "9.3"
postgresql: "9.4"

services:
- postgresql
Expand All @@ -24,4 +25,4 @@ before_install:
- pip install tox tox-travis

script:
- tox -- --maxfail=2
- tox -v -- --maxfail=2
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include README.md
recursive-include orlo/migrations *
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Uses git buildpackage, which from debian rules will call dh_virtualenv

test:
python setup.py test
tox

sdist:
python setup.py sdist
Expand All @@ -12,10 +12,10 @@ clean:
python setup.py clean
debuild clean

debian:
deb:
debuild -us -uc

changelog:
gbp dch --ignore-branch --auto --commit
gbp dch --ignore-branch --auto --commit debian

.PHONY: debian sdist test clean changelog
34 changes: 13 additions & 21 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Vagrant.configure(2) do |config|
end

config.vm.provision "shell", inline: <<-SHELL
echo 'en_GB.UTF-8 UTF-8' | tee -a /etc/locale.gen
sudo localedef -i en_GB -f UTF-8 en_GB.UTF-8
sudo locale-gen en_GB.UTF-8
sudo sed -i 's/us.archive.ubuntu.com/nl.archive.ubuntu.com/g' /etc/apt/sources.list
Expand All @@ -28,6 +29,7 @@ Vagrant.configure(2) do |config|
dh-systemd \
git-buildpackage \
postgresql-client \
libpq-dev \
mysql-client \
python-all-dev \
python-dev \
Expand All @@ -49,12 +51,8 @@ Vagrant.configure(2) do |config|
libsasl2-dev \
libssl-dev \
# Updating build tooling can help
sudo pip install --upgrade \
pip \
setuptools \
stdeb \
virtualenv \
sudo pip install --upgrade pip setuptools
sudo pip install --upgrade stdeb virtualenv
wget -P /tmp/ \
'http://launchpadlibrarian.net/291737817/dh-virtualenv_1.0-1_all.deb'
Expand All @@ -66,36 +64,30 @@ Vagrant.configure(2) do |config|
source /home/vagrant/virtualenv/orlo/bin/activate
echo "source ~/virtualenv/orlo/bin/activate" >> /home/vagrant/.profile
pip install -r /vagrant/orlo/requirements.txt
pip install -r /vagrant/orlo/requirements_testing.txt
pip install --upgrade pip setuptools
cd /vagrant/orlo
pip install .[test]
pip install -r /vagrant/orlo/docs/requirements.txt
python setup.py develop
mkdir -p /etc/orlo /var/log/orlo
# echo -e "[db]\nuri=postgres://orlo:[email protected]" > /etc/orlo/orlo.ini
chown -R vagrant:root /etc/orlo /var/log/orlo
chown -R vagrant:vagrant /home/vagrant/virtualenv
chown vagrant:root /vagrant
# Create the database
#cd /vagrant/orlo
#python create_db.py
#python setup.py develop
SHELL

config.vm.define "jessie" do |jessie|
jessie.vm.box = "bento/debian-8.6"
jessie.vm.box = "bento/debian-8.7"
jessie.vm.network "forwarded_port", guest: 5000, host: 5000
jessie.vm.network "private_network", ip: "192.168.57.20"
jessie.vm.provision "shell", inline: <<-SHELL
SHELL
end

# config.vm.define "trusty" do |trusty|
# trusty.vm.box = "bento/ubuntu-14.04"
# trusty.vm.network "forwarded_port", guest: 5000, host: 5100
# trusty.vm.network "private_network", ip: "192.168.57.10"
# end

config.vm.define "xenial" do |xenial|
xenial.vm.box = "bento/ubuntu-16.04"
xenial.vm.network "forwarded_port", guest: 5000, host: 5200
Expand Down
12 changes: 0 additions & 12 deletions create_db.py

This file was deleted.

53 changes: 53 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
orlo (0.3.1-3) UNRELEASED; urgency=medium

[ Alex Forbes ]
* Fix exec path

[ vagrant ]

-- Alex Forbes <[email protected]> Thu, 24 Nov 2016 10:09:28 +0000

orlo (0.3.1-2) jessie; urgency=medium

[ Alex Forbes ]
* Fix path to gunicorn in systemd unit

[ vagrant ]

-- Alex Forbes <[email protected]> Wed, 23 Nov 2016 18:02:42 +0000

orlo (0.3.1-1) jessie; urgency=medium

[ Alex Forbes ]
* Fix test
* Rename __init__ to test_base and update imports
* Create multiple vagrant machines for testing
* Add jessie and xenial vagrant boxes for build/testing
* Run python setup.py clean in make clean
* Change deb install location to /opt/venvs
* Add initial tox.ini
* Default internal config should be sqlite
* Configure tests to use postgres in vagrant
* Remove trusty vm, fix IP
* Use main repos, upgrade dh-virtualenv, fix missing \
* Add db clients and restart postgres
* Small doc fix
* Remove dependency on passwd file by mocking the verification function
* Use tox to run tests in travis
* mock has moved under py3
* Set test database to localhost if running in Travis
* Set posargs for tox and maxfail for pytest
* Pass travis env car through to tox
* Rename DeployTest as LiveDbTest, move to test_base
* Add stress test
* Add liveserver config to app, refactor db test with classmethods
* Close the session in our json streamer to avoid leaking connections
* Test refactor
* Fix test failure caused by previous tests not clearing db connection
* Bump version to 0.3.1
* Fix locale in vagrantfile (for me anyway 😁), use tox for testing

[ vagrant ]

-- Alex Forbes <[email protected]> Wed, 23 Nov 2016 17:39:48 +0000

orlo (0.3.1) trusty; urgency=medium

* Add support for filtering by reference
Expand Down
4 changes: 2 additions & 2 deletions debian/systemd/orlo.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
[Unit]
Description=orlo
After=network.target
ConditionPathExists=/usr/share/python/orlo/bin/gunicorn
ConditionPathExists=/opt/venvs/orlo/bin/gunicorn

[Service]
Type=simple
User=orlo
Group=orlo
ExecStart=/usr/share/python/orlo/bin/gunicorn \
ExecStart=/opt/venvs/orlo/bin/gunicorn \
-w 4 -b 127.0.0.1:8080 \
--access-logfile /var/log/orlo/gunicorn-access.log \
--log-level debug \
Expand Down
121 changes: 0 additions & 121 deletions deployer.py

This file was deleted.

Loading

0 comments on commit 3ee2ede

Please sign in to comment.