Using two dev machines + syncing working dirs

Hi! :slight_smile:

I have a question: With all the building and automated testing whilst the browsers are reloading, my development machine sometimes gets slower… and sometimes I’d like to run integration tests against a checkout without slowing down my machine.

So, actually two different questions :slight_smile: But i’m interested in answers to both of them.

Now, I have an additional Quad-Core Macbook Pro around which should be good to take off some of the load. Both machines are current macs by the way.

Question is: How would I structure this in the easiest way possible?

Wishlist:

  • Can just switch to local development in case i’m on the road; eg. not switch the Project in the IDE, my Git Repo viewer etc
  • Easy / full access to remote system
  • ?

-> My basic idea:

  • Create an additional user on the other machine and log in / access it using ssh to eg. start + restart meteor, tests and what have you (finally learn TMUX maybe? :slight_smile: )
  • Maybe create two different checkouts there so i can run long running tests against one version of the app while working with the other
  • Set up File Syncing from my work machine to the secondary machine to immediately mirror file changes I do on my local machine on the remote machine. This should go as fast as possible, especially eg. in the case of switching branches etc which potentially change dozens of files. Any recommendations here for a cool, fast network mounting / syncing idea?

-> So that’s basically it, how can I set up a secondary machine to easily develop on when I want to and maybe also run tests?

Does anybody have any tipps / experience with a setup like this?

Thanks Folks! :slight_smile:

Syncing of working dirs is definitely through a versioning tool like git. We normally run our tests automatically in the cloud but initially, we only have a mac mini in the office which clones a fresh project from git and run the automated tests everytime we merge to our main branch. Everything is handled by gitlab pipelines

If the main objective is to have a CI/CD environment where your application is getting built and all the tests run upon each git push or merge, you might want to consider using Jenkins or a similar product. Here is an example of how to set up Jenkins for a similar task: Build a Node.js and React app with npm (in Jenkins).

I haven’t done exactly this, but I do have a working setup to sync work dirs (excluding node_modules) using Resilio Sync. It’s pretty fast because it uses bittorrent for peer to peer syncing, so it’ll do it over the LAN instead of to and from the cloud. But does mean both machines need to be on for syncing to work, or sync to more targets. I have 2 dev machines + home NAS + cloud server syncing, which removes the restriction to have both dev machines running.
The other reason I use it is because it supports .gitignore style syntax for ignoring stuff like node_modules.

I think it would be fast enough to run meteor and/or tests on a second machine, depends how much of a delay is tollerable

Hi and thank you all for your ideas & suggestions.

I’m gonna play with it a bit & see what’ll come of it.

Yeah, tests could be running somewhere in a pipelie, that’d be easier maybe / more scalable than on a local machine. We actually got a build pipeline up and running, so that’s actually kind of an obvious choice in hindsight! :slight_smile:

-> The other thing: Maybe it’s actually easiest to try and work using a network mount or actually logged in into the other machine… and just don’t bother with the syncing…

I’ll see what I’ll end up trying & i’ll report my findings here when I have some :slight_smile: