[SAC] [OSGeo] #2028: Upgrade Gogs to Gitea

#2028: Upgrade Gogs to Gitea
---------------------------+-------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone:
Component: Systems Admin | Keywords:
---------------------------+-------------------
It's about time to switch from Gogs to Gitea.
Procedure should be as follows:

  - Install newer GIT on the TracSVN host (#2027)
  - Put Gogs in read-only mode (or offline)
  - Dump "gogs" PostgreSQL database to "gitea"
  - Start Gitea

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2028&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2028: Upgrade Gogs to Gitea
---------------------------+--------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone:
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+--------------------

Comment (by strk):

For the record, I submitted a patch to lower the GIT version requirement
of Gitea, but I'm not sure if/when it will be accepted - see
https://github.com/go-gitea/git/pull/90

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

#2028: Upgrade Gogs to Gitea
---------------------------+--------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone:
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+--------------------

Comment (by strk):

FYI: my patch was merged and is included in 1.3.0. Latest release is 1.3.2
with some bugfixes. I've tried 1.3.2 against Drone 0.5 which is what we're
running and it works, so I guess we're ready to go. New procedure would
be:

- Put Gogs in read-only mode (or offline)
- Dump "gogs" PostgreSQL database, restore to "gitea" database
- Deep-copy gogs-repositories to gitea-repositories
- Start Gitea pointing at "gitea" database and "gitea-repositories"
- Expose Gitea to /gitea URL
- Test test test
- Redirect /gogs to /gitea
- Symlink gogs-repositories to gitea-repositories (keep backup!)
- Update wiki with all instructions

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

#2028: Upgrade Gogs to Gitea
---------------------------+--------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone:
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+--------------------

Comment (by robe):

I assume you are not going strictly by the gitea to gogs upgrade described
here https://docs.gitea.io/en-us/upgrade-from-gogs/ cause you want to
keep gogs in read-only?

For the other folders, are you skipping those e.g attachments and other
custom data cause we don't have attachments?

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

#2028: Upgrade Gogs to Gitea
---------------------------+--------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone:
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+--------------------

Comment (by strk):

Initial steps done. We're now running Gitea and no more Gogs.
The /gogs URL already redirects to /gitea.
Please help the "Test Test Test" phase.

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

#2028: Upgrade Gogs to Gitea
---------------------------+--------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone:
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+--------------------

Comment (by strk):

I didn't follow that guide. The attachment and other custom data
(organization avatars) should be safe. I've updated the wiki, and all
references. People should be made aware that the URIs changed, to update
their `git config remote.origin.url`. Redirects are in place.

Please keep testing and file issues

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

#2028: Upgrade Gogs to Gitea
---------------------------+--------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone:
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+--------------------

Comment (by strk):

I've mailed discuss OSGeo mailing list and added backup configuration for
Gitea (database and data/ dir, no repositories).

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

#2028: Upgrade Gogs to Gitea
---------------------------+---------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: closed
Priority: normal | Milestone:
Component: Systems Admin | Resolution: fixed
Keywords: |
---------------------------+---------------------
Changes (by strk):

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

Comment:

I think there's nothing left to do here.

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