ask.openstack.org static site

We have decided to decommision the ask.openstack.org server as it is
running EOL Xenial, and its manually purchased certiface is about to
expire.  Although it has been deprecated for some time, we feel like
it has been around long-enough as a resource that it is best if we
replace it with a place-holder.  The links included here are the same
as the currently shown header explaining the site is read-only.

There's nowhere particularly relevant to redirect the site, so we add
a static file here, and some minimal Ansible to put it in the right
place in a generic way in-case we want to do the same for another
service.

Change-Id: I8a31f8fcf9b3064c0ae58e463a6014dc14b518a7
This commit is contained in:
Ian Wienand 2021-05-24 18:24:56 +10:00
parent 3289edf077
commit 1fbd156697
8 changed files with 110 additions and 5 deletions

View File

@ -4,6 +4,8 @@ letsencrypt_certs:
- static01.opendev.org
- files.openstack.org
- static.openstack.org
static01-ask-openstack-org:
- ask.openstack.org
static01-docs-airshipit-org:
- docs.airshipit.org
static01-ci-openstack-org:

View File

@ -39,6 +39,9 @@
- name: letsencrypt updated static01-opendev-org-main
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
- name: letsencrypt updated static01-ask-openstack-org
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
- name: letsencrypt updated static01-docs-airshipit-org
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml

View File

@ -0,0 +1,40 @@
<VirtualHost *:80>
ServerName ask.openstack.org
RewriteEngine On
RewriteRule ^/(.*) https://ask.openstack.org/$1 [last,redirect=permanent]
LogLevel warn
ErrorLog /var/log/apache2/ask.openstack.org_error.log
CustomLog /var/log/apache2/ask.openstack.org_access.log combined
ServerSignature Off
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName ask.openstack.org
DocumentRoot /var/www/ask.openstack.org
SSLCertificateFile /etc/letsencrypt-certs/ask.openstack.org/ask.openstack.org.cer
SSLCertificateKeyFile /etc/letsencrypt-certs/ask.openstack.org/ask.openstack.org.key
SSLCertificateChainFile /etc/letsencrypt-certs/ask.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
Use UserAgentFilter
<Directory /var/www/ask.openstack.org/>
Options Indexes FollowSymLinks MultiViews
AllowOverrideList Redirect RedirectMatch
Require all granted
</Directory>
LogLevel warn
ErrorLog /var/log/apache2/ask.openstack.org_error.log
CustomLog /var/log/apache2/ask.openstack.org_access.log combined
ServerSignature Off
</VirtualHost>
</IfModule>

View File

@ -0,0 +1,30 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ask.openstack.org</title>
<meta name="description" content="ask.openstack.org">
</head>
<body>
<h1>ask.openstack.org</h1>
<p>The <tt>ask.openstack.org</tt> site was shutdown in May 2021.</p>
<p>The following options are available for community-based support.</p>
<ul>
<li><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss">openstack-discuss</a> mailing list.</li>
<li><a href="https://stackoverflow.com/questions/tagged/openstack">stackoverflow.com</a> for code questions.</li>
<li><a href="https://serverfault.com/tags/openstack/info">serverfault.com</a> for operations.</li>
<li>The <a href="https://web.archive.org/web/*/ask.openstack.org">Internet
Archive</a> has archived the site.</li>
</ul>
</body>
</html>

View File

@ -0,0 +1,15 @@
- name: Create ask directory
file:
path: /var/www/ask.openstack.org
state: directory
owner: www-data
group: www-data
mode: 0755
- name: Copy ask index.html
copy:
src: 'ask.openstack.org/index.html'
dest: '/var/www/ask.openstack.org/index.html'
owner: www-data
group: www-data
mode: 0644

View File

@ -1,14 +1,20 @@
- name: Add {{ item }} configuration
- name: Check for deployment tasks
include_tasks: "{{ _dt }}"
when: _dt != ""
vars:
_dt: "{{ lookup('first_found', dict(files=[config+'.yaml']), errors='ignore') }}"
- name: Add {{ config }} configuration
copy:
src: '{{ item }}.conf'
src: '{{ config }}.conf'
dest: /etc/apache2/sites-available/
owner: root
group: root
mode: 0644
- name: 'Enable {{ item }}'
command: 'a2ensite {{ item }}'
- name: 'Enable {{ config }}'
command: 'a2ensite {{ config }}'
args:
creates: '/etc/apache2/sites-enabled/{{ item }}'
creates: '/etc/apache2/sites-enabled/{{ config }}'
notify:
- Reload apache2

View File

@ -79,6 +79,7 @@
include_tasks: enable_site.yaml
loop:
- 00-static.opendev.org
- 50-ask.openstack.org
- 50-ci.openstack.org
- 50-cinder.openstack.org
- 50-developer.openstack.org
@ -102,6 +103,8 @@
- 50-tarballs.opendev.org
- 50-tarballs.openstack.org
- 50-zuul-ci.org
loop_control:
loop_var: config
- name: Enable git sites
include_tasks: enable_git_site.yaml

View File

@ -42,6 +42,12 @@ def test_static_opendev_org(host, name):
(name, name))
assert 'Index of /' in cmd.stdout
def test_ask_openstack_org(host):
cmd = host.run('curl --insecure '
'--resolve ask.openstack.org:443:127.0.0.1 '
'https://ask.openstack.org/')
assert 'ask.openstack.org' in cmd.stdout
def test_docs_airshipit_org(host):
cmd = host.run('curl --insecure '
'--resolve docs.airshipit.org:443:127.0.0.1 '