montera34 / pageonex

PageOneX. Analyzing front pages
http://pageonex.com
GNU Affero General Public License v3.0
54 stars 13 forks source link

migrate production release to container #216

Open rahulbot opened 5 years ago

rahulbot commented 5 years ago

We need to move the production install to a new server and a larger shared hard drive. Here's the plan I have in mind:

Photos on hard drive:

Database:

App:

rahulbot commented 5 years ago

I started the rsync of the photos directory to the shared drive connected to the current prod server: rsync -av app/assets/images/kiosko/ /mas/u/pageonex/app/assets/images/kiosko/

rahulbot commented 5 years ago

Ran the rsync. The goal of the first task here is to get these images onto hard drive that has enough space to handle it (around 130GB of images). Next step is to point the current prod install at this bigger drive. @numeroteca can we find a time to do that together so that there isn't a gap like last time I tried?

rporres commented 5 years ago

In #218 there's a lot of information on how to set a prod environment for pageonex and a way to test images locally.

rahulbot commented 5 years ago

Update - image directory switched over to external drive. Will delete current image dirs in a week if it seems to be working well.

Next up is moving the database to the new server. I'll try to do that next week (looks like I need to edit the production section of config/database.yml).

rahulbot commented 5 years ago

Database switched over, now we just need to get the code working in the container and we'll be good to go.

rahulbot commented 5 years ago

Note: Solved some other problems on #220

rahulbot commented 5 years ago

Container pointed at production DB/images is now online at http://pageonex-prod.brownbag.me. @numeroteca can you please poke at it to make sure it seems good. If that checks out then we can switch over the DNS to point at this new server.

numeroteca commented 5 years ago

Everything looks good in the tests I've made. Prepared to point the DNS to the new server. I wait for instructions.

rahulbot commented 5 years ago

Nice - can you please change the DNS to point both dev.pageonex.com and pageonex.com to 18.85.22.29? I have the containers set up to respond to those so hopefully it'll just work ;-)

numeroteca commented 5 years ago

Changed pageonex.com to 18.85.22.29.

dev.pageonex.com was already pointing to 18.85.22.29, so no change needed.

Let's see how it goes.