aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-09-04django-south: fix import / version issue2014.08Andy Doan
I found a bug in our migration files. The venv I was using had South==1.0 installed. Our production systems have 0.7.3 installed. This moves us to the proper version of south for venv's and removes the import since it was unused. Change-Id: I53eb6d06de54b1251e0e61a4590aba5ddde70982
2014-09-04Merge "api: remove the key management api"Andy Doan
2014-09-03Merge "api: move get_license_api and list_files_api to v1.py"Andy Doan
2014-09-03Merge "API tests: move to own module"Andy Doan
2014-09-03Merge "API: refactor "uploads" into more common "api" module"Andy Doan
2014-08-28Merge "api: add description and last_used information to apikeystore"Andy Doan
2014-08-26api: remove the key management apiAndy Doan
We are deprecating this very soon and should go ahead and prevent any other people from using this API. Change-Id: I6ad8eff04a52717bb5ea83a354386c320f02a0a4
2014-08-26test buildinfo: pep8 fixesAndy Doan
Change-Id: Iea9b210186122ac98fe21dc6b32481068ed2b7b1
2014-08-26buildinfo: fix broken test caseAndy Doan
Change-Id: I57cc25e9332480f1ef7f6f44ae348b3d8d91a2bc
2014-08-25api: move get_license_api and list_files_api to v1.pyAndy Doan
This moves all REST API specific changes into v1.py. In order to handle that some functions in views.py had to be moved to common.py so that v1.py could access them (views.py imports v1.py right now so having v1.py import views.py created a circular dependency) Change-Id: I40990a3942536a5b9c3f1bab0dec69b4f74a072b
2014-08-25API tests: move to own moduleAndy Doan
This moves the API specific tests out of test_views and into test_api_v1.py. It also includes some minor improvements using mock and removing the need for "make_temporary_file" Change-Id: I9f14910224130ddc69306b96b2d96ed35c315bb6
2014-08-25API: refactor "uploads" into more common "api" moduleAndy Doan
This just moves the current uploads.py module into a more commonly named "api/v1.py". This is just setting the stage to better arrange code and support a v2 api if needed. Change-Id: Id1991cb1e5a49bb5a77a992bbcd9c001225ada81
2014-08-21api: add description and last_used information to apikeystoreAndy Doan
This allows us to add desriptions to our API keys and also track when they were last used. I also enabled some admin panel views for this table so we can annotate descriptions if/when we want. Change-Id: I9a3c40a821694bc78d5b5888924fe403193c9ef9
2014-08-20add support for DB migrationsAndy Doan
This is a bit of a pain because we need to deal with our deployed DB's that were never started with south. A bit of background might be useful on how you handle this: http://stackful-dev.com/adding-south-migrations-to-your-django-project-post-factum.html This new task will run during updates 1 time to provide the fake migration we need. Given the fact our production services will not have run syncdb for the new APILog table, I had to make that look like a migration so that it will get created. I also cleaned up a couple of pep8/pyflakes warning in settings.py Change-Id: Ia65a00c8e2160d111335dcc6b291de801025afb8
2014-08-18api: add a management command to produce simple API usage reportsAndy Doan
this allows you to run a command like: # show me stats for the last day ./manage.py api_report 1 # show me uploads for one week ago ./manage.py api_report 14 7 It just dumps out a simple dictionary like: { "by-attribute": { "ip": { "192.168.0.101": 6, "127.0.0.1": 17 }, "apikey": { "7f40c9f407b593a0c02f0fd716288f": 1, "e56bfdd622ed211fd1d3cd9130c39c": 2, "ca975604b5c779220bae8152fc7874": 3, "2b86bd3080ade2183d9e08c4ed8f04": 2, "ca975604b5c779220bae8152fc787": 1, "80a7516c49b28ed9c51e6a6f526188": 1, "c20d8de39381b524f854ed3e3930ce": 1, "null": 11, "42eff654872789f90b989699e3a8ed": 1 }, "builds": 2 }, "counters": { "REQUEST_KEY": 7, "INVALID_ARGUMENTS": 2, "INVALID_KEY": 5, "DELETE_KEY": 1, "FILE_UPLOAD": 8 } } Change-Id: Icd0b3cda8ad67b05161403ee4a59d7a4d7317541
2014-08-14api: make metric logging more robustAndy Doan
The old method required too much manual intervention to prevent log files from growing too large. This makes the API cleaner and allows it to rotate logs on its own. Change-Id: Ib7dd9dd17b748cf2fed7b186bcd84c661ee552e5
2014-08-11bug 358: allow zero-length file uploadsAndy Doan
We are failing to handle publishing of empy files. The main example I've been able to see of this was a zero-byte __init__.py file. Change-Id: I8d2473604267cb80c7733c2fa9b6a1aa9ccd59a2
2014-08-08upload stats: provide more details about errors2014.07.3Andy Doan
We weren't logging the API key or error reasons. This is a cheap hack to do it. It gives the error message in HTML, but it should be easy enough to grep in logs and keeps code simple. The resulting change produces output like: 1407510957.21: 192.168.0.101: INVALID_API_FORM: ca975604b5c779220bae8152fc7874,<ul class="errorlist"><li>file<ul class="errorlist"><li>This field is required.</li></ul></li></ul> Change-Id: Ic50dcdaf1e89b08781cce5d0bdca493b86d26a08
2014-08-05bug #322: fix version information for snapshots2014.07.2Andy Doan
There were 2 issues: 1) ensure git is run from the proper directory 2) ensure we can parse git-log returns for both Trusty and Precise Change-Id: I9d7b59742e4e82f668de5bc57070ef9f8d4f198d
2014-08-05ansible: restart apache if code update occursAndy Doan
Change-Id: I43c4619c4f3fd88b763703046f160fce5fec1316
2014-08-04API: log usage metrics2014.07.1Andy Doan
We are about to be making some changes to our API. It would be helpful to better understand how its being used. This adds a simple mechanism to help us track usage of the API. The metrics are logged in the format: <timestamp>: <remote ip>: <stat name>: <fields (optional)> Example output: 1407170717.06: 127.0.0.1: REQUEST_KEY: 1407171070.57: 127.0.0.1: INVALID_KEY: 1407171191.78: 127.0.0.1: INVALID_API_FORM: 1407171348.14: 127.0.0.1: FILE_UPLOAD: foo_path,False,45d2f5af78194bbfd Change-Id: I034e6a9a6e502a76d1f0a48346ad92ebe6c6121a
2014-08-04uploads: organize imports and fix pep8 warningsAndy Doan
Change-Id: I788aac123af322b0d77c8fa9f31a2f4ff0812e5c
2014-07-29bug #278 - allow "internal hosts" to browse site2014.07Andy Doan
Allow IP's in INTERNAL_HOSTS to be able to browse the site still. Change-Id: I51f7b67730b618767891d925e4bf17f81c8106e9
2014-07-29bug #277: hide "licenses" directoryAndy Doan
Change-Id: I09a4e6053a34b8e1c6960d54e35fc4f43f5435f7
2014-07-27bug247: fix directory sorting logicAndy Doan
This ensures we sort our directory listing properly using the logic: * if all numerical then you'd list like: - latest - 1 - 10 - 100 * if non-numerical we just ensure "latest" will alway go first https://bugs.linaro.org/show_bug.cgi?id=247 Change-Id: I61c32cda08ae94dfc94e4379f8b48deb7df9911a
2014-07-27test_views: fix broken testsAndy Doan
one test was broken and one test looks invalid based on the current implementation Change-Id: Idff1f354be8cff8afe45680a56af59168b6e1119
2014-07-27flake8 fixes to test_viewsAndy Doan
I was about to add some tests here, and noticed a lot of complaints. Change-Id: I99582b2f64ee2751c07c4697fea826d51025fad2
2014-07-22Add revision information for deploymentAndy Doan
Fixes: https://bugs.linaro.org/show_bug.cgi?id=226 by including either the last commit-id or the tag if available Change-Id: Iecd2a857036429bd37f9d3220853f3c1f575536a
2014-07-22add requirements.txt fileAndy Doan
makes setting up a venv for local development easier Change-Id: I1edcd7fc33d055cd6062242f8f7c1082c0533009
2014-06-25Add pyc to ignore list.Milo Casagrande
Change-Id: Ib38a2e899a26f91a9c35dc82d80da0a61d04d3dd
2014-06-25Fix typo in settings file.Milo Casagrande
Change-Id: I82a86e9cb99659af6e11cf4727fd61921aa4e4e9
2014-06-24settings.py: Add new tab for release.Milo Casagrande
* Add new getting started and EULA tabs. Change-Id: If70ce1e6cb5acafb0890d03b650cc596a906b7d5
2014-06-24sudoers: Fix path to script.Milo Casagrande
* With ansible deployment, paths have changed and sudoers file need to be updated to reflect the new ones. Change-Id: Ibd0a07b7ff00bad9c2f4b041b0a5f85cb84184a6
2014-06-23ansible: Remove old dir setup.Milo Casagrande
Change-Id: I00857ea42e0c03fa73746a2d94f2a27bcc788f4e
2014-06-23header.html: Fix the code link.Milo Casagrande
Change-Id: I19460d2ab916d2522f8ddbcd91b975e99be678dd
2014-06-23Remove chown on www directory.Milo Casagrande
Change-Id: Ide0f9c963df2e5c1f6cc1cbf5e7921c30b62c852
2014-06-13views.py: Fix bug 1328998.Milo Casagrande
* License text was not shown when Auth-Groups was defined. Change-Id: Ifda3ab35b6f60ef19bf587eef324e86dd489eead
2014-06-13ansible: Use double quotes on django commands.Milo Casagrande
2014-06-13Fix ansible plyabook.Milo Casagrande
* Add missing nickname variable definition. * Fix problem with django_manage commands that need env variables defined.
2014-06-13Merge branch 'master' of ↵Milo Casagrande
git://git.linaro.org/people/milo.casagrande/linaro-ansible-common
2014-06-06README: Add pull instruction.Milo Casagrande
2014-06-06host-nickname.yml: Fix variable registration.Milo Casagrande
2014-06-06host-nickname: Install it only if not already installed.Milo Casagrande
2014-06-06handlers: Add handlers for nginx and uwsgi.Milo Casagrande
2014-06-06ansible: Setup proper directory permissions for publishing.Paul Sokolovsky
Change-Id: I3028464d78961573dfdc02233ff0b6b7020c52fa
2014-06-03Remove depencency on bzr to show version number.Milo Casagrande
* Since we no longer deploy via bzr, we need to find another way to show the version number. The changes here introduce a new file, version.py, with a single variable that should be bumped each time we do a release. The relase should follow normal release schedule and numbering. * Fix the template to point to git instead of Launchpad source code. * Removed a test that checked the bzr version number in the template. Change-Id: I6864ba95be2343ca539d91b87482c2e1359653ec
2014-05-30ansible: Add beginnings of SSH publishing setup.Paul Sokolovsky
Based on revamping the current state of staging.snapshots.linaro.org, doesn't include complete setup yet. Change-Id: Id9525369fdcc963aa7d003d8ef0912d9b59b8743
2014-05-30ansible: Fix PYTHONPATH.Milo Casagrande
* Make sure that when django admin programs are run we are using the correct django settings and pythonpath.
2014-05-30group_auth_crowd: Add log statement.Milo Casagrande
* Log crowd groups response.
2014-05-30ansible: Update ansible configuration.Milo Casagrande
* Fix missing dependencies installation. * Fix task names. * Remove unused task.