WIP: Add https support to apache2 on ICF-CI #22
9 changed files with 110 additions and 16 deletions
|
|
@ -53,7 +53,10 @@ artifacts:
|
||||||
install:
|
install:
|
||||||
- curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -;
|
- curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -;
|
||||||
# Bootstrap ICF-like system installation
|
# Bootstrap ICF-like system installation
|
||||||
|
- sudo hostname data.inm-icf.de
|
||||||
- sudo .appveyor/install_apt_pkgs
|
- sudo .appveyor/install_apt_pkgs
|
||||||
|
- .appveyor/apache_enable_ssl
|
||||||
|
- .appveyor/apache_enable_user_dir
|
||||||
# build the singularity image, unless we got it from the cache
|
# build the singularity image, unless we got it from the cache
|
||||||
- sh: "[ ! -f icf.sif ] && singularity build --fakeroot icf.sif singularity/icf.def || true"
|
- sh: "[ ! -f icf.sif ] && singularity build --fakeroot icf.sif singularity/icf.def || true"
|
||||||
# install image as `icf-utils` (mounting the ICF /data store on-run)
|
# install image as `icf-utils` (mounting the ICF /data store on-run)
|
||||||
|
|
@ -124,7 +127,6 @@ build_script:
|
||||||
- git config --global user.email "test@appveyor.land"
|
- git config --global user.email "test@appveyor.land"
|
||||||
- git config --global user.name "Appveyor Almighty"
|
- git config --global user.name "Appveyor Almighty"
|
||||||
|
|
||||||
|
|
||||||
before_test:
|
before_test:
|
||||||
# simple call to see if datalad and git-annex are installed properly
|
# simple call to see if datalad and git-annex are installed properly
|
||||||
- icf-utils datalad wtf
|
- icf-utils datalad wtf
|
||||||
|
|
@ -139,12 +141,6 @@ test_script:
|
||||||
curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -;
|
curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -;
|
||||||
fi
|
fi
|
||||||
- icf-utils python3 -m pytest -s -v ../tests
|
- icf-utils python3 -m pytest -s -v ../tests
|
||||||
- sh:
|
|
||||||
if [ X"$ACTIVATE_SSH_LOGIN" == "Xpost-tests" ]; then
|
|
||||||
curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -;
|
|
||||||
touch $HOME/build.lock;
|
|
||||||
while [ -e $HOME/build.lock ]; do sleep 5; done;
|
|
||||||
fi;
|
|
||||||
|
|
||||||
|
|
||||||
on_finish:
|
on_finish:
|
||||||
|
|
|
||||||
17
.appveyor/apache_enable_ssl
Executable file
17
.appveyor/apache_enable_ssl
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e -u
|
||||||
|
|
||||||
|
sudo cp .appveyor/data/ssl-cert-snakeoil.crt /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||||
|
sudo cp .appveyor/data/ssl-cert-snakeoil.key /etc/ssl/private/ssl-cert-snakeoil.key
|
||||||
|
sudo cp .appveyor/data/INM-ICF-TestCA.crt /usr/local/share/ca-certificates/
|
||||||
|
|
||||||
|
sudo /sbin/dpkg-reconfigure ca-certificates
|
||||||
|
|
||||||
|
sudo a2enmod ssl
|
||||||
|
sudo systemctl restart apache2
|
||||||
|
|
||||||
|
sudo a2ensite default-ssl
|
||||||
|
sudo systemctl reload apache2
|
||||||
|
|
||||||
|
echo "ServerName data.inm-icf.de" | sudo tee -a /etc/apache2/httpd.conf
|
||||||
|
|
@ -2,11 +2,6 @@
|
||||||
|
|
||||||
set -e -u
|
set -e -u
|
||||||
|
|
||||||
pushd /etc/apache2/mods-enabled
|
sudo a2enmod userdir
|
||||||
|
sudo systemctl restart apache2
|
||||||
|
|
||||||
sudo ln -s ../mods-available/userdir.load
|
|
||||||
sudo ln -s ../mods-available/userdir.conf
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
||||||
sudo apachectl restart
|
|
||||||
|
|
|
||||||
26
.appveyor/data/INM-ICF-TestCA.crt
Normal file
26
.appveyor/data/INM-ICF-TestCA.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7S86cXFpaDCm2Ug19V8VsDZqpd
|
||||||
|
lNTiGw9STxe8jQ4rOO1+AmqucjIvxhpdhgIxNkMq84e4kHk4pwI2NgYCG30OTQ6L
|
||||||
|
Ygjg28g1WZ8StLEpAkwzEfvyovIlAgMBAAGjUzBRMB0GA1UdDgQWBBRnWujBTlSd
|
||||||
|
fg5Omr684f56dS7gpzAfBgNVHSMEGDAWgBRnWujBTlSdfg5Omr684f56dS7gpzAP
|
||||||
|
BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBPdVr0mA+55Z9VS+ki
|
||||||
|
uDGx5a5l9nMhWlFIePxhil8Vvkv7feIDrl6xBUVrAIljdoj0+NdzSqg1n+edG/YA
|
||||||
|
jyXd+VECoN8+uhdnZNfYI2Hc6rKQsi78Gc8vqHyJQ+3TVMx5ZhIBJG0+tpsoTMRf
|
||||||
|
6FG1nD1g56hzS2SW2vMnEUGmIXv8j/jW7nrLKpPWoih5fIatBQh48R0ZW5OXIg9N
|
||||||
|
M3dHyXU2uXE1J7wQXmF6wd2lhxdcRzRdLKA/U+Vc3W69G6CxQlpulCI25D0pjs1J
|
||||||
|
fiXcgxFyTh48SyL4CaPvXV/hkgnu3OM8U8dAIM/8fA9FLT1DHz/KhhtQRPvEKnWr
|
||||||
|
wFUZ
|
||||||
|
-----END CERTIFICATE-----
|
||||||
26
.appveyor/data/ssl-cert-snakeoil.crt
Normal file
26
.appveyor/data/ssl-cert-snakeoil.crt
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIEYDCCA0igAwIBAgIUYIUlxtOdFy8jNrjeZxYjJjj+swEwDQYJKoZIhvcNAQEL
|
||||||
|
BQAwgbYxCzAJBgNVBAYTAkRFMQwwCgYDVQQIDANOUlcxEDAOBgNVBAcMB0NvbG9n
|
||||||
|
bmUxIjAgBgNVBAoMGUNocmlzdGlhbiBNb2VuY2ggU29mdHdhcmUxFDASBgNVBAsM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Uu4KcwDQYJKoZIhvcNAQELBQAD
|
||||||
|
ggEBABNImL63Hexh9PHUeLCDGMsmswame1ejVy0OXcAtoKfLPHgxaSvvVf2FOHfn
|
||||||
|
pRsnkhmI1QPf2KWdDY50IMR66rTty+9ovrBR1HAg+r2aoHNAYuiL2gENQnWZ4Rzt
|
||||||
|
Kl1E/M1WxD5QRxJoly0zhymxEis8aNs7xBLIXTfV30BhuE5uvgnY369eApNlguZE
|
||||||
|
UqLZPiN36KHl+agvOEXlKd/ZfQqcUzO2P2/rgHuSNFe2IRvolz1fkXJ57sbEU9X/
|
||||||
|
nm8p7TAff3He1w0K0EzMhpxpyiwTeDvDq4+I+vvR7HJwpQ0doNkQDLxK+ClK25jA
|
||||||
|
TEwqIKrzt44ueFqeqvLl1OyCi7M=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
28
.appveyor/data/ssl-cert-snakeoil.key
Normal file
28
.appveyor/data/ssl-cert-snakeoil.key
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDJT+tVQsTPTnFX
|
||||||
|
BB+ekrfc5fXumie4xaEpiV2x6dKQpveAGOkvSHzJAEqCqN6k7ypwuLas5r08ikO7
|
||||||
|
rs2xK5PhhYuhtWLeXnP7ZRTeDxzhJjEu8pT0NOJ0UEFhV38Z9dmr2mWzExN8B8Be
|
||||||
|
q377Drj8/z+h8gtBrnooSO3Q2ufT0DBpIFZ/vhc5ocwt1fEXJXZhykO/eyrv90if
|
||||||
|
4M5ppjtvkI24brdTp5EmCVKaCyPgnbd3IaGvOOMvKbfBQtXwJFkNXjTT+5nn4E3R
|
||||||
|
U0RYrx4c7XZUBK+JL5kutLVQvBd4kS80Qy0U3WSUv1vZgtqDpZs/oIXHzOKrmiNZ
|
||||||
|
8kHXehaZAgMBAAECggEAFWpt+LqjBQI9arI+ul/1lRd2IZlO5ThKACkT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7ByHrHTu/nxBKPbU1VD6bWqX16ZoPSLq
|
||||||
|
MVNxUnFLKV/o3ROIbgLXPRIOG0hMdQ/5H8TWyB9igQKBgQDLH8j/D2MJMykI9Blg
|
||||||
|
7fZfwWSLSsssUI2kyd9t2kgBNrGvzkQnDGeYLOOTiZji+R4DeXLqPWx2G9Shncn1
|
||||||
|
7jd5EBgwZIOwCmH3icUkiJILjeqHhINtpWkga6U4AlUZ2yzc6JNDjgW7MajDNHb+
|
||||||
|
YUE3ua78lQKCXPSTFdYymtWpuA==
|
||||||
|
-----END PRIVATE KEY-----
|
||||||
|
|
@ -4,6 +4,7 @@ set -e -u
|
||||||
|
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
eatmydata apt-get -y install apache2
|
eatmydata apt-get -y install apache2
|
||||||
|
eatmydata apt-get install ca-certificates
|
||||||
# deploy singularity v2, matching the ICF deployment
|
# deploy singularity v2, matching the ICF deployment
|
||||||
# only download when not already cached
|
# only download when not already cached
|
||||||
[ ! -f singularity-container_3.8.7_amd64.deb ] && wget https://github.com/apptainer/singularity/releases/download/v3.8.7/singularity-container_3.8.7_amd64.deb || true
|
[ ! -f singularity-container_3.8.7_amd64.deb ] && wget https://github.com/apptainer/singularity/releases/download/v3.8.7/singularity-container_3.8.7_amd64.deb || true
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,14 @@ From: debian:bookworm-slim
|
||||||
# into the final image, move
|
# into the final image, move
|
||||||
mv $(cut -d = -f 2 < /tmp/dlinstaller_env.sh | cut -d : -f 1) /git-annex
|
mv $(cut -d = -f 2 < /tmp/dlinstaller_env.sh | cut -d : -f 1) /git-annex
|
||||||
# the inm-icf-utilities
|
# the inm-icf-utilities
|
||||||
git clone https://github.com/psychoinformatics-de/inm-icf-utilities.git /inm-icf-utils
|
# TODO: replace the git clone command below with:
|
||||||
|
# TODO: "git clone https://github.com/psychoinformatics-de/inm-icf-utilities.git /inm-icf-utils"
|
||||||
|
# TODO: once the certificates are merged into main
|
||||||
|
git clone -b enh-ci-https https://github.com/christian-monch/inm-icf-utilities.git /inm-icf-utils
|
||||||
# and the inm-icf-utilities dependencies
|
# and the inm-icf-utilities dependencies
|
||||||
python3 -m pip install --break-system-packages -r /inm-icf-utils/requirements-devel.txt
|
python3 -m pip install --break-system-packages -r /inm-icf-utils/requirements-devel.txt
|
||||||
|
# add the test CA to certifi to allow 'requests' to work with the ssl-server
|
||||||
|
cat /inm-icf-utils/.appveyor/data/INM-ICF-TestCA.crt >> $(python3 -c "import certifi; print(certifi.where())")
|
||||||
# enable "next" extension for patching datalad core, done inside the image, not
|
# enable "next" extension for patching datalad core, done inside the image, not
|
||||||
# for a particular user
|
# for a particular user
|
||||||
git config --system datalad.extensions.load next
|
git config --system datalad.extensions.load next
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def test_studies_dir():
|
||||||
def data_webserver(test_studies_dir, dataaccess_credential):
|
def data_webserver(test_studies_dir, dataaccess_credential):
|
||||||
"""Yields a URL to a webserver providing data access"""
|
"""Yields a URL to a webserver providing data access"""
|
||||||
if os.environ.get('APPVEYOR', None) == 'true':
|
if os.environ.get('APPVEYOR', None) == 'true':
|
||||||
yield 'http://data.inm-icf.de/~appveyor'
|
yield 'https://data.inm-icf.de/~appveyor'
|
||||||
else:
|
else:
|
||||||
server = HTTPPath(
|
server = HTTPPath(
|
||||||
test_studies_dir,
|
test_studies_dir,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue