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
Use the latest django-docker #2172
Conversation
@@ -658,7 +658,8 @@ def get_setting(name, settings=local_settings, default=None): | |||
# Time in seconds to wait before killing unused visualization | |||
DJANGO_DOCKER_ENGINE_SECONDS_INACTIVE = 60 * 60 | |||
# Location of DjangoDockerEngine proxy logging | |||
PROXY_LOG = '/tmp/django_docker_engine.log' | |||
DJANGO_DOCKER_ENGINE_DATA_DIR = '/data/django-docker-engine-data' |
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.
/data
doesn't exist in Vagrant VM and will go away on AWS once Refinery switches to storing data files in S3
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.
This is where docker instances will have mounted volumes for their inputs and ephemeral storage needs. The path is accessed by docker-engine: If docker-engine is running on a separate instance, it will be a directory on that instance. If we can use ECS, then this may be moot. But it needs to be somewhere for now, and this is better than having it hard-coded to a path on the root volume.
Using /data
also seemed better than mounting an entirely new EBS volume.
On vagrant, do you have a strong preference about whether we create a /data
directory as part of setup, or have this setting depend on environment, or something else entirely?
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.
OK then it's fine to use /data
for Docker files for now on condition that only django_docker_engine would have access to them to avoid tight coupling with the rest of the application. Also, django_docker_engine should consider this storage ephemeral because this is going to be the case when it runs on a separate instance.
It's probably a good idea to add /data
to Vagrant for consistency and move all dirs from $project_root (media
, import
, isa-tab
and Solr index dirs) there.
Finally, it'd be great to consolidate all storage related Puppet resources into one module (similar to python.pp for example).
@@ -658,7 +658,8 @@ def get_setting(name, settings=local_settings, default=None): | |||
# Time in seconds to wait before killing unused visualization | |||
DJANGO_DOCKER_ENGINE_SECONDS_INACTIVE = 60 * 60 | |||
# Location of DjangoDockerEngine proxy logging | |||
PROXY_LOG = '/tmp/django_docker_engine.log' | |||
DJANGO_DOCKER_ENGINE_DATA_DIR = '/data/django-docker-engine-data' | |||
PROXY_LOG = '/data/django-docker-engine.log' |
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's probably best to follow standard Django logging practices instead of restricting logging to just a file.
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.
Good point: I think there was some reason initially why it didn't fit, but I can't recall it now, and I'm not sure the reason would be valid even if I could. refinery-platform/django_docker_engine#80
…n did not pull the latest django-docker? Try travis
At least locally,
vs travis:
|
owner => $app_user, | ||
group => $app_group | ||
} | ||
|
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.
This should be combined into a separate module along with storage related items in aws.pp.
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.
@hackdna Are you saying create a storage.pp
?
Would this be better suited for an issue outside of this pr?
Just seeing this comment: #2172 (comment) if you want to checkout this branch and make the storage.pp
file that would be really helpful.
I don't think Travis allows creating directories in |
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.
Looks good to me if Ilya's comments are taken into account, and we see tests pass.
Although, I'm not sure if all of these comment should be addressed immediately considering how long we've pushed back the release already, but they are definitely important.
Codecov Report
@@ Coverage Diff @@
## release-1.6.0 #2172 +/- ##
=================================================
+ Coverage 46.35% 46.36% +<.01%
=================================================
Files 412 412
Lines 27977 27978 +1
Branches 1312 1312
=================================================
+ Hits 12970 12971 +1
Misses 15007 15007
Continue to review full report at Codecov.
|
Actually, my suggestions should be quick to implement. I could help with the Puppet code if needed. |
owner => $app_user, | ||
group => $app_group | ||
} | ||
|
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.
@hackdna Are you saying create a storage.pp
?
Would this be better suited for an issue outside of this pr?
Just seeing this comment: #2172 (comment) if you want to checkout this branch and make the storage.pp
file that would be really helpful.
The proposed refactoring in #2175 isn't working right now. Talked with Scott and decided the best thing for where we are now is to merge this as is. |
Use refinery-platform/django_docker_engine#79: django-docker temp dirs should be cleaned up, and we can configure them to be stored under
/data
.Fix #2166, Fix #2160.