-
Notifications
You must be signed in to change notification settings - Fork 826
[Bug 905834] Developer Vagrant environment #1999
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
Conversation
|
I'm going to look through this, but it would be good if someone else could review this too, since I've been fairly involved in writing this patch. |
bin/vagrant_provision.sh
Outdated
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.
Does this have version 0.90.10? If not, then we need to change this since the Elasticsearch folks change features between minor releases.
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.
This installs 0.90.13, which matches what I had on my laptop when I was helping Dean set this up. I guess I'm not on the right version either :\
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... I think we can get away with version mismatches for most things, but Elasticsearch versions get kind of funky. I highly recommend using 0.90.10 explicitly.
Having said that, maybe it doesn't matter. I don't know what the difference between 0.90.10 and 0.90.13 is. But we definitely can't be using a non-0.90.x version.
|
@mythmon mentioned that you were seeing really crazy issues with Mac OSX and |
|
The performance issues stem from using shared directories with Vagrant and Virtualbox. We didn't resolve that here by peep-ifying vendor/, but we should definitely create a bug for it. Oh, and before I thought vagrant was timing out from the path issues, but it turned out to be another problem. Starting kitsune is slow, but once it's started it works fine. |
manage.py
Outdated
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.
So what does this code do now? Is it fundamentally changing sys.path at all?
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.
It's only changing the order of the packages. Instead of putting new_sys_path packages at the front of sys.path, it appends them to the end. It makes lookup times much quicker because the more frequently used packages to run the server are already at the front of sys.path.
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.
Right... so what I'm getting at is that they were at the end after line 12 and then this code takes them off the end and puts them at the end which is fundamentally not changing sys.path at all. Does that make sense? You can probably check sys.path before and after to verify that.
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 see what you're saying. Yeah, I just removed all the custom path configuration code (other than the site.addsitedir(vendors) and it seems to be the same After discussions with you via IRC I'm gonna revert the commit and just peep'ify the vendor packages instead. It seems to be the best solution to this problem anyways.
0607196 to
1cbfa29
Compare
|
Fixed up the script to use peep (making the assumption the peep branch is merged). Works flawlessly with < 2 second load times! |
33c31ec to
a6f51fc
Compare
|
r? |
|
The most recent updates have rebased this branch off master so that it can use peep. To setup your VM, just checkout the branch and run: |
|
I'll try this out. Assume I know nothing about vagrant, what do I do after |
|
(I already have vagrant installed and had it setup for MDN before. I just don't remember the details on how to interact with it.) |
|
After vagrant up, you should be able to vagrant ssh and get into the box. Inside that there should be a fully working kitsune that you can start with manage.py that includes mysql, memcached, redis, es, etc. It should have generatedata, but nothing more. |
|
I think the vagrant environment is inextricably tied to the documentation for setting up development environments for contributors. I contend that this should include the changes to the hacking howto because the two should have been changed in tandem and testing both in tandem is important. |
|
Here is the end of my output for a |
|
I am able to ssh in, but I'm not sure what to do next. Should the virtual env be there already? |
|
I am guessing I have to create a virtualenv and run peep and all that? Or? Just wondering. I know mdn does it so that once you ssh in after |
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.
you could also just do this instead (probably a better idea):
./manage.py nunjucks_precompile
|
+1 for updating the docs |
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'm not sure why you're doing this ^ ^^ ^^^
|
@rlr From right where you ssh in: Let me know if you have any other issues, I'll be updating docs next. :) |
generatedata does not work in the VM. An anonymized dump of the production database should be used instead.
Mostly code cleanup, but we also check for the presence of git submodules now. If they aren't found, we show an error message then quit provisioning.
By moving the items to the back of the path, instead of the front, the lookup times for /vendor packages is halved. In the vagrant env we went from 1 minute 56 seconds load time for ./manage.py runserver to 54 seconds.
|
Added documentation. r? |
bin/vagrant_provision.sh
Outdated
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.
we don't have submodules anymore. So maybe we can remove this? @mythmon ?
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. We don't need to do anything with submodules anymore. I got rid of the last one recently.
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.
Fixed 💯
|
Looks like you rebased to something recent 👍 I just to have to go through and try it again. |
|
Fixed the unneeded submodule update in the provisioning script. r? |
|
AWESOOMMEEEEE. I just had to add --no-use-wheel to the peep install line. I'll add that in a separate commit. |
This adds an option to deploy kitsune via Vagrant with Ubuntu 14.04.