15462 Commits

Author SHA1 Message Date
Monty Taylor
b8f9cc40aa Pin lodgeit to the current version
So we can be careful about landing lodgeit changes.

Depends-On: https://review.opendev.org/711344
Change-Id: If1ae66fc94d5ceed458b93cb10f0bb061df85021
2020-03-04 23:54:41 +00:00
Zuul
312cadf53f Merge "Increase timeout for run static job" 2020-02-28 23:28:33 +00:00
Zuul
1a60facce5 Merge "Kill qa.o.o" 2020-02-28 21:59:30 +00:00
Clark Boylan
fd78b58fcf Increase timeout for run static job
This job installs all of the vhosts necessary for our static hosting as
well as compiling afs kernel modules. Then it tests that they function.
Unfortunately in some cases half an hour just isn't enough time. Double
the default timeout to an hour to work around this.

Change-Id: Ief457aafa503af6c5bad83a1198b6c699d2d4983
2020-02-28 11:06:34 -08:00
Clark Boylan
61caec5b77 Use LE cert on review.open*.org
We previously had two manually issued certs (one each for opendev.org
and openstack.org) but now have a single cert with all the appropriate
names in it automatically issued by LE. Use this new cert before the old
one expires.

Change-Id: I635d2bfd820fe138ee951833dd66f157b2b7c097
2020-02-28 08:10:24 -08:00
Zuul
d75d70b333 Merge "letsencrypt: force renewal on certificate change" 2020-02-28 13:41:25 +00:00
Andreas Jaeger
e47de667d5 Kill qa.o.o
This site was never used nor published, it can be killed according to QA
PTL.

codesearch returns no matches for it in any docs.

Keep the occurence in manifests/static.pp, this will get deleted
as part of https://review.opendev.org/710388.

Change-Id: I3c0d3b567a3eccb959dc903f169197e4581f1e13
2020-02-28 09:30:27 +01:00
Zuul
3417dc21c5 Merge "Update redirects for legacy sides" 2020-02-28 03:30:59 +00:00
Zuul
27d9eba736 Merge "static: implement legacy redirect sites" 2020-02-28 03:30:42 +00:00
Ian Wienand
a44f5acdf3 letsencrypt: force renewal on certificate change
There is a bug, or misfeature, in acme.sh using dns manual mode where
it will not renew the certificate when new domains are added to an
existing certificate.  It appears to generate the TXT record requests
correctly, but then when we renew the certificate it thinks it is not
time and skips it.  This is filed upstream with [1] however we can
work around it, and generally be better anyway.

For each letsencrypt host, during certificate request we build up the
"acme_txt_required" key which is a list of TXT record tuples.
Currently we keep the challenge domain in the first entry, which is
not useful (all our hosts have the same challenge domain,
amce.opendev.org).  Modify this to be the certificate key from the
host config.  To be clear; when a host has

letsencrypt_certs:
  hostname-cert-main:
    hostname.opendev.org
    altname.opendev.org
  hostname-cert-secondary:
    secondary.opendev.org
    secondaryalt.opendev.org

acme_txt_required when renewing all certs will end up looking like:

 [
  (hostname-cert-main, <txt1>), (hostname-cert-main, <txt2>),
  (hostname-cert-secondary, <txt3>), (hostname-cert-secondary, <txt3>>)
 ]

In the certificate creation path, we walk "acme_txt_required" and take
the unique 0-value entries; this gives us the list of keys in
"letsencrypt_certs" which were actually updated.

We can then force renewal for these certs, because we know they
changed in some way that requires reissuing them (within renewal time,
or new domains).

This isn't just a work-around, it is generically better too.
Previously if any cert on host required an update, we would try to
update them all.  This would be a no-op; acme.sh would just skip doing
anything; but now we don't even have to call into the renewal if we
know nothing has changed.

[1] https://github.com/acmesh-official/acme.sh/issues/2763

