How should I go about upgrading Ubuntu Server that my Rails application is running on?

521 views
Skip to first unread message

David McDonald

unread,
Jul 18, 2019, 2:15:18 PM7/18/19
to Ruby on Rails: Talk
I have an ubuntu-server running version: Ubuntu 14.04.5 LTS.  I want to upgrade it to Ubuntu 18.04 LTS.  I snapshotted my server and tried to upgrade it to 16.04, and then 18.04 but ran into some issues where it seems through the upgrades I lost some of my configuration files.  When prompted by Ubuntu through the upgrades I chose to keep the local versions but I guess it didn't ask about those configuration files.  My question is what is a recommended approach to upgrading?  I currently use passenger, nginx - are there any guides that discuss how to do this with that setup?  Or am I better off creating a new server, setting it up and then redirecting to it?  Another important note is this server/web application is for small internal usage.  probably dealing with less than 30 users on a daily basis...  I appreciate any guidance!  Thanks!

Brandon McClelland

unread,
Jul 18, 2019, 2:35:21 PM7/18/19
to rubyonra...@googlegroups.com
If it were me, the leap from 14 to 16 to 18 would be too much to worry about so instead of upgrading a snapshot, I would just create the new server with 18 and then work on getting the app to run on it. Once it seemed to be running correctly redirect traffic to it.

Your approach should also work by keeping things very incremental - when you note that a configuration file seems to be missing refer back to the original server's version and keep the new one as close to parity with the original as possible. There is too much information about updating and maintain legacy Rails apps out there to really make a specific recommendation for how to guides but the best place to start is simply reading the official Rails guides on updating/upgrading to see what you're in for and that using that to google-fu for how-to articles that mirror your own situation. 

Once you've got things running on a newer Ubuntu version come up with a plan for regular update maintenance because it's much easier to update incrementally on a consistent basis than it is to just let a legacy app sit and accumulate huge amounts of technical debt. Good luck!

On Thu, Jul 18, 2019 at 1:15 PM David McDonald <dave...@gmail.com> wrote:
I have an ubuntu-server running version: Ubuntu 14.04.5 LTS.  I want to upgrade it to Ubuntu 18.04 LTS.  I snapshotted my server and tried to upgrade it to 16.04, and then 18.04 but ran into some issues where it seems through the upgrades I lost some of my configuration files.  When prompted by Ubuntu through the upgrades I chose to keep the local versions but I guess it didn't ask about those configuration files.  My question is what is a recommended approach to upgrading?  I currently use passenger, nginx - are there any guides that discuss how to do this with that setup?  Or am I better off creating a new server, setting it up and then redirecting to it?  Another important note is this server/web application is for small internal usage.  probably dealing with less than 30 users on a daily basis...  I appreciate any guidance!  Thanks!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/68ff7e77-8957-4185-aa99-40ae261ed0d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Brandon McClelland
User Support Technician
Steve Jackson Games

Colin Law

unread,
Jul 18, 2019, 3:34:46 PM7/18/19
to Ruby on Rails: Talk
On Thu, 18 Jul 2019 at 19:15, David McDonald <dave...@gmail.com> wrote:
>
> I have an ubuntu-server running version: Ubuntu 14.04.5 LTS. I want to upgrade it to Ubuntu 18.04 LTS. I snapshotted my server and tried to upgrade it to 16.04, and then 18.04 but ran into some issues where it seems through the upgrades I lost some of my configuration files. When prompted by Ubuntu through the upgrades I chose to keep the local versions but I guess it didn't ask about those configuration files.

Generally you should look at the diff in these cases as it may be you
had modified the original file and want to retain those mods. However
you should not just retain your original as there may be new stuff in
the new version that you need. Having looked at the diffs you can
either use the new one, or apply your mods to the new one.

However you say the missing files are not ones you were asked about.
Can you give examples of those?

Colin

David McDonald

unread,
Jul 18, 2019, 4:05:38 PM7/18/19
to Ruby on Rails: Talk
My apologies but I have already reverted back to the snapshot.  It seemed that my setup in /sites-enabled/ was only setup with a default file that wasn't my original file after the upgrade.  The reference to my ruby path was also incorrect.  And I had to modify some permissions to log folders and such as redis-server couldn't start because it couldn't access some folders and files. I can't remember the other ones as an example, but I'm going to clone the server and try again while going ahead and backing up the config files I'm aware of... see if I could get further along this time.  I think I just need to backup my nginx.conf, and sites-enabled folder.  That should be enough to get me back up and going. I do like the idea of creating the new server and just getting up and going that way, but not sure my team mate in charge of the servers feels the same way *shrug*.  So I will try the upgrade again first.

Hassan Schroeder

unread,
Jul 18, 2019, 4:27:39 PM7/18/19
to rubyonrails-talk
On Thu, Jul 18, 2019 at 1:05 PM David McDonald <dave...@gmail.com> wrote:

> I think I just need to backup my nginx.conf, and sites-enabled folder.

If you put all your config files into a git repo it'll make it easier to see
what's getting changed by the upgrade process.

It's all useful if you wind up going the new-server-reinstall-the-app
route (which would be my preference).

HTH, and good luck!

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
Reply all
Reply to author
Forward
0 new messages