9 Commits

Author SHA1 Message Date
Jeremy Stanley
1a227489e2 Use Apache to serve a local OpenDev logo on paste
In order to avoid unnecessary browser requests to other sites,
install a copy of the OpenDev logo on the Lodgeit server and serve
it from there rather than pointing at one served from Gitea.

Change-Id: I4c3678a1de8ca4a41cd0c64aab71b2e0e25373af
2021-09-21 20:28:29 +00:00
Ian Wienand
e8c456926c lodgeit: use logo from system-config assets
This currently uses a file served from gitea's staic assets; to
isolate us from changes to gitea's file layout switch this to use the
canonical file directly from system-config/assets.

Change-Id: Ibf67040af2b0a18261621a120ee26c78020e3ace
2021-09-17 12:35:12 +10:00
Jeremy Stanley
e2649a1aba Stop redirecting for the paste site
The pastebinit command-line tool hard-codes an allowed list of
pastebin URLs, one of which is "http://paste.openstack.org" so
redirecting to HTTPS and to other hostnames seems to break it.

It has a specific user-agent, so allow plain HTTP access for this
tool, but redirect others.

Change-Id: Ia7c983986e6e9c08299ded5282a83761448b35bb
2021-08-19 15:21:03 +10:00
Ian Wienand
b1cf281208 lodgeit: disable getRecent API endpoint
This appears to give a unicode error; but also looking at the access
patterns it seems to serve no good purpose but to be a target for
bots and other odd behaviour.  Block it from apache.

Change-Id: I3a9d4a0161eef34ffe39cf4feb9ab2af561684ca
2021-08-04 15:08:15 +10:00
Ian Wienand
fc4ca85f08 Update docker-compose restart flags
After I replace the docker packages some services I thought would come
back did not.

Lodegit seems to be an oversight, add restart always.

Also make sure the ZK containers start themselves.

I believe with Gerrit we've made the choice to not start automatically
due to the general high-touch nature of restarts.  Keep the database
consistent and remove the auto restart there.

Change-Id: I98fa3055ac269564ed96570df0700b2aad24e4d2
2021-07-22 08:35:52 +10:00
Ian Wienand
d4c613a07a Add paste01.opendev.org to backup
Change-Id: Iec6b916bd27a5333d28d1fdc931d4f41165bf50c
2021-07-15 15:02:52 +10:00
Ian Wienand
1e8132e27a lodgeit: correct database path
Missed in Ib40cba5bb9e1f9f98769c00e2e9fe09e8fb2582f.  This path is on
a mounted volume.

Change-Id: I2b841c9ce4ccedd85e52f8b88b413b645924689a
2021-07-14 14:40:28 +10:00
Ian Wienand
e3ab346f89 lodgeit: add robots.txt
Add robots.txt same as the old server.  While we're here and before
the db is setup, put everything under /var/lib/lodgeit/ for general
consistency.

Change-Id: Ib40cba5bb9e1f9f98769c00e2e9fe09e8fb2582f
2021-07-13 17:11:15 +10:00
Ian Wienand
916c1d3dc8 Add paste service
The paste service needs an upgrade; since others have created a
lodgeit container it seems worth us keeping the service going if only
to maintain the historical corpus of pastes.

This adds the ansible to deploy lodgeit and a sibling mariadb
container.  I have imported a dump of the old data as a test.  The
dump is ~4gb and imported it takes up about double that; certainly
nothing we need to be too concerned over.  The server will be more
than capable of running the db container alongside the lodgeit
instance.

This should have no effect on production until we decide to switch
DNS.

Change-Id: I284864217aa49d664ddc3ebdc800383b2d7e00e3
2021-07-07 15:12:04 +10:00