Change-Id: I1e82c64217d46d7e1acc0111dff4db2f0062c42a
2020-02-28 11:49:06 +11:00
Zuul
3298127496 Merge "OpenStackId v3.0.4 Deployment" 2020-02-27 20:28:24 +00:00
Andreas Jaeger
03276e0c93 Update redirects for legacy sides
The content for many projects has moved but the legacy redirects were
not updated, update to current location.

Change-Id: I7030ad35378085b0c45429c272dc24f00d33b2d2
2020-02-27 10:06:25 +01:00
Ian Wienand
d961b6d0d4 static: implement legacy redirect sites
This is a slight divergence from the accepted spec, where we were
going to implement these redirects via a new haproxy instance
(I961456d44a56f2334d3c94ef27e408f27409cd65).  We've decided it's
easier to keep them on static.opendev.org

The following sites are configured to redirect to whatever they are
redirecting to now on static.opendev.org:

 * devstack.org
 * www.devstack.org
 * ci.openstack.org
 * cinder.openstack.org
 * glance.openstack.org
 * horizon.openstack.org
 * keystone.openstack.org
 * nova.openstack.org
 * qa.openstack.org
 * summit.openstack.org
 * swift.openstack.org

As a bonus, they all get a https instance too, which they didn't have
before.

testinfra coverage should be total for this change.  I have created
the _acme-challange CNAME records for all the above.

Story: #2006598
Task: #38881

Change-Id: I3f1fc108e7bb1c9500ad4d1a51df13bb4ae00cb9
2020-02-27 16:25:39 +11:00
Ian Wienand
d78f3fa8f3 static: fix git raw file redirect
When converting this from a htaccess file to run in the virtualhost
context, one instance of '^cgit' -> '^/cgit' was missed.  Fix it, and
add a coverage test for it to testinfra.

Change-Id: Icc1dae6dce232e69c5cd1cf98b594f562c60d3f2
2020-02-27 09:50:34 +11:00
smarcet
eed9116625 OpenStackId v3.0.4 Deployment
Fixed inconsistent ORM mappings

Change-Id: I1806f0c22a21ebf495aa725998ba0e0e57bf3b4a
Signed-off-by: smarcet <smarcet@gmail.com>
2020-02-26 16:58:58 -03:00
Zuul
7dc6b7c89f Merge "404 periodic job: minor fixes" 2020-02-26 04:22:45 +00:00
Ian Wienand
52850ddb63 404 periodic job: minor fixes
* Remove a stray trailing ' from the key
* update the key url to use https
* fix the log path to scrape

Change-Id: I580b63f08147494a937d44f4f6637947221c8937
2020-02-26 14:28:03 +11:00
Zuul
0ea607e739 Merge "static: provide git services" 2020-02-26 03:16:27 +00:00
Zuul
a74dcb3887 Merge "404 periodic job: fix host parameter" 2020-02-26 03:01:41 +00:00
Zuul
a5411dd6ce Merge "OpenStackId v3.0.3 Deployment" 2020-02-26 02:05:35 +00:00
Ian Wienand
e884ebfa57 404 periodic job: fix host parameter
The documentation is wrong, this needs to be just "host:" (fixed
upstream with
cf4882e0c0
but not released yet).

Change-Id: I5110e6795fa8b5729ddc87da6aef7c9ac7ed39a4
2020-02-26 12:49:25 +11:00
Zuul
d874080237 Merge "404 periodic job : use executor only, add host key" 2020-02-26 01:31:45 +00:00
Ian Wienand
b5266ea20c static: provide git services
This creates the redirect sites

 git.airshipit.org
 git.openstack.org
 git.starlingx.io
 git.zuul-ci.org

