Advise on upgrading a Digital Oceans VPS

I forgot that I used the handle appleii717 on this site.

That’s because in early 1978 I bought an Apple II serial # 717. That more or less changed my life. I went from an Air Force aircraft mechanic to a Navigator to a IT manager over the next 30+ years. Most of it as a hobbist! Needless to say I’ve been playing with Rails since version 0.9.

Maybe I’ll post something someplace at sometime on the history. Rails has been a hobby for me. I’ve created hundreds of private apps over the years. A few before I retired in 2010 and more after I didn’t have anything to do!

Around 2010 I joined the VFW and was appointed Quartermaster (e.g, bookkeeper). I couldn’t deal with paper ledgers and wrote a double entry accounting app. I also wrote a rails based web site for the Post. I also started playing golf again and wrote a golf group scoring app. At first they were just on my Mac, but decided to put them on a Digital Ocean VPS. That was a pain! I did that because I didn’t want to be the only one that put in the golf scores and update the VFW ledger.

About 5 years later I updated the VPS to Ubuntu 18.02. This was a new VPS with stuff ported over - another pain.

So my VFW is almost dead - COVID killed a bar that was just existing. We sold the building before COVID hit but now have no place to meet or anything to do. So now I’ll be down to just the golf group app.

I wanted to upgrade Ubuntu on the VPS but DO suggested creating and new VPN and porting applications to it. I started that last week, but am about to give up. Created a new server using their Rails 1 click. That semi worked except they used rvm and I use rbenv. I ditched rvm and tried porting a few apps. It was a week of push the car back up the hill and see if the brakes fail again. I can hardly remember what I came into a room for, let alone remember how I created the DO VPS. Getting old is getting old and I’m 79!

I’ve updated Ubuntu before (locally on a staging server) and made it through the process. I mean there is nothing on the VPS but Rails. I figure I can do a Snapshot (which I have no idea on how to do and replace it if the upgrade fails!).

What I am asking for is advice/opinions on whether to continue the porting or upgrading Ubuntu to at least 20.02.

My other option is just to leave it alone - but Rails may break it at some point.

Any comments-advice?

Wow. That is an amazing tale, and an impressive career! I’ve been following along behind you, albeit about twenty years later, and using my hobby/amateur art/obsession to provide for my family.

I’ve used DO for many years, very much in the same way that you have initially. I think I may have tried one of their all-in-one Rails insta-machines once or twice, but I usually just spin up a bare Ubuntu v-[whatever is currently in Long Term Support] and take it from there.

I do use RVM, and really rely a lot on the installer scripts therein to get the base system ready for Rails. As I do, I keep a journal of what I have copied and pasted from (usually) the Passenger deploy documentation. These waypoints make it easier for me to repeat the process when I need to either do this again for a different machine, or when I upgrade.

When I do upgrade, I tend to not try to use the Ubuntu/apt system to do that. Instead, I start over with a new VPS, repeat any customizations I may have done (from my log of installs) and then move my apps to their new home by deploying them as if it was the first time.

While I will use apt to update any and everything that gets an upgrade or security patch, I have always treated the major version of Ubuntu as a stake in the ground, and never use apt to change that. My thinking is that the bulk of developer effort has gone into the new install route, while the major version upgrade is more of a “later” effort in the process. No evidence to support this, just my hunch, which has been working out for me over the past twenty years or more.

My current production servers are all running 18 at the moment, and when I deploy a new application or version of one of these applications, I will pick whatever is (at that time) in LTS and repeat the script.

My advice to you would be to try spinning up a new server and deploying a simple rails scaffold blah throwaway app there. Start here: Deploying to Production - Passenger Library and use the wizard to pick out your preferred tooling, and follow along their steps. If you get stuck, delete the VPS and start over the next day. Don’t treat it as too precious or costly a learning exercise. When I have had a few of these to do at once in the past, I have gotten it down to a couple of hours by the time I hit the third one. (And most of that is waiting for things to compile, etc.)

If you haven’t gotten a deploy automation setup working yet, I would also recommend that you try something like Capistrano, so that your entire Rails app can deploy in a one-line script invocation. I would not go down the rabbit hole of containers or Docker or Kubernetes, as that’s yet another layer of abstraction over the VPS idea, and you would have another set of moving parts to concern yourself with.

Good luck! And do ask questions here. And write things down as and when you do them. It’s just (nearly) impossible otherwise.


Thank you for your kind words and your advice.

I use Capistrano to deploy, it’s a pain but i’ve figured most of it out. The only reason I used the Rails 1 click is that adds certbot and a few other things. My current vps was also Rails but don’t think it had rvm.

I actually got one of my apps to deploy but can’t get it working. Puma is started but it’s not connecting with nginx and I get bad gateway 503. I’m sure it’s the nginx config - another pain. I tried to deploy a very basic app and I am running into database password issues on deploy. Both are rails 7.1.3 but there are some differences in the database.yml file. The new one was generated in 7.1. The other upgraded. They added ENV[“MYUSERS_DATABASE_PASSWORD”]

It leaves me something to do! i’ll try for a few more days.