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

Put jetty config under version control #248

Merged
merged 6 commits into from
Dec 13, 2017
Merged

Put jetty config under version control #248

merged 6 commits into from
Dec 13, 2017

Conversation

reginafcompton
Copy link
Contributor

@reginafcompton reginafcompton commented Dec 8, 2017

Another step for this issue: datamade/django-councilmatic#157

@evz, I did this for deployment. Do you think it's okay to restart jetty with every Metro deployment? It seems like that could cause unwanted blips.

mv -f $APP_PATH/configs/jetty.conf /etc/default/jetty
chown root.root /etc/default/jetty
service jetty restart

@evz
Copy link
Contributor

evz commented Dec 8, 2017

Yeah let's see if there's an option to just reload the config without restarting.

@reginafcompton
Copy link
Contributor Author

@evz - in the Upstart file I only see options for: start, stop, restart, supervise, run|demo, and check (which just "echos" the various config arguments). What do you think about requiring a manual restart for this step? (I cannot imagine needing to adjust jetty configurations very often.)

@evz
Copy link
Contributor

evz commented Dec 12, 2017

Ooo, hey why don't we try this: https://wiki.apache.org/solr/CoreAdmin#RELOAD

As part of the deployment, just visit that URL using curl or something.

@reginafcompton
Copy link
Contributor Author

@evz - this loads a new schema file for Solr 4, so we should implement this as part of the deployment...but does it reload Jetty configuration?

@evz
Copy link
Contributor

evz commented Dec 13, 2017

Nope. I suppose if we want to do that, we'll want to do a manual restart. Changes like that seem a bit more fundamental.

@reginafcompton
Copy link
Contributor Author

New deployment pattern:

# Move jetty config files to correct place
mv -f $APP_PATH/configs/jetty.conf /etc/default/jetty
chown root.root /etc/default/jetty

# Reload nginx and supervisor files, so it recognizes updated configs
service nginx reload
supervisorctl update 

# Move solr schema to correct place and reload
cp $APP_PATH/solr_scripts/schema.xml /opt/solr/multicore/$SOLR_CORE/conf/
wget "http://localhost:8983/solr/admin/cores?action=RELOAD&core=$SOLR_CORE"

@reginafcompton reginafcompton merged commit 6fe7cca into master Dec 13, 2017
@reginafcompton reginafcompton deleted the solr-listen branch December 13, 2017 16:12
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