Add planet.openstack.org redirect to static

This handles planet.openstack.org and redirects it to the
opendev.org/openstack/planet-openstack repo, where we will put a
README and the OPML file of the last state as we deprecate this
service.

Change-Id: If141aca5efbdbe60c91ceefaa4e05c98cd0ba5bb
This commit is contained in:
Ian Wienand 2021-04-13 11:18:24 +10:00
parent 40b87510db
commit 609986634f
5 changed files with 49 additions and 1 deletions

View File

@ -39,6 +39,8 @@ letsencrypt_certs:
- keystone.openstack.org
static01-nova-openstack-org:
- nova.openstack.org
static01-planet-openstack-org:
- planet.openstack.org
static01-service-types-openstack-org:
- service-types.openstack.org
static01-security-openstack-org:

View File

@ -90,6 +90,9 @@
- name: letsencrypt updated static01-nova-openstack-org
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
- name: letsencrypt updated static01-planet-openstack-org
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
- name: letsencrypt updated static01-service-types-openstack-org
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
@ -117,9 +120,13 @@
- name: letsencrypt updated static01-zuul-ci-org
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
# Grafana
- name: letsencrypt updated grafana01-opendev-org-main
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
# Codesearch (hound)
- name: letsencrypt updated codesearch01-opendev-org-main
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml

View File

@ -0,0 +1,31 @@
<VirtualHost *:80>
ServerName planet.openstack.org
RewriteEngine On
RewriteRule ^/(.*) https://opendev.org/openstack/openstack-planet [last,redirect=permanent]
LogLevel warn
ErrorLog /var/log/apache2/planet.openstack.org_error.log
CustomLog /var/log/apache2/planet.openstack.org_access.log combined
ServerSignature Off
</VirtualHost>
<VirtualHost *:443>
ServerName planet.openstack.org
SSLCertificateFile /etc/letsencrypt-certs/planet.openstack.org/planet.openstack.org.cer
SSLCertificateKeyFile /etc/letsencrypt-certs/planet.openstack.org/planet.openstack.org.key
SSLCertificateChainFile /etc/letsencrypt-certs/planet.openstack.org/ca.cer
SSLProtocol All -SSLv2 -SSLv3
# Note: this list should ensure ciphers that provide forward secrecy
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:!AES256:!aNULL:!eNULL:!MD5:!DSS:!PSK:!SRP
SSLHonorCipherOrder on
RewriteEngine On
RewriteRule ^/(.*) https://opendev.org/openstack/openstack-planet [last,redirect=permanent]
LogLevel warn
ErrorLog /var/log/apache2/planet.openstack.org_error.log
CustomLog /var/log/apache2/planet.openstack.org_access.log combined
ServerSignature Off
</VirtualHost>

View File

@ -92,6 +92,7 @@
- 50-horizon.openstack.org
- 50-keystone.openstack.org
- 50-nova.openstack.org
- 50-planet.openstack.org
- 50-security.openstack.org
- 50-service-types.openstack.org
- 50-specs.openstack.org

View File

@ -80,7 +80,7 @@ def test_tarballs_opendev_org_redirects(host):
cmd = host.run('curl --insecure '
'--resolve tarballs.opendev.org:443:127.0.0.1 '
'https://tarballs.opendev.org/openstack/afsmon/')
# Should be redirected to opendev/afsmon
# Should be redirected to opendev/afsmon
assert '301 Moved Permanently' in cmd.stdout
assert 'https://tarballs.opendev.org/opendev/afsmon' in cmd.stdout
@ -207,6 +207,13 @@ def test_summit_openstack_org(host):
assert '301 Moved Permanently' in cmd.stdout
assert 'https://openstack.org/summit/' in cmd.stdout
def test_planet_openstack_org_redirects(host):
cmd = host.run('curl --insecure '
'--resolve planet.openstack.org:443:127.0.0.1 '
'https://planet.openstack.org/')
assert '301 Moved Permanently' in cmd.stdout
assert 'https://opendev.org/openstack/openstack-planet' in cmd.stdout
ci_redirects = (
('/jenkins-job-builder', 'https://docs.openstack.org/infra/jenkins-job-builder'),
('/nodepool', 'https://docs.openstack.org/infra/nodepool'),