Skip to content
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

Commited WiP files for publication #833

Closed
wants to merge 11 commits into from

Conversation

martin-bts
Copy link

  • both files will be removed before this work is finished
  • these are my current thoughts and first implementation
  • this is not integrated into Askbot. You can read deployments.md
    locally and run dev_django.py in a virtualenv to play around with
    the classes.

* both files will be removed before this work is finished
* these are my current thoughts and first implementation
* this is not integrated into Askbot. You can read deployments.md
  locally and run dev_django.py in a virtualenv to play around with
  the classes.
@evgenyfadeev
Copy link
Member

evgenyfadeev commented Aug 11, 2019

Re: overwriting files by the install script - I agree, it's not necessary, we should just tell them - either reconcile the files manually or choose a new directory.

On the directory structure: imo as default solution your proposal works, but I would leave an option to specify custom locations of docs, cron, upfiles, logs. (docs may be suppressed, because not everyone needs them)

Also I have quite a strong wish in the default directory structure to move "cron", "upfiles", "docs" dirs directly alongside with the manage.py. It's just that flatter is better than nested;).

Thank you for your effort!

! Apparently the installer (and tox) requre the env var SECRET_KEY
  to be set in current 0.11.x upstream

* created deploy_askbot_new() and use it as a drop in replacement
  for deploy_askbot()
* modified deployed directory structure to include Evgeny's suggestion
  from ASKBOT#833
* Added new deployable EmptyFile to accomodate the empty log file
@martin-bts
Copy link
Author

When we just look at creating files and directories, I think this is a viable approach. I added unittests that suggests everything works just fine, if sensible parameters are provided. Still not done.

For best results this should be used/merged with #827. I haven't attempted this yet!

@martin-bts martin-bts marked this pull request as ready for review August 15, 2019 20:04
@martin-bts
Copy link
Author

DO NOT MERGE THIS! THIS IS FOR REVIEW ONLY!

The logic seems in a pretty good state now. When I run tox -e setup the resulting file structure is:

deploy_askbot/
deploy_askbot/doc
deploy_askbot/cron
deploy_askbot/cron/send_email_alerts.sh
deploy_askbot/manage.py
deploy_askbot/deploy_askbot
deploy_askbot/deploy_askbot/django.wsgi
deploy_askbot/deploy_askbot/urls.py
deploy_askbot/deploy_askbot/__init__.py
deploy_askbot/deploy_askbot/celery_app.py
deploy_askbot/deploy_askbot/settings.py
deploy_askbot/static
deploy_askbot/upfiles
deploy_askbot/log
deploy_askbot/log/askbot.log

( static and doc pruned for readability)

There are nine unit tests that ensure the basic functionality of the DeployObjects and the predefined DeployableComponents. The output the installer generates is quite messy, but that is really just an optical issue.

This branch already includes @evgenyfadeev 's comment on changing the layout and the installer giving user feedback instead of overwriting existing files. askbot.deployment.AskbotSetup.deploy_askbot_new illustrates how the predefined DeployableComponent ProjectRoot is modified to include the log dir and file (askbot/deployment/__init__.py, lines 409-411, at the time of this writing). This very mechanism can be used to facilitate custom locations of docs, cron, upfiles, logs. However, this can only be sensibly implemented together with #827

I'll go ahead and create a new branch where I merge this branch and the one for #827.

@martin-bts martin-bts mentioned this pull request Oct 10, 2019
@martin-bts
Copy link
Author

martin-bts commented Oct 14, 2019

Superceeded by #849

@martin-bts martin-bts closed this Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants