Best Practice: Digital Ocean

So it only makes sense that I switch to Digital Ocean, which I’ve been a little scared of. I’ve only ever FTP’d.

But I’m ready to make the leap to SSH’ing. So I’m here to ask you smart people, what is the simplest method of deploying Sage to SSH?

I’ve been using VVV, but it sounds like I should switch to Bedrock-Ansible.

Does anyone have any resources that will help me? Which screencasts, threads, videos, posts, etc?

Hoping to do some research before I jump in, so any tips are appreciated. I’d be happy to post the results in a step-by-step when I’m done.

1 Like

Bedrock-ansible (soon to be renamed Trellis) is definitely the most awesome way to deploy your bedrock sites. A great place to start is the guide in the roots-example-project repo, where theres somewhat of a guide on how to set up a project with trellis, bedrock and sage.

Digital Ocean is nothing to be afraid of – just click create droplet, choose a data center location and select Ubuntu 14.04 x64 as your image. Add your SSH-key to your digital ocean account prior to creating your first droplet – then you can add the key to the new droplet as it is being created with one click.

3 Likes

Thanks man, this is great stuff. Pretty straight forward but it seems like there might be a couple snags along the way.

Just curious, if I were to record a screencast on it once I figure it out, what bits would I need to keep confidential? I’m assuming my SSH key, anything else I need to be careful of?

I’d be glad to help you.

  1. Moving from shared hosting to VPS is not straightforward at all, it is better learn step by step

  2. I don’t think Bedrock-Ansible is a good idea for you at this time, as it a tool that abstracts the complexity of what is going on under the hood, better do it with your bare hands for a couple of months, learn and understand and then use the tool.

My advice:

  • Deploy a droplet in DigitalOcean, with ubuntu and select “wordpress” in preconfigured apps

  • Install Putty

  • Install Winscp. Winscp connects via SSH and gives you a “familiar” drag-and-drop interface.
    also:
    -lets you generate public-private keys with puTTYgen
    -once you’re logged in you press CTRL-P to open server console and run commands
    -if you want to change a remote text file just double click it

  • VPS comes without mysql manager, so you have to install and secure phpymyadmin or install mysql workbench

Create multiple websites, destroy them and do it again, that’s the best advice I can give you.

This will be useful:

Any doubts PM me https://twitter.com/eduardoarandah

3 Likes

Alright so I’m ready to give this a try. Thanks for all the great info. Only problem is that Putty and Winscp are Windows only. I do have a couple questions if someone can answer them:

  1. Why do I need Winscp? I thought the point of SSH’ing was that it was
    done in the command line.
  2. Now that Trellis has recently launched, does that change anything?

Thanks again.

If you are not on WIndows then you can SSH from your normal terminal.

Trellis launched as a name change, it continues to be updated but there have not been any huge changes since it changed from bedrock-ansible.

I’m trying to tighten up my workflow, so I’m also making the switch to Trellis from VVV, but I’ve never used it before. When I make the switch, I won’t have to use Bedrock will I? Because I wasn’t planning on implementing Bedrock just yet.

Thanks Kalen.

Do you have to use Bedrock? I suppose not, but it would be a lot more work to get a standard WP site installed with Trellis… You would have to edit a few files to point at different directories, skip the Composer install, etc.

I would suggest just giving it a try

Hi. I used a couple of weeks getting SSH workflow under my skin to. You could work locally and then, at the end of the day, push changes via SSH. Or, if you do not want to bash yourself, you could use Deployboy or something similar to deploy for you. Very practical.

And even if FTP feels kind of “last year” it’ll still do the job protocol wise. Then you can use it with git under VC and with PHPLoy or something.

I’ve used this workflow a couple of times too: https://github.com/james2doyle/git-website-workflow
Works very well, but I guess it’s better if you’re not too many people working on a project and you work on the project for a relatively long basis.

I guess I would ideally use Bedrock, Capistrano, Composer, Trellis, etc–

But I’m just afraid to jump into too deep of water go beyond my skill level. I’m definitely open to the idea though.

Are there any screencasts that cover the workflow with Bedrock/Trellis?

The logical progression would actually be Bedrock, then Trellis. Trellis automatically sets up Bedrock based projects for you in the VM and during deployment, so having an understanding of a Bedrock project would be beneficial.

Bedrock is still a WP installation, I suppose it depends on if you have used environment variables and .env files before, as well as Composer, would gauge how quick you could pick it up. But in the end, it’s still a WP installation, it just has a different directory structure, and you have the ability to use Composer with it. WordPress is installed to a sub-folder, but you can do that with a regular WP installation as well, it’s something I did before Bedrock was even a thing.

There are no screencasts yet, but maybe if you prod @swalkinshaw enough, he’ll get going on it :joy:

2 Likes

@swalkinshaw I would 100% pay for one. You could just put it up on gumroad or something.

In fact, I’ll probably make one if no one else beats me to it. Btw, I’m very appreciative of your guys’ help meanwhile.

I’ve been giving it a go by digging into documentation, but it’s pretty dense and I have a lot of reading ahead of me.

Edit: I’ve resolved this issue, see the end of the post.

The problem I’m having at the moment is step 2 of the Trellis installation.

I think I’ve installed Ansible wrong, as you can see I have it inside Trellis.

Do I install Ansible inside of Trellis or outside or it?

Resolved: Instead of installing Ansible via a Github clone, I installed it using Python.

I’m back on track, the ansible-galaxy install works now.

1 Like