Skip to content

Commit

Permalink
Merge pull request #110 from Ouranosinc/0.7.0-preview
Browse files Browse the repository at this point in the history
[WIP] 0.7.0 preview 
closes #104 #106 and #109
  • Loading branch information
fmigneault authored Oct 5, 2018
2 parents 57854b3 + 2583ce9 commit 034ad92
Show file tree
Hide file tree
Showing 47 changed files with 2,046 additions and 353 deletions.
5 changes: 4 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ Credits
Development Lead
----------------

* Francois-Xavier <francois-xavier.derue@crim.ca>
* Francis Charette Migneault <francis.charette-migneault@crim.ca>

Contributors
------------

* David Byrns <David.Byrns@crim.ca>
* David Caron <david.caron@crim.ca>
* Francis Charette Migneault <francis.charette-migneault@crim.ca>
* Francois-Xavier Derue <francois-xavier.derue@crim.ca>
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ MAINTAINER Francis Charette-Migneault
RUN apt-get update && apt-get install -y \
build-essential \
supervisor \
cron \
curl \
libssl-dev \
libffi-dev \
Expand All @@ -23,4 +24,11 @@ COPY ./ $MAGPIE_DIR
RUN make install -f $MAGPIE_DIR/Makefile
RUN make docs -f $MAGPIE_DIR/Makefile

CMD ["make", "start"]
# magpie cron service
ADD magpie-cron /etc/cron.d/magpie-cron
RUN chmod 0644 /etc/cron.d/magpie-cron
RUN touch ~/magpie_cron_status.log
# set /etc/environment so that cron runs using the environment variables set by docker
RUN env >> /etc/environment

CMD make start
10 changes: 10 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
History
=======

0.7.x
---------------------

`Magpie REST API latest documentation`_

* add service resource auto-sync feature
* return user/group services if any sub-resource has permissions
* [WIP] add inherited resource permission with querystring (deprecate `inherited_<>` routes)

0.6.x
---------------------

Expand Down Expand Up @@ -97,3 +106,4 @@ History
.. _Magpie REST API 0.4.x documentation: magpie_api_0.4.x_
.. _Magpie REST API 0.5.x documentation: magpie_api_0.5.x_
.. _Magpie REST API 0.6.x documentation: magpie_api_0.6.x_
.. _Magpie REST API latest documentation: _magpie_api_latest
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ install: sysinstall
@echo "Installing Magpie..."
python setup.py install

.PHONY: cron
cron:
@echo "Starting Cron service..."
cron

.PHONY: start
start: install
start: cron install
@echo "Starting Magpie..."
exec gunicorn -b 0.0.0.0:2001 --paste "$(CUR_DIR)/magpie/magpie.ini" --workers 10 --preload
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
magpie*.rst
modules.rst
1 change: 1 addition & 0 deletions env/magpie.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ MAGPIE_ADMIN_USER=admin
MAGPIE_ADMIN_PASSWORD=qwerty
MAGPIE_ANONYMOUS_USER=anonymous
MAGPIE_USERS_GROUP=users
MAGPIE_CRON_LOG=~/magpie_cron.log
PHOENIX_USER=phoenix
PHOENIX_PASSWORD=qwerty
PHOENIX_PORT=8443
Expand Down
1 change: 1 addition & 0 deletions magpie-cron
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 * * * * root /bin/bash -c "set -a ; . $MAGPIE_DIR/env/magpie.env ; . $MAGPIE_DIR/magpie/env/magpie.env ; . $MAGPIE_DIR/env/postgres.env ; . $MAGPIE_DIR/magpie/env/postgres.env ; set +a ; python -c 'from magpie.helpers.sync_resources import main; main()'" > ~/magpie_cron_status.log 2>&1
2 changes: 1 addition & 1 deletion magpie/__meta__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
General meta information on the magpie package.
"""

__version__ = '0.6.5-dev'
__version__ = '0.7.0'
__author__ = "Francois-Xavier Derue, Francis Charette-Migneault"
__maintainer__ = "Francis Charette-Migneault"
__email__ = 'francis.charette-migneault@crim.ca'
Expand Down
10 changes: 5 additions & 5 deletions magpie/adapter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
from magpie.definitions.ziggurat_definitions import *
from magpie.definitions.twitcher_definitions import *
from magpie.adapter.magpieowssecurity import *
from magpie.adapter.magpieservice import *
from magpie.adapter.magpieservice import MagpieServiceStore
from magpie.models import get_user
from magpie.security import auth_config_from_settings
from magpie.db import *
from magpie import __meta__
import logging
logger = logging.getLogger(__name__)
logger = logging.getLogger("TWITCHER")


class MagpieAdapter(AdapterInterface):
Expand All @@ -19,9 +19,9 @@ def servicestore_factory(self, registry, headers=None):
return MagpieServiceStore(registry=registry)

def processstore_factory(self, registry):
# no reimplementation of processes on magpie side
# simply return the default twitcher process store
return DefaultAdapter().processstore_factory(registry)
# import here to avoid import errors on default twitcher not implementing processes
from magpie.adapter.magpieprocess import MagpieProcessStore
return MagpieProcessStore(registry=registry)

def jobstore_factory(self, registry):
# no reimplementation of jobs on magpie side
Expand Down
Loading

0 comments on commit 034ad92

Please sign in to comment.