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

[Staging] Changes to enable staging instance. #1089

Merged
merged 1 commit into from
Dec 12, 2016

Conversation

icarito
Copy link
Member

@icarito icarito commented Dec 12, 2016

Make sure these boxes are checked before your pull request is ready to be reviewed and merged. Thanks!

  • all tests pass -- rake test:all
  • code is in uniquely-named feature branch, and has been rebased on top of latest master (especially if you've been asked to make additional changes)
  • pull request is descriptively named with #number reference back to original issue
  • if possible, multiple commits squashed if they're smaller changes
  • reviewed/confirmed/tested by another contributor or maintainer
  • schema.rb.example has been updated if any database migrations were added

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/wiki/contributing-to-public-lab-software

We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays. Please alert developers on plots-dev@googlegroups.com when your request is ready or if you need assistance.

Thanks!

This patch sets up Solr into its own independent container.

A Travis server has been setup to build and deploy automatically upon commit to stable branch.

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016

I've just enabled the Jenkins integration that will deploy to staging in Tycho (on push to stable branch).
Let's test it!

Results should be visible in https://testing.laboratoriopublico.org/

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016

Here's the Jenkins log (i've enabled public read-only access).

https://testing.laboratoriopublico.org/dashboard

@jywarren
Copy link
Member

jywarren commented Dec 12, 2016 via email

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016 via email

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016 via email

@jywarren
Copy link
Member

Just wondering about the changes to lib/tasks/test.rake -- they were partially intended to allow people to run solr tests locally without too much configuration change. Will that still be possible, or would it now be container dependent? And if not, might we make a separate"manual" solr rake test task?

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016 via email

@jywarren
Copy link
Member

jywarren commented Dec 12, 2016 via email

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016 via email

This patch sets up Solr into its own independent container.

A Travis server has been setup to build and deploy automatically upon commit to stable branch.
@jywarren
Copy link
Member

jywarren commented Dec 12, 2016 via email

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016

Note earlier I pushed a commit amendment withdrawing changes to test.rake.
With respect to Gemfile.lock, yes, what I understand is that it's a way to lock to versions known to work. It can be remove and regenerated when it is desired to upgrade, for instance.

@jywarren jywarren merged commit 024f4de into publiclab:stable Dec 12, 2016
@jywarren
Copy link
Member

Merged!

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016 via email

@jywarren
Copy link
Member

Ack, sorry I didn't notice that this was a PR against the stable branch -- I'd have expected any changes to happen on master first, since our flow is master => stable. But I don't want to revert now. Shall we open a PR to merge stable into master, just this once?

@jywarren jywarren mentioned this pull request Dec 12, 2016
6 tasks
@icarito
Copy link
Member Author

icarito commented Dec 12, 2016 via email

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016 via email

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016

By the way, the build results are at http://tycho.media.mit.edu:8080/job/Plots-Staging/

@jywarren
Copy link
Member

jywarren commented Dec 12, 2016 via email

@jywarren
Copy link
Member

@icarito - just checking if this is ready for merge into master, as we have a couple other PRs in the queue. Thanks!

@icarito
Copy link
Member Author

icarito commented Dec 12, 2016 via email

@jywarren
Copy link
Member

Done!

jywarren added a commit that referenced this pull request Dec 13, 2016
This patch sets up Solr into its own independent container.

A Travis server has been setup to build and deploy automatically upon commit to stable branch.
@icarito
Copy link
Member Author

icarito commented Dec 13, 2016

Going deeper into this:
I honestly don't think the embedded Solr engine should be used for anything.

I'm fine with that as a policy - but we should update the README
accordingly. If this pr doesn't depend on this change in policy, perhaps we
can open an issue for it in the project repository so there's a "paper
trail"?

And itll be less of an issue as we shift towards using docker for the
developer install process itself, which is probably a good idea.

I wasn't precise - I meant for anything user-facing. Developers should be free to use the embedded engine if it suits them best. I don't think we should require Docker for casual developers (or Java, unless they specifically want to work on Solr). Casual developers probably won't be running tests either, since Travis does this already - We need to get Travis to notice when tests fail though -> https://github.com/jywarren/web/issues/70

Gemfile.lock sounds fine -- does the install/deploy process change as a
result? This essentially locks gem versions, doesn't it?

The current practice can continue, some care should be taken to avoid committing this file accidentally (it's already in .gitignore, so to commit it you need to -f force it).

Every now and then it can be removed and created again by Bundler, when wanting to upgrade Gems.

@jywarren
Copy link
Member

Casual developers probably won't be running tests either, since Travis does this already

This isn't something I'd anticipated when we first got it running, but increasingly I've seen this to be workable... esp. for first-timers, who can later move on to a) a containerized version on Cloud9, and/or b) their own local version. So -- really great! Lower barrier!

But yeah, one reason I moved the Solr tests to their own suite that doesn't run on rake test, but only on rake test:all, is to not require any Solr anything by default.

But since running Solr tests locally, without Docker, turned out to be a bit more complex, and had this kind of silly set of requirements, like changing the config file and then changing it back afterwards, we set up the rake test:solr task to streamline this for local testing, and to document it.

It seems like we may have 2 use cases: local Solr testing (and its eccentricities) and Travis automated Solr testing (which should be container-based). Can we preserve the first as rake test:solr:local (or something) and the latter as rake test:solr (maybe as default) and rake test:solr:containerized?

For Gemfile.lock, should we put a note somewhere (like at the top of Gemfile, or even in the PR template) to update it in these scenarios? It sounds like something easy to forget at deploy time, though I guess tests will help us catch it, so maybe it's not needed.

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