-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade datapusher #28
Closed
avdata99
wants to merge
2
commits into
GSA:inventory_ckan_2.8
from
avdata99:inventory_ckan_2.8_datapusher
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
FROM keitaro/base:0.4 | ||
|
||
MAINTAINER Keitaro Inc <info@keitaro.info> | ||
|
||
ENV APP_DIR=/srv/app | ||
ENV GIT_BRANCH 0.0.15 | ||
ENV GIT_URL https://github.com/ckan/datapusher.git | ||
ENV JOB_CONFIG ${APP_DIR}/datapusher_settings.py | ||
|
||
WORKDIR ${APP_DIR} | ||
|
||
RUN apk add --no-cache python \ | ||
py-pip \ | ||
py-gunicorn \ | ||
libffi-dev \ | ||
libressl-dev \ | ||
libxslt && \ | ||
# Temporary packages to build CKAN requirements | ||
apk add --no-cache --virtual .build-deps \ | ||
gcc \ | ||
git \ | ||
util-linux \ | ||
musl-dev \ | ||
python-dev \ | ||
libxml2-dev \ | ||
libxslt-dev | ||
|
||
# Fetch datapusher and install | ||
RUN mkdir ${APP_DIR}/src && cd ${APP_DIR}/src && \ | ||
git clone -b ${GIT_BRANCH} --depth=1 --single-branch ${GIT_URL} && \ | ||
cd datapusher && \ | ||
pip install -r requirements.txt && \ | ||
python setup.py develop | ||
|
||
COPY setup ${APP_DIR} | ||
|
||
EXPOSE 8800 | ||
# --reload restats gunicoir when code changes | ||
CMD ["gunicorn", "--reload", "--bind=0.0.0.0:8800", "--log-file=-", "wsgi"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import uuid | ||
|
||
DEBUG = True | ||
TESTING = False | ||
SECRET_KEY = str(uuid.uuid4()) | ||
USERNAME = str(uuid.uuid4()) | ||
PASSWORD = str(uuid.uuid4()) | ||
|
||
NAME = 'datapusher' | ||
|
||
# database | ||
|
||
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/job_store.db' | ||
|
||
# webserver host and port | ||
|
||
HOST = '0.0.0.0' | ||
PORT = 8800 | ||
|
||
# logging | ||
|
||
#FROM_EMAIL = 'server-error@example.com' | ||
#ADMINS = ['yourname@example.com'] # where to send emails | ||
|
||
LOG_FILE = '/tmp/ckan_service.log' | ||
STDERR = True | ||
|
||
# cloud settings | ||
MAX_CONTENT_LENGTH = 73400320 | ||
|
||
# Allow no SSL locally | ||
SSL_VERIFY = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import os | ||
import sys | ||
|
||
import ckanserviceprovider.web as web | ||
web.init() | ||
|
||
from datapusher import jobs | ||
|
||
application = web.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no existing datapusher image? If we are forced to build our own, then we should build our own image from its own repository. We shouldn't be committing a datapusher Dockerfile here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you use a local datapusher in the inventory app for development. Also in datagov-deploy
I din't find a docker image in GSA's Docker hub.
This repo seems the best place to test the upgrade.
Does GSA have a repository for the datapusher image?
Maybe I missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure but it seems in datagov-deploy you just run datapusher locally in the inventory machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you prefer @adborden we can start a new repo for GSA datapusher to work independently.
This is another option with a built image. It also works.
I also look in ckan-cloud-docker and we also build this image. I will wait for @akariv opinion.