'),
- ('/community/index.php', 'Index page'),
-
- ('/Schemas', 'Open Microscopy Environment Schemas'),
- ('/Schemas/ROI', 'Open Microscopy Environment ROI Schemas'),
- ('/Schemas/broken-link', 'Open Microscopy Environment Schemas'),
-
- ('/qa2', '
OMERO.qa provides support services'),
- ('/qa2/qa/feedback/17777', '
Go back'),
- ('/qa2/qa/upload', 'Uploading sample images'),
- ('/qa2/qa/feedback/?status=1',
- 'If you cannot view feedback you previously submitted'),
- ('/qa2/registry/demo_account', 'Requesting a demo server account'),
- ('/qa2/registry/statistic', 'File statistics.'),
-]
-content_uris_no_slash = [
- ('/Schemas/OME/2016-06/ome.xsd', 'Schema June 2016'),
- ('/Schemas/OME/2015-01/ome.xsd', 'Schema January 2015'),
- ('/Schemas/ROI/2015-01/ROI.xsd', 'Region of Interest'),
- ('/XMLschemas/OME/FC/ome.xsd', 'The OME element is a container'),
- ('/XMLschemas/CA/RC1/CA.xsd',
- 'Conforms to w3c http://www.w3.org/2001/XMLSchema'),
- ('/XMLschemas/STD/RC2/STD.xsd', 'Defines a semantic type'),
-]
-
-
-# Based on
-# https://github.com/openmicroscopy/prod-playbooks/blob/master/www/playbook.yml
-@pytest.mark.parametrize('host', hosts)
-@pytest.mark.parametrize('uri,expect', redirect_uris)
-@pytest.mark.parametrize("suffix", suffixes)
-def test_redirect_with_slash(host, uri, expect, suffix):
- r = requests.head('%s%s%s' % (host, uri, suffix))
- assert r.is_redirect
- assert r.headers['Location'] == '%s%s' % (host, expect)
-
-
-@pytest.mark.parametrize('host', hosts)
-@pytest.mark.parametrize('uri,expect', external_uris)
-@pytest.mark.parametrize("suffix", suffixes)
-def test_redirect_external(host, uri, expect, suffix):
- r = requests.head('%s%s%s' % (host, uri, suffix))
- assert r.is_redirect
- assert r.headers['Location'] == expect
-
-
-@pytest.mark.parametrize('host', hosts)
-def test_404(host):
- uri = '/non-existent/path'
- r = requests.head('%s%s' % (host, uri))
- assert r.status_code == 404
-
-
-@pytest.mark.parametrize('host', hosts)
-@pytest.mark.parametrize('uri,content', content_uris)
-@pytest.mark.parametrize('suffix', suffixes)
-def test_content(host, uri, content, suffix):
- r = requests.get('%s%s%s' % (host, uri, suffix))
- assert content in r.text
-
-
-@pytest.mark.parametrize('host', hosts)
-@pytest.mark.parametrize('uri,content', content_uris_no_slash)
-def test_content_no_slash(host, uri, content):
- r = requests.get('%s%s' % (host, uri))
- assert content in r.text
diff --git a/www/tests/requirements.txt b/www/tests/requirements.txt
deleted file mode 100644
index 547de5c5..00000000
--- a/www/tests/requirements.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-pytest
-requests
diff --git a/www/www-deploy.yml b/www/www-deploy.yml
deleted file mode 100644
index 29c9f2c1..00000000
--- a/www/www-deploy.yml
+++ /dev/null
@@ -1,350 +0,0 @@
-# Install NGINX
-
-- name: Www deploy
- hosts: www
-
- roles:
- - role: ome.ssl_certificate
- - role: ome.nginx_proxy
- tags: nginxconf
-
- handlers:
- - name: Reload nginx
- listen: ssl certificate changed
- become: true
- ansible.builtin.service:
- name: nginx
- state: reloaded
-
- vars:
- nginx_proxy_worker_processes: >-
- {{ ((ansible_processor_count * ansible_processor_cores)
- / 2) |round|int }}
- nginx_proxy_worker_connections: 65000
- nginx_proxy_ssl: true
- nginx_proxy_ssl_certificate: "{{ ssl_certificate_bundled_path }}"
- nginx_proxy_ssl_certificate_key: "{{ ssl_certificate_key_path }}"
- nginx_proxy_http2: true
- nginx_proxy_force_ssl: false
- nginx_proxy_404: "/404.html"
- nginx_proxy_conf_http:
- - "client_max_body_size 2g"
- nginx_proxy_backends:
- # Proxy for QA application
- - location: /qa2
- server: https://www-legacy.openmicroscopy.org/qa2
- - location: /static
- server: https://www-legacy.openmicroscopy.org
- nginx_proxy_redirect_map_locations:
- # TODO: change to 301 when we're happy
- - location: "~ ^/(BIO-FORMATS)($|/)"
- code: 302
- - location: "~ ^/(OME-FILES)($|/)"
- code: 302
- - location: "~ ^/(OMERO)($|/)"
- code: 302
- - location: "~ ^/(site)($|/)"
- code: 302
- - location: "~ ^/(omero-blog)($|/)"
- code: 302
- - location: "~ ^/(info)($|/)"
- code: 302
- - location: "~ ^/(forums)($|/)"
- code: 302
- - location: "~ ^/(XMLschemas)($|/)"
- code: 302
- - location: "~ ^/(Schemas/Samples)($|/)"
- code: 302
- nginx_proxy_redirect_map:
- # by default redirect to the 404 page
- - match: default
- dest: /404.html
- - match: "~/omero-blog.*"
- dest: http://blog.openmicroscopy.org
- - match: "~/site/?$"
- dest: /
- - match: "~/site/news/?$"
- dest: /announcements
-
- # about
- - match: "~/site/about/?$"
- dest: /about
- - match: "~/site/about/who-ome"
- dest: /teams
- - match: "~/site/about/licensing"
- dest: /licensing
- - match: "~/site/about/licensing-attribution(/.*)?$"
- dest: /licensing
- - match: "~/site/about/ome-contributors/?$"
- dest: /contributors
- - match: "~/site/about/partners/?$"
- dest: /commercial-partners
- - match: "~/site/about/development-teams/?$"
- dest: /teams
- - match: "~/site/about/development-teams/glencoe-software"
- dest: https://www.glencoesoftware.com/team.html
- - match: "~/site/about/publications"
- dest: /citing-ome
- - match: "~/site/about/what-omero/overview"
- dest: /omero
- - match: "~/site/about/(?
.*)$"
- dest: /about
-
- # products
- - match: "~/site/products/?$"
- dest: /products
- - match: "~/site/products/omero/?$"
- dest: /omero
- - match: "~/site/products/omero/downloads/?$"
- dest: /omero/downloads/
- - match: "~/site/products/omero/feature-list/?$"
- dest: /omero/features/
- - match: "~/site/products/omero/big-images-support/?$"
- dest: /omero/view/
- - match: "~/site/products/omero/secvuln/?$"
- dest: /security/advisories/
- - match: "~/site/products/ome5/secvuln/?$"
- dest: /security/advisories/
- - match: "~/site/products/omero/secvuln/(?
.*[^/])/?$"
- dest: /security/advisories/$link/
- - match: "~/site/products/bio-formats/?$"
- dest: /bio-formats
- - match: "~/site/products/bio-formats/downloads/?$"
- dest: /bio-formats/downloads/
- - match: "~/site/products/ome-files-cpp/?$"
- dest: /ome-files
- - match: "~/site/products/(?
.*)$"
- dest: /products
-
- # community
- - match: "~/forums/?$"
- dest: https://forum.image.sc/c/data-management
- - match: "~/site/community/?$"
- dest: /support
- - match: "~/site/community/mailing-lists/?$"
- dest: /support
- - match: "~/site/events(/.*)?$"
- dest: /events
- - match: "~/site/community/minutes/conference-calls/?$"
- dest: /on-the-web
- - match: "~/site/community/minutes/meetings\
- /12th-annual-users-meeting-2017"
- dest: /events/12th-annual-users-meeting-2017.html
- - match: "~/site/community/minutes/meetings\
- /11th-annual-users-meeting-2016"
- dest: /events/11th-annual-users-meeting-2016.html
- - match: "~/site/community/minutes/meetings/\
- 10th-annual-users-meeting-june-2015"
- dest: /events/10th-annual-users-meeting-june-2015.html
- - match: "~/site/community/minutes/meetings/\
- 9th-annual-users-meeting-june-2014"
- dest: /events/9th-annual-users-meeting-june-2014.html
- - match: "~/site/community/jobs/?$"
- dest: /careers
- - match: "~/site/community/scripts/?$"
- dest: "https://docs.openmicroscopy.org/\
- latest/omero/developers/scripts/index.html"
- - match: "~/site/community/(?
.*)$"
- dest: /support
-
- # support
- - match: "~/site/support/?$"
- dest: /docs
-
- - match: "~/site/support/bio-formats/?$"
- dest: https://docs.openmicroscopy.org/latest/bio-formats/
- - match: "~/site/support/bio-formats/(?
.*)$"
- dest: https://docs.openmicroscopy.org/latest/bio-formats/$link
- - match: "~/site/support/bio-formats5/?$"
- dest: https://docs.openmicroscopy.org/latest/bio-formats5/
- - match: "~/site/support/bio-formats5/(?
.*)$"
- dest: https://docs.openmicroscopy.org/latest/bio-formats5/$link
- - match: '~/site/support/bio-formats5\.3/?$'
- dest: https://docs.openmicroscopy.org/latest/bio-formats5.3/
- - match: '~/site/support/bio-formats5\.3/(?
.*)$'
- dest: https://docs.openmicroscopy.org/latest/bio-formats5.3/$link
- - match: '~/site/support/bio-formats5\.4/?$'
- dest: https://docs.openmicroscopy.org/latest/bio-formats5.4/
- - match: '~/site/support/bio-formats5\.4/(?
.*)$'
- dest: https://docs.openmicroscopy.org/latest/bio-formats5.4/$link
- - match: '~/site/support/bio-formats5\.5/?$'
- dest: https://docs.openmicroscopy.org/latest/bio-formats5.5/
- - match: '~/site/support/bio-formats5\.5/(?
.*)$'
- dest: https://docs.openmicroscopy.org/latest/bio-formats5.5/$link
-
- - match: "~/site/support/omero/?$"
- dest: https://docs.openmicroscopy.org/latest/omero/
- - match: "~/site/support/omero/(?
.*)$"
- dest: https://docs.openmicroscopy.org/latest/omero/$link
- - match: "~/site/support/omero5/?$"
- dest: https://docs.openmicroscopy.org/latest/omero5/
- - match: "~/site/support/omero5/(?
.*)$"
- dest: https://docs.openmicroscopy.org/latest/omero5/$link
- - match: '~/site/support/omero5\.0/?$'
- dest: https://docs.openmicroscopy.org/latest/omero5.0/
- - match: '~/site/support/omero5\.0/(?
.*)$'
- dest: https://docs.openmicroscopy.org/latest/omero5.0/$link
- - match: '~/site/support/omero5\.1/?$'
- dest: https://docs.openmicroscopy.org/latest/omero5.1/
- - match: '~/site/support/omero5\.1/(?
.*)$'
- dest: https://docs.openmicroscopy.org/latest/omero5.1/$link
- - match: '~/site/support/omero5\.2/?$'
- dest: https://docs.openmicroscopy.org/latest/omero5.2/
- - match: '~/site/support/omero5\.2/(?
.*)$'
- dest: https://docs.openmicroscopy.org/latest/omero5.2/$link
- - match: '~/site/support/omero5\.3/?$'
- dest: https://docs.openmicroscopy.org/latest/omero5.3/
- - match: '~/site/support/omero5\.3/(?
.*)$'
- dest: https://docs.openmicroscopy.org/latest/omero5.3/$link
-
- - match: "~/site/support/ome-model/?$"
- dest: https://docs.openmicroscopy.org/latest/ome-model/
- - match: "~/site/support/ome-model/(?
.*)$"
- dest: https://docs.openmicroscopy.org/latest/ome-model/$link
- - match: "~/site/support/file-formats/?$"
- dest: https://docs.openmicroscopy.org/latest/ome-model/
- - match: "~/site/support/file-formats/schemas\
- /specifications/compliant-file-specification/?$"
- dest: https://docs.openmicroscopy.org/latest/ome-model/specifications/
- - match: "~/site/support/ome-tiff/?$"
- dest: https://docs.openmicroscopy.org/latest/ome-model/ome-tiff/
- - match: "~/site/support/ome-files-cpp/?$"
- dest: https://docs.openmicroscopy.org/latest/ome-files-cpp/
- - match: "~/site/support/ome-files-cpp/(?
.*)$"
- dest: https://docs.openmicroscopy.org/latest/ome-files-cpp/$link
- - match: "~/site/support/contributing/?$"
- dest: https://docs.openmicroscopy.org/contributing/
- - match: "~/site/support/contributing/(?
.*)$"
- dest: https://docs.openmicroscopy.org/contributing/$link
- - match: "~/site/support/previous(/.*)?$"
- dest: https://docs.openmicroscopy.org
- - match: "~/site/support/ome-artwork(/.*)?$"
- dest: /artwork
-
- # uppercase alias
- - match: "~/BIO-FORMATS$"
- dest: /bio-formats
- - match: "~/BIO-FORMATS/(?
.*)$"
- dest: /bio-formats/$link
- - match: "~/OME-FILES$"
- dest: /ome-files
- - match: "~/OME-FILES/(?
.*)$"
- dest: /ome-files/$link
- - match: "~/OMERO$"
- dest: /omero
- - match: "~/OMERO/(?
.*)$"
- dest: /omero/$link
-
- # info
- - match: "~/info/vulnerabilities/?$"
- dest: /security/advisories/
- - match: "~/info/vulnerabilities/(?
.*[^/])/?$"
- dest: /security/advisories/$link/
- - match: "~/info/omero/?$"
- dest: /omero
- - match: "~/info/OMERO.insight/?$"
- dest: https://docs.openmicroscopy.org/latest/omero/users/index.html
- - match: "~/info/OMERO.importer/?$"
- dest: https://docs.openmicroscopy.org/latest/omero/users/index.html
- - match: "~/info/OMERO.editor/?$"
- dest: https://docs.openmicroscopy.org/latest/omero/users/index.html
- - match: "~/info/OMERO.web/?$"
- dest: https://docs.openmicroscopy.org/latest/omero/users/index.html
- - match: "~/info/OMERO.server"
- dest: https://docs.openmicroscopy.org/latest/omero/users/index.html
- - match: "~/info/permissions"
- dest: "https://docs.openmicroscopy.org/latest\
- /omero/sysadmins/server-permissions.html"
- - match: "~/info/demo"
- dest: http://help.openmicroscopy.org/demo-server.html
- - match: "~/info/cls"
- dest: /omero/downloads/
- - match: "~/info/download"
- dest: /omero/downloads/
- - match: "~/info/downloads"
- dest: /omero/downloads/
- - match: "~/info/lists"
- dest: http://lists.openmicroscopy.org.uk/mailman/listinfo/
- - match: "~/info/videos"
- dest: https://www.youtube.com/channel/UCyySB9ZzNi8aBGYqcxSrauQ
- - match: "~/info/attribution"
- dest: /licensing/
- - match: "~/info/downgrade"
- dest: "https://docs.openmicroscopy.org/latest/\
- omero/developers/Model/XsltTransformations.html"
- - match: "~/info/flimfit"
- dest: http://flimfit.org
- - match: "~/info/scripts"
- dest: "https://docs.openmicroscopy.org/latest/\
- omero/developers/scripts/index.html"
- - match: "~/info/bio-formats(/.*)?$"
- dest: https://docs.openmicroscopy.org/latest/bio-formats/
- - match: "~/info/slidebook"
- dest: https://www.intelligent-imaging.com/technical-answers
- - match: "~/info/(.*)?$"
- dest: /site-map
-
- # Legacy XMLschemas endpoint
- - match: "~/XMLschemas/(?
.*[^/])?$"
- dest: /Schemas/$link
-
- # Legacy schemas samples
- - match:
- "~/Schemas/Samples/2013-06/bioformats-artificial/\
- multi-channel-4D-series.ome.tif.zip"
- dest:
- "https://downloads.openmicroscopy.org/images/OME-TIFF/\
- 2013-06/bioformats-artificial/multi-channel-4D-series.ome.tif"
- - match: "~/Schemas/Samples/2015-01/set-1-meta-companion"
- dest:
- https://downloads.openmicroscopy.org/images/OME-TIFF/2015-01/companion/
- - match:
- "~/Schemas/Samples/2015-01/bioformats-artificial/\
- multi-channel-time-series.ome.tif.zip"
- dest:
- "https://downloads.openmicroscopy.org/images/OME-TIFF/\
- 2015-01/bioformats-artificial/multi-channel-time-series.ome.tif"
- - match: "~/Schemas/Samples/(?
.*)?$"
- dest: https://downloads.openmicroscopy.org/images/OME-TIFF/$link
- - match: "~/Schemas/Samples"
- dest: https://downloads.openmicroscopy.org/images/
-
- nginx_proxy_direct_locations:
- - location: "/"
- root: "/var/www/www.openmicroscopy.org/html"
- index: index.html
-
- - location: "^~ /Schemas/Documentation/Generated/"
- alias: /var/www/schemas_documentation/
-
- - location: "/Schemas/Transforms/"
- root: "/var/www/www.openmicroscopy.org/html/"
- custom:
- - autoindex on
-
- # Static copy of old phpBB forums: treat query params as part of filename
- - location: "~ ^/community/style.php.*"
- root: /var/www/phpbbforum/www.openmicroscopy.org
- custom:
- - try_files $request_uri $uri =404
- - default_type text/css
- - location: "~ ^/community/?$"
- redirect301: /community/index.php
- - location: /community
- root: /var/www/phpbbforum/www.openmicroscopy.org
- custom:
- # Need to exclude extra query parameters in incoming external links
- # e.g. sid=
- # If an exact match isn't found try just these parameters:
- # [f, t, p], [f, t], [f]
- - >-
- try_files
- $request_uri
- $uri?f=$arg_f&t=$arg_t&p=$arg_p
- $uri?f=$arg_f&t=$arg_t
- $uri?f=$arg_f
- =404
- - default_type text/html
-
-- name: Import www-static playbook
- import_playbook: www-static.yml
diff --git a/www/www-static.yml b/www/www-static.yml
deleted file mode 100644
index f3c511c3..00000000
--- a/www/www-static.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-# Update the static website
-
-- name: Www static
- hosts: www
-
- pre_tasks:
- - name: Check if phpbbforum already unzipped
- ansible.builtin.stat:
- path: "{{ phpbbforum_style_file }}"
- register: _phpbbforum_style_file_st
-
- - name: Check if schemas_documentation already unzipped
- ansible.builtin.stat:
- path: "{{ schemas_doc_file }}"
- register: _schemas_doc_file_st
-
- roles:
- - role: ome.deploy_archive
- become: true
- deploy_archive_dest_dir: /var/www
- deploy_archive_src_url: "https://downloads.openmicroscopy.org/web-\
- archive/phpbbforum-20190718.tar.gz"
- deploy_archive_sha256: "e9d7a7eefbacf42ddbdf92b201584913cb6d94ec\
- 331750f811232b2e91aa5b40"
- # This file is patched later so only unzip if it doesn't exist
- when: not _phpbbforum_style_file_st.stat.exists
-
- - role: ome.deploy_archive
- become: true
- deploy_archive_dest_dir: /var/www
- deploy_archive_src_url: "https://downloads.openmicroscopy.org/web-\
- archive/schemas_documentation-20211213.tar.gz"
- deploy_archive_sha256: "27cc5def458112a2e259484906f2bc8c0e0e2bd\
- 0a728b0a478302537d67117ec"
- # This file is patched later so only unzip if it doesn't exist
- when: not _schemas_doc_file_st.stat.exists
-
- tasks:
- - name: Install deployment script
- become: true
- template:
- src: files/deploy
- dest: /usr/local/bin/deploy
- mode: 0555
-
- - name: Install Cron daemon
- become: true
- ansible.builtin.yum:
- name: cronie
- state: installed
-
- - name: Add cron job updating the website
- become: true
- ansible.builtin.cron:
- name: "Deploy the website"
- special_time: hourly
- job: >-
- /usr/local/bin/deploy 2>&1 >
- /dev/null || /usr/local/bin/deploy -f
-
- - name: Update static phpbb stylesheet
- become: true
- ansible.builtin.blockinfile:
- block: |
- form,
- .quick-login,
- .buttons,
- #jumpbox~h3,
- #jumpbox~p,
- .headerspace~h3,
- .headerspace~p,
- ul.linklist.rightside,
- ul.linklist li.rightside {
- display: none;
- }
- marker: "/* {mark} ANSIBLE MANAGED BLOCK */"
- path: "{{ phpbbforum_style_file }}"
-
- vars:
- phpbbforum_style_file: "/var/www/phpbbforum/www.openmicroscopy\
- .org/community/style.php?id=7&lang=en"
- schemas_doc_file: "/var/www/schemas_documentation/OME-2016-06/ome.html"