Jump to content
Larry Ullman's Book Forums

Digital Ocean


Jonathon
 Share

Recommended Posts

Hi

 

Just to give you an idea on Digital Ocean. I've only ever used shared hosting so it was a little daunting but here is a quick overview of what I've done and how easy it was to do.

 

There are promo codes on twitter for it, I got myself a $10 one, which is two months, in terms of setting it up, it really was very quick. 

 

I've been using it in conjunction with serverpilot.io. They basically set your apps up, they load, MySQL, PHP-FPM, Apache, Nginx, you can choose what version on PHP to use within your app, configure SSL etc (I'm in the process of doing that now). They basically make sure the website is secure and maintained with updates.

 

I used their guide on installing phpmyadmin and Memcache, so far it's been pretty good, the main issue Im having is moving my SSL because its on my old host and set up to be there, 

 

So, I haven't done a lot with digital ocean, but so far their customer service is quick and very helpful. I've set up SSH keys to my droplet and used them to help create new SSL keys. The biggest thing for me was using and getting FileZilla to work, I really feel like I need that GUI interface to upload and adjust files/ permissions/ the file itself etc.

 

I have yet to install elasticsearch or JDK on the server. I've spent a long time making various mistakes, to the point where I even deleted my droplet and just recreated a new one. I think i've got 90% of my Yii site to work., part of the reason I think i'm having trouble is i'm accessing it through the ip address and not the domain as that is all waiting for SSL certs to be reissued and the other half is .htaccess/ yii id to be using just https.

 

It's been interesting, a little overwhelming at times. But I think it's very fair to say that with server pilot that you can have a good base setup for PHP website very very quickly and your sever will be looked after security wise. Installing PHPmyAdmin is a 5 minute job, memcache a 1 minute job. ServerPilot is $0 a month for it's base plan too.Works on a few different cloud BPS providers too.

 

My site does also appear to be really pretty quick, not sure if that's due to using the ip address or not. I'm not even using memcache currently.

  • Upvote 1
Link to comment
Share on other sites

I use Dreamweaver for uploading my files, why do you use FileZila if you have DW? Jonathon can i ask how many hours per day or per week do you spend working on your website. The last few months ive done pretty much bugger all, i lost my motivation when i had to go back and recode stuff. I am forcing myself now to get through the recoding stuff will be there soon, i think if i bash out the code hard for the next 8 months i should be able to get my site online to take in some Sellers.

Link to comment
Share on other sites

I use FZ because it allowed me to use SSH and there were tutorials for it. I find Dreamweaver finicky, it wants definite folder relations that don't change. It varies, on my motivation and what i'm doing. I am currently more focussed on server config currently.

Link to comment
Share on other sites

Hey Jonathon,

 

Thank you so much for sharing. I appreciate it. I might be following you down the Digital Ocean path next year. 

 

This also sounds like a good learning experience for you, as some server knowledge is quite helpful as a web developer. Although it's a different beast, and often frustrating. 

 

Thanks again!

Larry

Link to comment
Share on other sites

I use FZ because it allowed me to use SSH and there were tutorials for it. I find Dreamweaver finicky, it wants definite folder relations that don't change. It varies, on my motivation and what i'm doing. I am currently more focussed on server config currently.

 

I am trying to get minimum 4 hours in per day when i can code. I find my brain gets tired after 1 hours work then i am done by just over 2 hours then need to come back. By the time i get to 4 hours i couldn't think well anymore and i don't seem to be producing quality work. Sometimes its just not the best way to be no stop coding as i do get most of my good ideas when i am away from the computer. Its fun but it does get quite boring at times.

Link to comment
Share on other sites

From what I see, ServerPilot looks pretty good. I like that they support a range of services. For example, EC2 is great, but less user friendly. I know for myself, I don't stay as on top of the server maintenance as I should. So ServerPilot's automatic updates and monitoring are great. Definitely looks promising. I'll be curious to hear what you think after some time.

 

What'd you decide to do for your email?

Link to comment
Share on other sites

Really very quick in terms of just getting emails. Took 10 minutes at most. Name, chosen email to receive from, add a meta tag for site verification, then they just re route the email. Said it can take up to 1 hour though. I just looked at the sending limits https://support.google.com/a/answer/166852?hl=en

 

It's actually 2000 per day too.

 

You can have alias email addresses too

Link to comment
Share on other sites

  • 5 months later...

I see from your tweets you've started Digital Ocean and feel the same as me.

 

Mine was lightening quick, I was moving from shared hosting though so I wasn't too surprised. But mine is now running Yii, elastic search and other things and it's still really quick. Was a nice little into to nix systems too.

Link to comment
Share on other sites

Yeah, I started with them in August on a little personal project. It's crazy fast and cheap. Very easy to manage. But you do have to manage it (and do the systems admin stuff).

 

I found this to be immensely helpful:

 

https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps

 

I know commit locally and push instead of using FTP. It's a wonderful approach. Of course, I could have done it on my existing server, I just never had.

 

I ended up going with Google Mail for my email, which costs another $5/month. But I can use it with PHP to send email, so that's okay. 

 

My current plan is to get a bigger droplet and start moving all my sites over. 

Link to comment
Share on other sites

Yeah it's great. I have google mail for mine too. I use Mandrill for website emails. I use serverpilot to actually set up my existing environment which I found very helpful and quick. Especially when I'd never done anything on nix and was brand new to managed sites. 

Link to comment
Share on other sites

  • 2 months later...

Thanks for posting this Jonathon. This is really fantastic.

 

I recently started experimenting with Digital Ocean, but never knew about serverpilot.io

 

