ODM2 / CZ-Manager

CZ Manager (formerly ODM2 Admin) is an application for site level data management of environmental observations using Observation Data Model 2 (ODM2) for documentation and a detailed walkthrough see:
http://odm2.github.io/CZ-Manager
MIT License
9 stars 12 forks source link

Docker file/image #107

Closed emiliom closed 7 years ago

emiliom commented 7 years ago

I'm opening this issue just to track progress on creating a Docker file/image (I don't know what's the difference!), as discussed in PR #96. To reiterate what was discussed there, it looks like work on conda packaging ODM2 Admin (previously discussed off and on in issue #11; see also PR #102) will stop, in favor of a Docker solution.

Pinging @lsetiawan since it looked he was going to take some lead on this, with input/help from @ocefpaf. Don probably won't have much time this week to advance this, though.

Please chime in if I've misstated something.

ocefpaf commented 7 years ago

Docker file/image (I don't know what's the difference!)

The Dockerfile is a simple text with the instructions to create the image. We should avoid creating images "by hand" and prefer the Dockerfile for reproducibility purposes.

To reiterate what was discussed there, it looks like work on conda packaging ODM2 Admin (previously discussed off and on in issue #11; see also PR #102) will stop

I won't stop completely. But there is no room for improvements right now unless some compromises between a stand-alone app and a re-usable app are discussed. Once PR #102 is merged I still have another one to send towards that goal.

Don probably won't have much time this week to advance this, though.

No problem. @lsetiawan feel free to ping me whenever you are ready.

lsetiawan commented 7 years ago

@ocefpaf I started working on this a few weeks ago, and I just pushed the code to my repo, when you have time, please comment if I'm doing this right: https://github.com/lsetiawan/ODM2-Admin/blob/docker_test/docker/Dockerfile

@miguelcleon I am looping you in on this one.

ocefpaf commented 7 years ago

I will take a look asap.

PS: did you see https://www.caktusgroup.com/blog/2017/03/14/production-ready-dockerfile-your-python-django-app/ ? (That should help you a little bit.)

lsetiawan commented 7 years ago

@ocefpaf I will take a look at that and tweak my Dockerfile, I am probably not following any Docker conventions.. quite new at this haha 😝

emiliom commented 7 years ago

Thanks to both for the progress on this front. @miguelcleon just asked me about this today, so great timing!

ocefpaf commented 7 years ago

@lsetiawan do you have some time tomorrow for a quick call about the Dockerfile? I am at UTC-3 (https://www.timeanddate.com/worldclock/brazil/florianopolis).

I would like to ask you a few questions to avoid sending you in the wrong direction with my biased use or Docker.

lsetiawan commented 7 years ago

@ocefpaf Yea definitely, I am available tomorrow anytime. Just let me know what time is best. Thanks.

ocefpaf commented 7 years ago

Anytime from 12:00 to 18:00 UTC-3 is OK with me.

My username for skype/gtalk is ocefpaf. Just ping me once you are available.

Thanks,

-F

lsetiawan commented 7 years ago

@ocefpaf I am on hangout now. Thanks

lsetiawan commented 7 years ago

@miguelcleon I don't remember if I have to have ODM2 tables loaded first in the db or I can just build it from your sample db? Trying to test the Dockerfile, and it's failing on finding samplingfeatures when built from your example db.

Also, now the conda environment is missing pytz and libgdal, so I'll be adding those in the requirements.txt

miguelcleon commented 7 years ago

@lsetiawan yes, I think that the example db will fail if postgis is not installed or the instance of postgis is not found, I think you might just have to execute this sql statement.
CREATE EXTENSION postgis; I'm away at a meeting right now so sorry if I'm slow to respond.

miguelcleon commented 7 years ago

It specifically fails on sampling features because of the featureGeometry or featureGeometryWKT field, I forget which one.

lsetiawan commented 7 years ago

@miguelcleon sounds good. Thanks! I will try that. No worries. It built the db, but with samplingfeatures table missing probably because of the featureGeometry.

ocefpaf commented 7 years ago

Note that you don't need libgdal if you are using conda-forge, you will need only 'gdal'.

I know, confusing, but conda-forge does not break the package into python wrapper and library.

lsetiawan commented 7 years ago

I think this issue is solved by #120. Closing this issue...

lsetiawan commented 7 years ago

Nvm, I can't close the issue @miguelcleon could you please close this unless you think it's not resolve. Thanks.

miguelcleon commented 7 years ago

yes, I'll close, maybe I should do another release?

lsetiawan commented 7 years ago

I think it seems appropriate with the latest changes with CZIMEA Stuff.