Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#2994 closed task (fixed)

wordpress-dev updates from wordpress

Reported by: cvvergara Owned by: sac@…
Priority: normal Milestone: Sysadmin Contract 2023-I
Component: SysAdmin Keywords: wordpress
Cc:

Description

Setup and scripts to get wordpress backup into wordpress-dev

Change History (6)

comment:1 by cvvergara, 9 months ago

Keywords: wordpress added

comment:2 by robe, 9 months ago

Note as part of this - created a local lxchopper1 account on osgeo9 so we can use that as hop between wordpress-dev and wordpress prod https://git.osgeo.org/gitea/sac/ansible-deployment/commit/f03fd748a2d14eb876b43c30204dca8443b80de9 for scping database and website folder backups.

comment:3 by strk, 9 months ago

Isn't wordpress-dev just an exact copy of wordpress taken via lxc ? I'm confused as to why a connection between prod and dev (staging?) is needed at the ssh level. Also shouldn't any OSGeo user in the "shell" group be allowed to ssh into both, thus allowing use of ssh-agent to travel between the two ?

comment:4 by robe, 9 months ago

Because sometimes we are doing stuff and we just want to pull a new backup without having to go thru the whole ansible process of recreating the container. For most containers we never need to do this e.g. I never bother with tracsvn-dev.

Yes any user in shell group is allowed. But I don't want my key installed on dev, and just easier if a local user on wordpress-dev can hook into local user on wordpress-prod.

comment:5 by robe, 9 months ago

Resolution: fixed
Status: newclosed

@cvvergara I created script /var/www/backups/scripts/restore_osgeo_from_prod.sh in osgeo4-wordpress-dev

It downloads the latest site and database backups from prod, restores the db and the files, and updates the config.php so it points to dev.www.osgeo.org. I'm doing a trial run of it again.

I'll leave it up to you to decide which git repo the scripts should be stored.

Also the old osgeo.org, I backed up in /var/www/osgeo.org.231005

I'm also debating if we really need a staging repo at all since the only code difference that would be different between prod and dev.www.osgeo.org would be in the config.php file which isn't even stored in the git repo.

but anyway something is screwed up with staging and can't figure out what cause when I check out it does like you said remove a bunch of stuff and complains it's diverged from the gitea repo.

comment:6 by cvvergara, 9 months ago

About:

"but anyway something is screwed up with staging and can't figure out what cause when I check out it does like you said remove a bunch of stuff and complains it's diverged from the gitea repo."

I just created develop branch that is an exact copy of master and is the default branch. I will remove staging later on as it has some experiments I was doing eons ago, that are interesting.

Note: See TracTickets for help on using tickets.