-
Notifications
You must be signed in to change notification settings - Fork 9
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
Options for easier access / installation of "user data" (from examples/flask) #72
Comments
Actually it does, but it is in an awkward directory. You can download https://anaconda.org/odm2/wofpy/2.0.9b0/download/linux-64/wofpy-2.0.9b0-py27_0.tar.bz2 , unpack it, and navigate to the example directory to find it. In a installed version that directory will depended on the
That is the problem! If they are configuration they need to be installed in a user space directory. BTW do you need only
This part in particular I suggest a "deploy" script that will creates the odm2deploy my_test And that will create a directory named If you like that idea I can implement it.
The only other suggestion is a docker image pre-configure for that. |
Need to access the files in an packaged release. Seems possible http://stackoverflow.com/questions/6028000/python-how-to-read-a-static-file-from-inside-a-package |
Accessing files in a packaged release is easy to do but the users needs to write in those files that @emiliom mentioned or did I miss something? |
Thanks, @ocefpaf and @valentinedwv ! Good to know that the conda package already brings in those user/example files, even if they're in an awkward directory!
(Note: this is referring to
This is where we want to go for sure, but let's discuss more details before moving forward.
Yes, the user needs to edit some of those files, even in the simplest of cases. My understanding is that the customized files also need to be copied into the web-server file space. @lsetiawan, any comments? |
I really like this suggestion by @ocefpaf. I think a cli script would be the simplest way to get users setup with a folder that they can customize to their needs, making changes to the DAO script etc. Then specify the server to use those configuration. This was somewhat similar to the direction we are taking for ODM2Admin... @ocefpaf , regarding this:
I have started a docker image for the WOFPy installation, this one is test and still have lots of tweaking to do: https://hub.docker.com/r/lsetiawan/wofpy/ |
@lsetiawan my initial plan is to copy the files that @emiliom mentioned:
I would go for the whole directory structure and we can add instructions to that directory. However, in the future we can simplify that further with a single YAML config file (Not sure if that is possible though because I don't really understand all the moving parts of running WOFpy). @emiliom should I start coding the CLI tool to copy that directory in the user space? |
@lsetiawan, to help support discussions in #81, please add here a brief listing of:
Please don't bother explaining anything. Your installation docs already do that. I'm looking for something very brief and easy to read. A markdown table would probably do the trick. Thanks! |
@lsetiawan, just a reminder, in case this got lost among the many other WOFpy github communication. Thanks. |
What files copied from wof/examples need to be edited by a user (use odm2/timeseries as your example) The files that need to be edited by user for
What other files need to be edited or created (wgsi.py, etc?), if they're not from
For testing all you need to edit are odm2_config_timeseries.cfg and runserver_odm2_timeseries.py, then just execute For production, all files listed above should be edited/created. Thanks. |
Great, thanks! Regarding this:
Is the database connection the only thing that a user needs to customize on that file, typically? If it is, it seems like one setup simplification would be to move the database connection info to the |
Yea. This could possibly work, I'll take a closer look on
Because of how uwsgi do things, I think it's best not to use any command-line argument on production. The test-deployment documentation shows a command line argument because this is a quick test of the script, it doesn't use |
Ah. Got it. |
A summary of what we (@lsetiawan, @ocefpaf and me) decided on Friday 4/21:
See issue #81 for recent, additional related discussions and explanations. 5/1 update: Changed from bullets to a check list, so we can track progress more easily. |
Just to make recent discussion of issuing a new release more prominent ... @ocefpaf asked on the 26th, "I believe we are OK to issue a new release. What do you think?" @lsetiawan replied: "I think we need to update the README first before another release to include things about the wofpy_config. Also, I'm working on fixing the DAO's to be able to work with all 3 databases." And I replied: "Let's wait until I'm back, next week, before issuing a new release. I'd like the chance to review where we are and what was done this week." I think my answer for now is that a new release should include the items I outlined above, after our Skype call over a week ago. We still have some items left to do. Thoughts? |
I think we should go ahead with #111, pin it for the working version of |
As of 5/8/2017
|
No need to change it at this time. Wasn't And FYI, there are also a couple of other tests that are passing, according to Travis-CI; though we don't care about them much, it's nice to see. |
@ocefpaf, it looks like the main remaining wofpy task for you, from the most recent list of target tasks, is this:
This is partly dependent on decisions about directory names being implemented in PR #115. Those decisions are not settled, mainly due to me being too busy to review the PR :(. But would you be able to make some progress this week, before your travel starts? It'll be awesome if we can issue a wofpy release (and conda package) before you head out. Not sure we can do it, but let's try. |
Can we have a live meeting to discuss that? If you are too busy it can be @lsetiawan and myself, I have a few questions that may be easier and faster to ask over a call. |
@ocefpaf I am available whenever except Thursday. Thanks. |
Friday? (I am clocking out now 😩) |
Friday's good. :) Enjoy the rest of your day! |
Friday is good. We'll pick a time later. |
For reference, see these recent, important improvements and enhancements:
|
Note for follow-up: in the current production/server configuration (and also in the previous configuration), the database user & password are found in a file that's nominally exposed to the web. Can we change that in a way that doesn't make the setup much more complicated, and that works equally well for production and test deployments? |
@emiliom Do you mean the |
Yes; previously it was hard-wired in the runserver script, which is obviously also exposed.
You tell me! Is that doable? I hope so. If it is, we should probably recommend it in the documentation as a "best practice". |
Yea. That's doable. Definitely a great recommendation. |
Great. |
@ocefpaf: We've sorted out the installation steps for a live WOFpy setup on an Ubuntu server. See WOFpyODM2LBRproduction_installation_notes.md.
One of the installation steps we'd like to simplify or clarify is the "example" Data Access Object (DAO) code and configuration files for different data source types. This is currently under the
examples
directory (or really,examples/flask
; there's nothing else underexamples
). These can be viewed as template code and configurations that a user can take as-is and customize, ideally with only small changes to configuration files, not to the code (but a more enterprising user is free to alter the code as well, or write an entirely new DAO). Initially we'll focus on the twoodm2
DAO examples, since they are our priority.The conda package doesn't install these. The instructions we (@lsetiawan and I, mostly @lsetiawan, with a lot of input from @valentinedwv ) wrote ask users to clone the repo and then copy/grab the appropriate
examples
folder. How can we make this process simpler? You and I had had brief discussions about this previously.Also, do you have any suggestions for simplifying the steps laid out in those instructions? Though suggestions involving other installation steps probably belong in separate issues.
@valentinedwv, any thoughts on this?
Thanks!
The text was updated successfully, but these errors were encountered: