I am somewhat new to Front-end and WordPress Dev. I was able to get a local dev environment set up with trellis and now im trying to run the ansible staging command to a remote digital ocean droplet.
I’m installing on just an Ubuntu $5 dollar droplet and I get this final play recap.
To access the server over the IP instead of the domain, you will need to add the server IP to the site_hosts config for whatever environment you want that access on (in your case, staging).
You can set multiple so having a staging subdomain in addition to the IP is fine.
Re-provision the server afterwards and you should be fine.
Because you haven’t setup DNS to point that host to your server. That doesn’t happen automatically when you provision a remote server, you need to go and do that yourself.
cannot resolve staging.hthroots.com: Unknown host
I edited my hosts file so that I could try and hit your site which is returning a 404. Looks like you still need to deploy to the remote server.
Given your site namehthroots.com, try this command instead:
./deploy.sh staging hthroots.com
The dict object (“dictionary”) in the error message is wordpress_sites. In your case, one item in that list of wordpress_sites falls under the header (“attribute”) hthroots.com, but none falls under the header staging.hthroots.com.
I realize it could be confusing. Although the README says that this command parameter is <site_name>, the docs currently say <domain>. This latter might make you think to add the staging part of the domain name. The idea, however, is that domain refers to the domain of the overall project (hthroots.com), for which there are multiple environments (development, staging, production).
Just a quick follow up. I provisioned the server for hthroots.com and added that domain to DO. I still get an error that it could not read from the remote repository. I have my repository set as private. Could that be blocking the deploy command?
The ERROR: Repository not found seems important. Have you misspelled your username in specifying your repo? Should it be jaroot32 instead of jroot32?
If that doesn’t resolve the issue, if you really have a repository at jroot32/hthrootsexample.git, you may be experiencing an issue authenticating to your private github account. You could search Roots discourse for things like “ssh forwarding” and “ssh agent” and “clone repo”.
Thanks! I did leave out my middle initial lol. I’m going to work on this a little bit as a few more errors popped up about not having a composer file committed to the repository…If I’m using this deploy method then I don’t have to bother with capistrano, correct?
Hah! Sorry, I know that’s annoying. I read a post you made on editing the deploy file and I provisioned the server and then deployed and this error came up. I’ve tried reinstalling ansible as someone with this error on the forums tried that and it worked but no dice for me. I’m trying to deploy onto an ubuntu server but wondering if I also need WordPress already installed on that server as well before deploying.
@Jonathan See if discourse#4523 helps (make sure your theme is on remote server, update your rsync version, and deal with subtree variable if necessary). I’m not sure which version of Trellis you are using, so note that since that thread, the subtree variable was renamed subtree_path on Sep 6, 2015, then repo_subtree_path on Dec 29, 2015.
If your Trellis version is as new as Dec 28, 2015 and roots/trellis#454 hasn’t yet been merged, you could see if it helps to edit your hosts/development file: