[SAC] [OSGeo] #2994: wordpress-dev updates from wordpress

#2994: wordpress-dev updates from wordpress
---------------------------+--------------------------------------
Reporter: cvvergara | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: Systems Admin | Keywords:
---------------------------+--------------------------------------
Setup and scripts to get wordpress backup into wordpress-dev
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2994&gt;
OSGeo <Gter - OSGeo;
OSGeo committee and general foundation issue tracker.

#2994: wordpress-dev updates from wordpress
---------------------------+---------------------------------------
Reporter: cvvergara | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: Systems Admin | Resolution:
Keywords: wordpress |
---------------------------+---------------------------------------
Changes (by cvvergara):

* keywords: => wordpress

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2994#comment:1&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2994: wordpress-dev updates from wordpress
---------------------------+---------------------------------------
Reporter: cvvergara | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: Systems Admin | Resolution:
Keywords: wordpress |
---------------------------+---------------------------------------
Comment (by robe):

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.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2994#comment:2&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2994: wordpress-dev updates from wordpress
---------------------------+---------------------------------------
Reporter: cvvergara | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: Systems Admin | Resolution:
Keywords: wordpress |
---------------------------+---------------------------------------
Comment (by strk):

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 ?
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2994#comment:3&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2994: wordpress-dev updates from wordpress
---------------------------+---------------------------------------
Reporter: cvvergara | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: Systems Admin | Resolution:
Keywords: wordpress |
---------------------------+---------------------------------------
Comment (by robe):

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.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2994#comment:4&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2994: wordpress-dev updates from wordpress
---------------------------+---------------------------------------
Reporter: cvvergara | Owner: sac@…
     Type: task | Status: closed
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: Systems Admin | Resolution: fixed
Keywords: wordpress |
---------------------------+---------------------------------------
Changes (by robe):

* status: new => closed
* resolution: => fixed

Comment:

@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.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2994#comment:5&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2994: wordpress-dev updates from wordpress
---------------------------+---------------------------------------
Reporter: cvvergara | Owner: sac@…
     Type: task | Status: closed
Priority: normal | Milestone: Sysadmin Contract 2023-I
Component: Systems Admin | Resolution: fixed
Keywords: wordpress |
---------------------------+---------------------------------------
Comment (by cvvergara):

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.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2994#comment:6&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.