The htaccess rules are put into the main configuration file to avoid
having to create a directory and manage another file.  We use a macro
to duplicate the rules and retain the old semantics of the http site
redirecting directly (as opposed to doing a extra 301 to
https://git.openstack.org first).  This required adding "/" to the "^"
matches as it now runs in VirtualHost context; no functional change is
intended over the old sites.

This will require _acme-challenge CNAMEs to acme.opendev.org before
being merged.

testinfra is updated to exercise some redirects matching against the
results of the extant sites.

Change-Id: Iaa9d5dc2af3f5f8abc11c2312e4308b50f5fcd2b
2020-02-26 12:27:13 +11:00
Zuul
919f817064 Merge "static: add static.openstack.org/files.openstack.org" 2020-02-26 01:25:40 +00:00
smarcet
19662d7d3f OpenStackId v3.0.3 Deployment
Change-Id: I239f8311139d59260430baee0c6cb910c31caf3f
Signed-off-by: smarcet <smarcet@gmail.com>
2020-02-25 22:21:20 -03:00
Zuul
f0085e2018 Merge "zuul-user: add role to install system-config key" 2020-02-26 01:20:17 +00:00
Ian Wienand
de0c28018c 404 periodic job : use executor only, add host key
This only needs to run on the executor, specify a blank nodeset.

Add the static.opendev.org host key after adding the host.

Change-Id: Iedde486ce8f3e9b415991830121fb87ba192afc6
2020-02-26 11:44:13 +11:00
Ian Wienand
56509e83a4 static: add static.openstack.org/files.openstack.org
files.openstack.org serves a view of /afs/openstack.org/, which is the
same as static.opendev.org.  Add a serveralias for it and certificate.

Make static.openstack.org be consistent with opendev by showing the
same thing.

Change-Id: I4c492e3b02554a7c736c015790bd4cd5bb435a43
2020-02-26 10:39:50 +11:00
Zuul
9566bd0e2a Merge "Revert "Generate list of 404s for docs.o.o"" 2020-02-25 23:39:02 +00:00
Ian Wienand
95606e6f86 zuul-user: add role to install system-config key
This moves the creation of a zuul user with the Zuul per-project key
for system-config to a separate role from the static role, so it can
be reused on other hosts.

Change-Id: Ice605b70a2c42d9b85090406216253fec0820f50
2020-02-26 10:29:03 +11:00
Zuul
ddc6a25706 Merge "static: add a periodic 404 checker" 2020-02-25 23:17:03 +00:00
Zuul
7fbcb1c561 Merge "Upgrade gitea to 1.11.1" 2020-02-25 23:17:02 +00:00
Zuul
d492b41cf2 Merge "Correct openstackid tarball URL redirection" 2020-02-25 22:30:28 +00:00
Ian Wienand
74005bb29a static: add a periodic 404 checker
This is an alternative to Iccf24a72cf82592bae8c699f9f857aa54fc74f10
which removes the 404 scraping tool.  It creates a zuul user and
enables login via the system-config per-project ssh key, and then runs
the 404 scraping script against it periodically.

Change-Id: I30467d791a7877b5469b173926216615eb57d035
2020-02-26 09:05:31 +11:00
Jeremy Stanley
5390bbf23f Correct openstackid tarball URL redirection
The source pattern for the tarballs.openstack.org openstackid
redirect incorrectly included an openstack parent directory. Remove
it, an also make the regex more properly differentiate lack of a
trailing "/" character from a directory name containing openstackid
as a substring (not that there is one, but this serves as a safer
template for future additions).

Change-Id: I705d849d1c10cf91391181aeef72a9f4b495d520
2020-02-25 21:17:46 +00:00
Monty Taylor
385e89d21e Upgrade gitea to 1.11.1
Gitea build needs npm now, so add the installation.

Change-Id: I250dbedf5fb0b30f5f80d23ff67f0b445ce3eb9d
2020-02-25 15:10:51 -06:00
Monty Taylor
97a79a027a Bump letsencrypt group id to match reality
It got created in the past as 3003. Just list it here like that.

Change-Id: Ic607a80c0d775856de059dedb73065c5708f556a
2020-02-25 14:17:13 -06:00
smarcet
88b26edf24 OpenStackId v3.0.1 deployment
Change-Id: I8a49dbde1bbcd935b380f003160040d634b2062c
Signed-off-by: smarcet <smarcet@gmail.com>
2020-02-25 15:35:17 -03:00
Zuul
8df5745c66 Merge "Rename gerrit hostvars to review01.openstack.org" 2020-02-25 17:26:49 +00:00
Monty Taylor
ef955dd270 Rename gerrit hostvars to review01.openstack.org
While the service is review.opendev.org, the server is actually
review01.openstack.org. The ansible inventory in production knows
it that way, as does the Nova in RAX DFW. Update the host_vars
entry and the zuul jobs so that it matches (And so that LE certs
apply)

Change-Id: I4c762c57f6826f2c5f9ed5c9cb0ae02644570c3d
2020-02-25 10:01:35 -06:00
smarcet
09f35f14bf OpenStackID v3.0.0
* migrated user storage to idp
* created users crud
* created groups crud
* migrated from eloquent to doctrine orm
* reafactoring

Change-Id: I766bbb75c0e65f504880e8c59951f63494a1e13f
Signed-off-by: smarcet <smarcet@gmail.com>
2020-02-25 09:45:06 -03:00
Zuul
bbba8524bd Merge "Removed OpenStackID stale config variables" 2020-02-24 22:29:46 +00:00
Jeremy Stanley
89ade11a95 Redirect openstackid tarball URLs to osf namespace
The blanket redirect from tarballs.openstack.org to
tarballs.opendev.org/openstack is only relevant for projects
publishing from the openstack namespace, since our new publication
jobs put content into Git-namespace-specific trees. Start a game of
Whack-a-Mole with the (hopefully few) projects in this situation.

Change-Id: I5d54532ef512df449d62299391d853d30862b7f2
2020-02-24 20:48:50 +00:00
Zuul
7fe8a64cdc Merge "Build gerrit images with bazelisk" 2020-02-24 18:20:48 +00:00
smarcet
ce6de87ea7 Removed OpenStackID stale config variables
Removed all variables related to Silverstripe
Dependency

Change-Id: Ib5e6834686c4952dd8e7220a31abe71a9278e397
Signed-off-by: smarcet <smarcet@gmail.com>
2020-02-24 14:26:30 -03:00
Ian Wienand
55da1e3d06 Revert "Generate list of 404s for docs.o.o"
This reverts commit c25e91f49632d8e187f35807f250567446bd5102.

This script parses the Apache logs and writes out a local count of the
404 data to files.openstack.org, and then exports it via
files.openstack.org.

As part of the spec [1] we're trying to remove publishing from local
volumes, in general.

Since this is not widely used, there is only one link to it, it's not
discoverable from the landing page of files.openstack.org (which just
shows the afs directory listing), it has a very long latency making it
not that useful for debugging and grepping the logs there have been no
accesses in the past 2 weeks (as far back as logs go) I propose we
remove it.

If we want to retain this, we should publish the output alongside the
docs AFS volume.  That could certainly be done by distributing the
docs keytab to the host and having it write out in a similar cron job.
Another option could be to setup a keypair for remote login and keep
that as a secret in Zuul, and do the same from a periodic job
(complicated by apache logs being root only, so needs some sudo magic
or similar).  Or, we could figure out an altogether better, privacy
respecting client analytics solution.

[1] https://docs.opendev.org/opendev/infra-specs/latest/specs/retire-static.html

Depends-On: https://review.opendev.org/709036
Change-Id: Iccf24a72cf82592bae8c699f9f857aa54fc74f10
2020-02-24 14:43:11 +11:00
Zuul
a2c21661df Merge "static: move afs sites from files.openstack.org to static.opendev.org" 2020-02-24 00:39:50 +00:00
Monty Taylor
a8e1d1496d Build gerrit images with bazelisk
We need to use bazelisk to build gerrit so that we can properly
track bazel versions in the job. Use the roles developed for
gerrit-review to do that, then simplify the dockerfile to have
it simply copy the war into the target image.

Also add polymer-bridges.

Depends-On: https://review.opendev.org/709256
Change-Id: I7c13df51d3b8c117bcc9aab9caad59687471d622
2020-02-21 17:32:01 -06:00
Zuul
71e650eb5a Merge "static: move site setup to a loop" 2020-02-21 19:27:38 +00:00
Zuul
e0ca915508 Merge "static: add releases.openstack.org site" 2020-02-21 17:12:52 +00:00