Moving from local Trellis dev environment to staging on Digital Ocean

I’ve managed to get trellis working pretty much correctly (as far as I can tell) on my Windows machine. Now I’m trying to get my development site onto Digital Ocean as a staging server.

So you can’t run ansible on windows, but you can vagrant ssh into the local dev box and run ansible on there. It mirrors the trellis directory on your dev machine to a “vagrant” directory on the virtual box.

So then I ran the command it tells you to. God I just closed tabs so I don’t know what that is, but its like ansible up -e env=staging (it’s on the docs).

Anyways, it kept not being able to connect to the digital ocean server.

What I had to do was create a SSH key within the local vagrant box and then add that as a key on the digital ocean server. Now I was able to run the ansible command, and it appears to be “provisioning”,

Will report back once this (apparently very long) process finishes and let you all know if it managed to set everything up right on the digital ocean box.

If so, I’ll update with a full walk through for someone who’s on Windows using Trellis and wanting to use Digital Ocean as a staging server.

In the meantime, has anyone else managed to get this working? Maybe there’s an easier way or something.

1 Like

I had a typo in the staging/wordpress_sites.yml file, which seemed to cause an error. It also occurred to me that I hadn’t really given anything access to the git repo on my bitbucket. So I added all of the various SSH keys I’ve been using as deploy keys on bitbucket.

Re-running the command now! Lots of blue stuff flashing by, no orange yet so I think that’s good.