-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e40aaa
commit 10debd6
Showing
2 changed files
with
1 addition
and
22 deletions.
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
10debd6
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.
I don't understand this change. Has WSGI configuration moved elsewhere, or was this redundant? Are we no longer running web2py via WSGI?
10debd6
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.
Hey Jim - yeah I think reverting for updating this change likely makes sense. As we moved to different usernames on different machines, the paths in here were broken. e.g. /home/phylesystemapi/web2py/ vs /home/opentree/web2py/
Also I didn't want to be running web2py everywhere by default, as now most machines don't use web2py. But we need this section where we are using wbe2py. I wasn't sure if there were any concerns about leaving it in the config when we aren't using it. (other than the paths issue)
10debd6
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.
Hmm. It does seem like this setup tries to capture all web traffic (
/*
) and route it to web2py:WSGIScriptAlias / /home/phylesystemapi/web2py/wsgihandler.py
I suppose all our non-web2py services are able to respond because we're using RewriteRule abd ProxyPass to route to them.
Requests that don't match those patterns would fall through to web2py by default, which is not so bad I think. On a server that's not running web2py, these will produce an apache error, but I don't think that's any worse then a web2py error. Neither is going to be very friendly or informative. 😬
10debd6
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.
Oh, I missed this bit. Does this just trigger a warning from apache, or is it a show-stopper for deployment? If the latter, we'll need to come up with a test (during deployment) to see whether this particular server uses web2py, an omit this section if not.
10debd6
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.
Yeah - apache won't start up if the wrong paths are in there, so a bit more dynamic configuration is needed on deployment. It might actually not be the path... but the existence of the user itself.
10debd6
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. I'll look into adding a switch for this, based on the component(s) being deployed.
10debd6
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.
One interesting wrinkle so far... The switch (var
$installing_web2py
alongside$restart_apache
) is normally set based on the component(s) being deployed, but we have a componentapache
that rebuilds the apache config before restarting apache. By default, this won't recognize whether we're using web2py, so it will have the effect of removing the web2py-related apache configuration. I see a couple of options:Since the
apache
command is pretty much a convenience option topush.sh
, maybe we can just drop it? I think at this point most of us are using more direct options likessh admin@ot20 'sudo apache2ctl graceful'
.or we could add one more flag (
$update_apache_config=yes
) that's set tono
for theapache
command, so that is leaves everything in place and simply restarts apache. Thoughts?EDIT: This is one of those things that, as I wrote it, the solution seems clear enough. I'm going ahead with option (2) above, but of course opinions are welcome.
10debd6
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.
Sounds like a plan!