Has anyone had any further experience with Digital Ocean and serverpilot.io? Can you still recommend using this solution for hosting after using it for a while?

 

 

Something else I would like to know is how do you know what size droplet to choose for your traffic or when to upgrade the droplet? I know this is a difficult question to answer because it depends on page size and traffic, but are there any ballpark figures / examples.

 

I am thinking of moving my main website from shared hosting to this solution. My Google Analytics gives me the following report (traffic per month):

55,794 sessions

38,511 users

128,058 page views

Any ideas on what size droplet to choose?

Link to comment
Share on other sites

Hi Warwick

 

I've had mine for a while now and I'm very pleased with it as a whole and serverpilot has been great too. It set everything up for me and I've never touched it since. The guy who built it. I want to say his name is Justin was always very helpful when I had questions about servers in general. 

 

So yes in short. 

 

I also wouldn't worry about droplet size at all start at $5 a month. See how you get on. If it looks like its going to max out its a 2 minute fix. If that. I noticed that my memory was being used up more than I thought when I added in elasticsearch and I had to go for a bigger droplet.

 

Hope that helps.

Link to comment
Share on other sites

Jonathon, thanks for the reply.

 

I have been using a $5 droplet with an experimental Wordpress website, running it on Ubuntu 32-bit. I did everything manually so have had some experience on setting up a server and even installed a free SSL certificate. The main problem is having to SSH in every so often to make sure that Ubuntu gets the latest updates. I am sure it will save a lot of time and work using serverpilot.io

 

What I will do now is a very cautious move of my main (PHP) website to Digital Ocean to try it out. Here is my plan:

- Leave the original website alone at first

- Make a new droplet and create a second copy of the website on the droplet

- Make a robots.txt file on the new website to keep the search engines out

- Point the .org version of my domain name to the new website (the main website is .com, .org is not used at the moment)

- Test the new website thoroughly

- Either make a new droplet to transfer the original website to or simply point the .com domain to the .org droplet

 

I think I can get away with minimum to no downtime of the original website by using the current webhost to point the domain name to the new droplet, then transfer the domain name to my new domain name registrar and point it to the droplet as well. Then cancel my old hosting after 48 hours.

 

BTW do you know if it is possible to spread the load of a single website across multiple droplets? Have, say, one droplet in the USA and one in Singapore. Then automatically direct USA and South America traffic to the USA droplet and the rest of the world to the Singapore droplet. If one droplet goes down, then automatically redirect all traffic to the droplet that is still running.

Link to comment
Share on other sites

I started using Digital Ocean with a small project a few months ago just to play around. I've been very pleased and am in the (long) process of moving all my sites there. I have a $5 droplet for some personal stuff and I'm putting my main sites onto a $20 droplet. That's probably more than I need, but considering I'm currently spending $65/month, it's a significant savings. 

 

I don't use ServerPilot because I'm comfortable with command-line stuff. In fact, I really like that aspect. Trying to go through cPanel or other hosting interfaces to figure out how to do stuff was always annoying. I've created my sites as Git repositories, so I don't use any graphical interfaces to interact with my server, which is preferred, really. 

 

Between the SSD drives and not having all that other...crap, the performance is really strong. When I move larryullman.com there, I expect to use HHVM, which should make performance even better.

 

As for having multiple droplets around the world, I don't think...DO supports that out of the box. In fact, I think many load balancing like things have to be on droplets within the same region. But you could easily use DO with AWS as a CDN, serving static assets from even more sites around the world. On LarryUllman.com, serving static assets via AWS as a CDN cost me, at most, $4/month. 

Link to comment
Share on other sites

Just briefly Larry how did you configure your site and local environment for Git. 

 

Do you plan to rewrite any of your code with Hack? I've not looked at HHVM or how it works really. Other than it's a virtual machine.

 

 

Warwick, I'm sure you could use a bash script to update your server automatically. However I can't definitely confirm that.

Link to comment
Share on other sites

For Git, I followed these instructions:

 

https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps

 
Really pleased with that workflow. 
 
I wasn't planning on rewriting code in Hack. My understanding is that WordPress is HHVM-supported, I just need to make sure the IP Board is, too. I'd rather go this route than port my WordPress to another platform (shudder). 
Link to comment
Share on other sites

Thanks for the info, Larry.

 

I have not yet decided whether I will go with serverpilot.io yet or not. I have a copy of my website set up on a droplet that is managed by serverpilot.io so that I can spend some time evaluating it. That Git solution looks like a good idea.

 

Thanks Jonathon for the suggestion. I actually found someone asking a related question at DO here:

https://www.digitalocean.com/community/questions/how-can-i-keep-multiple-droplets-updated

The answer to the question links to an Ubuntu article on how to do automatic updates here:

https://help.ubuntu.com/14.04/serverguide/automatic-updates.html

 

The other thing that severpilot.io does is configure Nginx as a public-facing web server with Apache behind it. They do this to keep the Apache server safe from Slowloris attacks. This looks link a whole additional learning curve to set Nginx up manually. Has anyone had experience with setting up Nginx?

Link to comment
Share on other sites

We use Git Flow on our projects. We also use post-receive hooks and deploy the same way as Larry does. The big difference is that the master branch only have published released, and is thus always stable. We branch out of develop using feature-branches, and merge with develop, perform staging and then goes live when our customers accept new functionality. The stage-enviroment is therefor based on develop, not master. This means we can very easily rollback to a working version if anything stops working and master is always stable. The actual development is performed on our development server that's not visable for the customers.

 

Additional benefits of using git bare-repos is that can perform additional actions. We must likely need to purge cache, restart varnish and similar. All these steps can be done inside the post-receive script.

Link to comment
Share on other sites

 Share

×
×
  • Create New...