Closed Bug 1027664 Opened 7 years ago Closed 7 years ago

vagrant not working as documentation implies

Categories

(Socorro :: Infra, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lonnen, Unassigned)

Details

http://socorro.readthedocs.org/en/latest/installation/vagrant.html#vagrant-chapter

The docs imply that if you set up a host file and run `vagrant up` without error you'll have a working box. Unfortunately ted and I both get 404's when we walk through it.

I tried `make install` inside the VM and had some python issues. After blowing away the venv it progresses a little farther, but then it can't find pg_config. I thought maybe it was on the path of the socorro user and tried to switch, only to be told there is no socorro user.
(In reply to Chris Lonnen :lonnen from comment #0)
> http://socorro.readthedocs.org/en/latest/installation/vagrant.html#vagrant-
> chapter
> 
> The docs imply that if you set up a host file and run `vagrant up` without
> error you'll have a working box. Unfortunately ted and I both get 404's when
> we walk through it.


Do you mean you expect to have a working Socorro install when it's done? I thought that was covered here:
http://socorro.readthedocs.org/en/latest/installation/vagrant.html#that-s-it

Faster than installing from source would be to use the deploy script linked from there:
http://socorro.readthedocs.org/en/latest/installation/install-binary.html

We *could* use the base box that Jenkins builds to get a base box that already has this run, and would not 404 after "vagrant up", or we could have vagrant run the deploy script, but I wanted to get the box up and available with all dependencies ASAP for hacking purposes.


> I tried `make install` inside the VM and had some python issues. After
> blowing away the venv it progresses a little farther, but then it can't find
> pg_config. I thought maybe it was on the path of the socorro user and tried
> to switch, only to be told there is no socorro user.

There's a note about the virtualenv issue, I'd love to have a better way:
http://socorro.readthedocs.org/en/latest/installation/vagrant.html#virtualenv-warning

Re: the pg_config, do you have export PATH=$PATH:/usr/pgsql-9.3/bin/ per http://socorro.readthedocs.org/en/latest/installation/install-src.html#setting-up-environment ?

Postgres gets installed to a non-standard location, since the packages available on CentOS right now are way too old and we use PGDG (this is what Mozilla does for prod too)
OK so despite my responses in comment 1, I think this should be better - after chatting with ted here are some concrete suggestions:

1) use socorro-vagrant base box (this'll give some instant gratification after "vagrant up" and be faster than our current approach)
2) split "install from source" into two chapters (dev and prod)
3) script more of the "dev install from source" chapter and remove a lot of the superfluous language

The "production install from source" is already being scripted in deploy.sh, so we can kill most of that soon too.

The only annoying thing about #3 is dealing with all the RHEL-specific path stuff, so we get the right Postgres and GCC. Historically we've left that out of Socorro and in the docs, but I don't think that approach is really helping anybody.
(In reply to Robert Helmer [:rhelmer] from comment #2)
> 2) split "install from source" into two chapters (dev and prod)

PR: https://github.com/mozilla/socorro/pull/2135
(In reply to Robert Helmer [:rhelmer] from comment #2)
> 1) use socorro-vagrant base box (this'll give some instant gratification
> after "vagrant up" and be faster than our current approach)
...
> 3) script more of the "dev install from source" chapter and remove a lot of
> the superfluous language

After discussion w/ ted in IRC, let's forget about #1 and just do #2... if we provide a very simple sequence to get Socorro from checkout->running (in dev mode), then we can have vagrant+puppet call that.

Then post-vagrant instructions would become:

vagrant ssh
cd src/socorro
honcho start

These instructions could live in http://socorro.readthedocs.org/en/latest/installation/vagrant.html so there's no additional install steps necessary to link to.
Commits pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/d644717a0d05f12c94190e1f5f6188283ba942a1
bug 1027664 - split dev/prod install docs

https://github.com/mozilla/socorro/commit/07815a749a13b86fbee09b7023ce958a908fdbbc
Merge pull request #2135 from rhelmer/bug1027664-split-install-src-doc

bug 1027664 - split dev/prod install docs
Target Milestone: --- → 90
Target Milestone: 90 → 91
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.