Roots Discourse

Guidance getting started for local development

I’m trying to follow the Roots Example Project instructions (https://github.com/roots/roots-example-project.com) in order to start familiarizing myself with Trellis.

When I run vagrant up (in order to add and activate Soil via vagrant ssh) the process hangs at Mounting NFS shared folders… followed by this message after quite some time:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o 'vers=3,udp' XXX.XXX.XXX.XXX:'/Users/[username]/Sites/example.com/site' /vagrant-nfs-example.com

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: Connection timed out

What am I missing?

Also, I could use some guidance setting up my wordpress_sites development for the Trellis set up in order to begin developing a site locally.


As a side note, I’m a designer/front-end developer who’s historically used MAMP to build sites and manually deploy via FTP, which I now understand is not the best way of doing things. The Bedrock/Sage/Trellis workflow interests me very much but I’m experiencing a lot of difficulty as a novice to the whole thing. I’ve taken to Sage fairly well, and bumbled my way through Bedrock using MAMP, but I want to correctly use the whole toolset and best practices. The community’s guidance is really important and appreciated.

Looks like: https://github.com/edx/configuration/wiki/Vagrant-troubleshooting#the-following-ssh-command-responded-with-a-non-zero-exit-status-

Thank you, @austin.

Running vagrant up has succeeded and I was able to run vagrant ssh – what appeared to be holding me back was my ESET firewall.

Next, when I try to add Soil I get an error that the composer command was not found.

vagrant@example:~$ cd /srv/www/example.com/current && composer require roots/soil
No command 'composer' found, did you mean:
 Command 'compose' from package 'mime-support' (main)
composer: command not found

Questions: Isn’t Composer just for managing dependencies locally during development? And how does the activation of Soil work when at this point I haven’t seen an actual WordPress install?

This leads me to my next question about configuring my wordpress_sites for developing locally.

The group_vars/development file is rather confusing at the moment. :confused:

Thank you for your time.

RE no composer: It probably didn’t provision all the way due to the Nfs error. run “vagrant provision”

1 Like

Running vagrant provision results in the following error:

TASK: [fail2ban | ensure fail2ban is configured] ****************************** 
fatal: [default] => Failed to template {{ lookup('file', '~/.ssh/id_rsa.pub') }}: could not locate file in lookup: ~/.ssh/id_rsa.pub

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/[username]/dev.retry

default                    : ok=7    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.

I’ve created a new local public key as instructed here: http://stackoverflow.com/questions/27279190/ssh-id-rsa-pub-not-found-error-while-installing-capistrano-as-ansible-playboo

Running vagrant provision succeeded and I’ve been able to vagrant ssh to install and activate Soil.

Now attempting to run npm install I get this error:

The program 'npm' is currently not installed. To run 'npm' please ask your administrator to install the package 'npm'

I don’t believe node and npm are installed on the box by default.

Thanks, @kalenjohnson.

So do I run npm and bower in my local directory as opposed to via ssh? The folders are synced, correct?

Once Sage is configured, how do I configure my group_vars/development file to see WordPress running locally? Specifically the site, admin, and database stuff.

How does the example.dev work vs. example.com?

I apologize if all of this is simple, but I just don’t understand how it all works yet. Seeing it work by doing it, then reviewing the documentation retrospectively really helps me understand what’s going on.

I see the site!!!

Scratch all of this. Case closed. Thank you @austin and @kalenjohnson for your guidance.

1 Like