rave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jmeas Apache <jmeas.apa...@gmail.com>
Subject Re: Using Vagrant/Grunt for the development environment
Date Tue, 15 Jul 2014 14:20:57 GMT
Chris, what issue were you having when you tested it out? Presently I'm
unable to get past the login screen.

Matt, have you been able to log in since the rebase?

The latest commit to the Angular branch adds Vagrant and Grunt to the
config, so you can use those if you'd like. Do note that we haven't hooked
up the Grunt task to emit an event when the app is finally running, so you
sort of need to 'guess' when the cargo:run command is complete. Or you can
just run it manually from the VM.

I'm thinking this require.js issue and inability to log in is likely
related to the failing unit tests that came after the rebase of the Angular
branch.


On Mon, Jul 7, 2014 at 11:30 AM, Chris Geer <chris@cxtsoftware.com> wrote:

> On Mon, Jul 7, 2014 at 7:19 AM, Jmeas Apache <jmeas.apache@gmail.com>
> wrote:
>
> > Hey Chris,
> >
> > This sounds promising, but I'm unable to follow your instructions on
> making
> > it work.
> >
> >
> >
> > *Themissing piece for me at least was having git installed on the VM,
> > otherwiseit wasn't seeing the correct branch.*
> >
> > Interesting...the Vagrantbox is configured to map the project's directory
> > to the /rave directory on the box. So if you're on the angular branch,
> then
> > it, too, should show the files on the Angular branch. This typically
> allows
> > you to work on a repository without having Git installed on the box
> unless
> > you plan to commit/push from the Vagrantbox...but generally there's no
> > reason to adopt that new workflow. It wasn't mapping your directories for
> > you?
> >
> >
> > *I think the issue you were seeing was that you weren't building
> > thesoftware inside the VM..**Two solutions to this, build inside*
> > *the VM or mount your local maven repo into the VM.*
> >
> > Hmm, could you explain this a bit more? Due to the mapping, any action
> > taken in either location should affect the other all the same. Ansible is
> > set up to run the install from the VM itself, though as far as I know
> this
> > would be no different from running it outside the box (assuming you have
> > Maven). I'm also SSHing onto the box to run the cargo command. Is there
> > something I'm missing here?
> >
> > Second question: local Maven repo? I'm not too familiar with Maven. Our
> > Ansible role seems to just be pulling down binaries.
> >
> >
> >
> >
> > *The last missing pieces is the configuration. Since you are no
> > longeraccessing it from localhost you need to go into the config and
> change
> > therave settings to point to the Shindig address at the VM ip. The
> downside
> > ofthat is it prevents you from running locally with cargo:run.*
> >
> > Would you care to make a PR for this against my branch / provide more
> > specific details (which file, which configuration option)? I'm not too
> sure
> > what 'config' you're referring to. As an aside, I think whether we run on
> > the box or locally can be made transparent to the user through
> > Grunt/Vagrant, so the location that we execute commands on shouldn't
> matter
> > *too* much in the end, I hope.
> >
> >
> >
> > *To me I think the value of Vagrant in this case is to have it
> > runninginside a more "production" like environment with Tomcat and
> > mysql/mongo forexample. Cargo would be kept locally in my mind.*
> >
> > Interesting thoughts. The base-line use case for Vagrant that we're
> working
> > toward right now is to allow anyone to run this application without
> > installing any dependencies whatsoever locally (aside from, you know,
> > Vagrant). I'd like to hear more about this plan, though. Would this
> require
> > the user to have Maven installed locally?
> >
>
> Just to touch on this for a second, if you are trying to do development on
> Rave, there are no dependencies required other than Java and Maven.
> Everything is handled automatically through Maven. I'm not sure Vagrant
> helps much there, and in fact I think is complicating it for you guys. Now
> in a "production" environment where you want to run inside of Tomcat and
> use MySQL/MongoDB, there is some value.
>
> >
> >
> > On Sun, Jul 6, 2014 at 4:26 PM, Chris Geer <chris@cxtsoftware.com>
> wrote:
> >
> > > I was able to get it all running, not working correctly, but running.
> The
> > > missing piece for me at least was having git installed on the VM,
> > otherwise
> > > it wasn't seeing the correct branch.
> > >
> > > I think the issue you were seeing was that you weren't building the
> > > software inside the VM. The way cargo works is it looking in the maven
> > repo
> > > for the files to deploy. So since you didn't build inside the VM it
> > wasn't
> > > able to find the WAR files to deploy. Two solutions to this, build
> inside
> > > the VM or mount your local maven repo into the VM.
> > >
> > > The last missing pieces is the configuration. Since you are no longer
> > > accessing it from localhost you need to go into the config and change
> the
> > > rave settings to point to the Shindig address at the VM ip. The
> downside
> > of
> > > that is it prevents you from running locally with cargo:run.
> > >
> > > To me I think the value of Vagrant in this case is to have it running
> > > inside a more "production" like environment with Tomcat and mysql/mongo
> > for
> > > example. Cargo would be kept locally in my mind. To that end, the key
> > would
> > > probably be to point Tomcat to the two deployed war files and setup the
> > > configuration properly, that would add a lot of value and since Tomcat
> > > would redeploy when the files change it would keep up to date. That
> makes
> > > it so you don't have to have all the maven stuff inside the VM. You
> could
> > > then add some serious scripting to the vagrant provisioning to allow
> you
> > to
> > > force a "restart" which would clear the DB and everything and reboot
> > > getting all new data. Just my 2-cents but I think that has potential.
> > >
> > > Chris
> > >
> > >
> > > On Sun, Jul 6, 2014 at 8:52 AM, Jmeas Apache <jmeas.apache@gmail.com>
> > > wrote:
> > >
> > > > Gotcha. My thinking now is to use Grunt to start the dev environment,
> > > > including starting the webserver, so the cargo:run command wasn't set
> > up
> > > to
> > > > be handled by Vagrant. Maybe this separation of concerns needs a bit
> of
> > > > tweaking.
> > > >
> > > > For now, you can manually start it by ssh'ing onto the box and
> > executing
> > > > the command in the README from the project directory.
> > > >
> > > > Matt Franklin/Chris Geer, if either of you would have time early this
> > > week
> > > > (Mon/Tues?) to chat over IRC or Google Hangouts that'd be really
> useful
> > > for
> > > > us, I think. Once we have the Angular branch up and running, we
> should
> > be
> > > > able to iterate quickly on it. But right now we're having trouble
> > getting
> > > > there without help, and the dev emails are a slow process for this
> > > blocking
> > > > issue. With luck there's something simple that we're missing!
> > > >
> > > > Would either of you be available early next week?
> > > >
> > > > On Sat, Jul 5, 2014 at 1:28 AM, Chris Geer <chris@cxtsoftware.com>
> > > wrote:
> > > >
> > > > > Well, haven't made it that far yet. Given the VM has Tomcat I was
> > > > expecting
> > > > > it to include the full setup. I will have to play with it more to
> > > > > understand exactly what it includes.
> > > > >
> > > > >
> > > > > On Fri, Jul 4, 2014 at 2:42 PM, Jmeas Apache <
> jmeas.apache@gmail.com
> > >
> > > > > wrote:
> > > > >
> > > > > > Cool. Did the cargo:run command throw any errors, or did that
> also
> > > work
> > > > > for
> > > > > > you?
> > > > > >
> > > > > > On Friday, July 4, 2014, Chris Geer <chris@cxtsoftware.com>
> wrote:
> > > > > >
> > > > > > > I got it running. The issue was I use ssh-agent and therefore
> it
> > > was
> > > > > > > failing because it was using the wrong key.
> > > > > > >
> > > > > > >
> > > > > > > On Fri, Jul 4, 2014 at 12:18 PM, Jmeas Apache <
> > > > jmeas.apache@gmail.com
> > > > > > > <javascript:;>>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > Chris, could you run vagrant provision -vvvv and post
it to a
> > > gist
> > > > > > > > <https://gist.github.com/>?
> > > > > > > >
> > > > > > > >
> > > > > > > > On Fri, Jul 4, 2014 at 1:45 PM, Chris Geer <
> > > chris@cxtsoftware.com
> > > > > > > <javascript:;>> wrote:
> > > > > > > >
> > > > > > > > > I can't seem to get it running. Here is what
I get.
> > > > > > > > >
> > > > > > > > > ==> default: Running provisioner: ansible...
> > > > > > > > >
> > > > > > > > > PLAY [all]
> > > > > > > > >
> > > > >
> ********************************************************************
> > > > > > > > >
> > > > > > > > > GATHERING FACTS
> > > > > > > > >
> > ***************************************************************
> > > > > > > > >
> > > > > > > > > fatal: [default] => SSH encountered an unknown
error during
> > the
> > > > > > > > connection.
> > > > > > > > > We recommend you re-run the command using -vvvv,
which will
> > > > enable
> > > > > > SSH
> > > > > > > > > debugging output to help diagnose the issue
> > > > > > > > >
> > > > > > > > > TASK: [oracle-java7 | Check whether or not oracle-java7
is
> > > > > currently
> > > > > > > > > installed] ***
> > > > > > > > >
> > > > > > > > > FATAL: no hosts matched or all hosts have already
failed --
> > > > > aborting
> > > > > > > > >
> > > > > > > > > PLAY RECAP
> > > > > > > > >
> > > > >
> ********************************************************************
> > > > > > > > >
> > > > > > > > >            to retry, use: --limit
> > > > > > > @/Users/cgeer/rave-local-playbook.retry
> > > > > > > > >
> > > > > > > > > default                    : ok=0    changed=0
> >  unreachable=1
> > > > > > > > > failed=0
> > > > > > > > >
> > > > > > > > > Ansible failed to complete successfully. Any
error output
> > > should
> > > > be
> > > > > > > > >
> > > > > > > > > visible above. Please fix these errors and try
again.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Fri, Jul 4, 2014 at 9:11 AM, Jmeas Apache
<
> > > > > jmeas.apache@gmail.com
> > > > > > > <javascript:;>>
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Ross Gardler, you can see a Vagrant configuration
for the
> > > > Angular
> > > > > > > > branch
> > > > > > > > > > over at:
> > > > > > > > > >
> > > > > > > > > > https://github.com/jmeas/rave/tree/ng-vagrant
> > > > > > > > > >
> > > > > > > > > > The instructions for installation are in
the README.
> > > > > > > > > >
> > > > > > > > > > Note that the installation may fail during
the
> `cargo:run`
> > > > stage
> > > > > > due
> > > > > > > > to a
> > > > > > > > > > missing dependency. This is an active issue
we're working
> > to
> > > > > solve.
> > > > > > > > > There's
> > > > > > > > > > a separate issue thread (the only other
active one for
> the
> > > Rave
> > > > > > > project
> > > > > > > > > > this week) regarding this.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Fri, Jul 4, 2014 at 3:59 AM, Ross Gardler
<
> > > > > > > > rgardler@opendirective.com <javascript:;>
> > > > > > > > > >
> > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > I want to see a VagrantFile for Rave.
I had intended to
> > > hold
> > > > > one,
> > > > > > > but
> > > > > > > > > it
> > > > > > > > > > > has never made it to the top of my
to-do list.
> > > > > > > > > > >
> > > > > > > > > > > Would love to see one (and help improve
it I hope)
> > > > > > > > > > > On 1 Jul 2014 21:04, "Jmeas Apache"
<
> > > jmeas.apache@gmail.com
> > > > > > > <javascript:;>> wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Apache Rave is a non-trivial application
to get up
> and
> > > > > running
> > > > > > > on a
> > > > > > > > > new
> > > > > > > > > > > > machine. Carl and I are thinking
things could be
> > greatly
> > > > > > > simplified
> > > > > > > > > > with
> > > > > > > > > > > > tools like Vagrant, Ansible and
Grunt, so we'd like
> to
> > > hear
> > > > > the
> > > > > > > > > > thoughts
> > > > > > > > > > > of
> > > > > > > > > > > > the Rave community on adding these
tools.
> > > > > > > > > > > >
> > > > > > > > > > > > Our thoughts now are placing all
of the Java &
> > > Java-related
> > > > > > > > > > dependencies
> > > > > > > > > > > to
> > > > > > > > > > > > the Vagrant box. This will allow
anyone to get the
> Java
> > > > > > > environment
> > > > > > > > > by
> > > > > > > > > > > > simply running `vagrant up`, instead
of figuring out
> > all
> > > of
> > > > > the
> > > > > > > > > > > > dependencies on their local machine.
> > > > > > > > > > > >
> > > > > > > > > > > > A PR that introduces Vagrant (with
Ansible for
> > > > provisioning)
> > > > > > can
> > > > > > > be
> > > > > > > > > > seen
> > > > > > > > > > > > over here:
> > > > > > > > > > > >
> > > > > > > > > > > > https://github.com/apache/rave/pull/2
> > > > > > > > > > > >
> > > > > > > > > > > > and on Jira at:
> > > > > > > > > > > >
> > > > > > > > > > > > https://issues.apache.org/jira/browse/RAVE-1099
> > > > > > > > > > > >
> > > > > > > > > > > > For development, we're thinking
a typical Grunt
> > workflow
> > > > > could
> > > > > > be
> > > > > > > > > > > > incorporated to make things really
nice. The Tomcat
> > > server
> > > > > > could
> > > > > > > be
> > > > > > > > > > > booted
> > > > > > > > > > > > up with a Grunt command, files
could be linted and
> > built,
> > > > > > > > > > > > unit/integration/functional/whatever
tests we want to
> > add
> > > > can
> > > > > > be
> > > > > > > > done
> > > > > > > > > > > > automatically, and to top it off
it can all be
> > performed
> > > as
> > > > > you
> > > > > > > > work
> > > > > > > > > > with
> > > > > > > > > > > > watch.
> > > > > > > > > > > >
> > > > > > > > > > > > We're working on an initial Grunt
PR now, and should
> > have
> > > > it
> > > > > > > ready
> > > > > > > > > > soon.
> > > > > > > > > > > At
> > > > > > > > > > > > first it will just do simple things,
and can be
> > iterated
> > > > upon
> > > > > > > > later.
> > > > > > > > > > > >
> > > > > > > > > > > > What do y'all think?
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message