diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 48352852..a31599ad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,11 +12,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - os: [centos7, debian10, ubuntu1804, ubuntu2004] - pg: [pg11, pg12, pg13, pg14] + os: [debian10, ubuntu1804, ubuntu2004, ubuntu2204] + pg: [pg13, pg14] exclude: - - os: ubuntu2004 - pg: pg11 + - os: ubuntu2204 + pg: pg13 steps: - name: Checkout uses: actions/checkout@v1 diff --git a/linux/autogenerate.sh b/linux/autogenerate.sh index cade584b..14ec3e86 100755 --- a/linux/autogenerate.sh +++ b/linux/autogenerate.sh @@ -14,7 +14,7 @@ echo "${l}" #generate the walkthrough for all supported os function generate_all() { - values=(centos7 debian10 ubuntu1804 ubuntu2004) + values=(centos7 debian10 ubuntu1804 ubuntu2004 ubuntu2204) for os in "${values[@]}"; do echo "${os}" generate ${os} diff --git a/linux/install_ubuntu2204.sh b/linux/install_ubuntu2204.sh new file mode 100644 index 00000000..88cc3558 --- /dev/null +++ b/linux/install_ubuntu2204.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +set -e -u -x + +OMEROVER=${OMEROVER:-latest} +PGVER=${PGVER:-pg14} +ICEVER=${ICEVER:-ice36} + +. settings.env + +bash -eux step01_ubuntu_init.sh + +# disable daemon restart pop-up: +# see https://stackoverflow.com/questions/73397110/how-to-stop-ubuntu-pop-up-daemons-using-outdated-libraries-when-using-apt-to-i +if [ ! -f /.dockerenv ]; then + echo "\$nrconf{restart} = 'a';" >> /etc/needrestart/needrestart.conf +fi + +# install java +bash -eux step01_ubuntu1804_java_deps.sh + +bash -eux step01_ubuntu1804_deps.sh + +# install ice +bash -eux step01_ubuntu2204_ice_deps.sh + +cat omero-ice36.env >> /etc/profile + +# install Postgres +bash -eux step01_ubuntu2204_pg_deps.sh + +bash -eux step02_all_setup.sh + +bash -eux step03_all_postgres.sh + +cp settings.env step04_all_omero.sh setup_omero_db.sh ~omero-server + +bash -eux step01_ubuntu2204_ice_venv.sh +bash -eux step04_all_omero_install.sh + +su - omero-server -c "OMEROVER=$OMEROVER ICEVER=$ICEVER bash -eux step04_all_omero.sh" +su - omero-server -c "bash setup_omero_db.sh" + + +#If you don't want to use the init.d scripts you can start OMERO manually: +#su - omero-server -c ". /home/omero-server/settings.env omero admin start" + +bash -eux step06_ubuntu_daemon.sh + +bash -eux step07_all_perms.sh + +#service omero start diff --git a/linux/step01_ubuntu2204_ice_deps.sh b/linux/step01_ubuntu2204_ice_deps.sh new file mode 100644 index 00000000..239d34df --- /dev/null +++ b/linux/step01_ubuntu2204_ice_deps.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +ICEVER=${ICEVER:-ice36} + +echo $ICEVER +# Ice installation +if [ "$ICEVER" = "ice36" ]; then + #start-recommended + apt-get update && \ + apt-get install -y -q \ + db5.3-util \ + bzip2 \ + libdb++ \ + libexpat1 \ + libmcpp0 \ + openssl \ + mcpp \ + zlib1g + + cd /tmp + wget -q https://github.com/glencoesoftware/zeroc-ice-ubuntu2204-x86_64/releases/download/20221004/Ice-3.6.5-ubuntu2204-x86_64.tar.gz + tar xf Ice-3.6.5-ubuntu2204-x86_64.tar.gz + mv Ice-3.6.5 /opt/ice-3.6.5 + echo /opt/ice-3.6.5/lib64 > /etc/ld.so.conf.d/ice-x86_64.conf + ldconfig + #end-recommended +fi diff --git a/linux/step01_ubuntu2204_ice_venv.sh b/linux/step01_ubuntu2204_ice_venv.sh new file mode 100644 index 00000000..a2d9eb63 --- /dev/null +++ b/linux/step01_ubuntu2204_ice_venv.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e -u -x + +VENV_SERVER=${VENV_SERVER:-/opt/omero/server/venv3} +#start-ice-py +# Create a virtual env +python3 -mvenv $VENV_SERVER + +# Upgrade pip +$VENV_SERVER/bin/pip install --upgrade pip + +# Install the Ice Python binding +$VENV_SERVER/bin/pip install https://github.com/glencoesoftware/zeroc-ice-py-ubuntu2204-x86_64/releases/download/20221004/zeroc_ice-3.6.5-cp310-cp310-linux_x86_64.whl + +# Install server dependencies +$VENV_SERVER/bin/pip install omero-server +#end-ice-py diff --git a/linux/step01_ubuntu2204_pg_deps.sh b/linux/step01_ubuntu2204_pg_deps.sh new file mode 100644 index 00000000..eb251c12 --- /dev/null +++ b/linux/step01_ubuntu2204_pg_deps.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +#start-recommended +apt-get update +apt-get -y install postgresql +service postgresql start +#end-recommended diff --git a/linux/test/ubuntu2204/Dockerfile b/linux/test/ubuntu2204/Dockerfile new file mode 100644 index 00000000..f1bce6d8 --- /dev/null +++ b/linux/test/ubuntu2204/Dockerfile @@ -0,0 +1,28 @@ +# Dockerfile for testing the OMERO Linux installation instructions +# Not intended for production use +FROM ubuntu:22.04 +MAINTAINER ome-devel@lists.openmicroscopy.org.uk + +ARG OMEROVER=latest +ARG JAVAVER=openjdk11 +ARG ICEVER=ice36 +ARG PGVER=pg14 + +RUN touch /.dockerenv + +ENV TZ=Europe/London +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN echo 'APT::Install-Recommends 0;' > /etc/apt/apt.conf.d/01norecommends \ + && echo 'APT::Install-Suggests 0;' >> /etc/apt/apt.conf.d/01norecommends + +ADD omero-install-test.zip / +RUN apt-get update && apt-get -y install unzip && unzip omero-install-test.zip + +RUN cd omero-install-test && \ + bash install_ubuntu2204.sh && \ + bash docker_shutdown_ubuntu.sh +ADD run.sh /home/omero-server/run.sh + +EXPOSE 80 4063 4064 +CMD ["/bin/bash", "-e", "/home/omero-server/run.sh"] diff --git a/linux/test/ubuntu2204/run.sh b/linux/test/ubuntu2204/run.sh new file mode 100644 index 00000000..686f75b6 --- /dev/null +++ b/linux/test/ubuntu2204/run.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +service postgresql start + +#service crond start # Doesn't work in Docker +cron +service omero-server start +if [ -t 1 ] ; then + exec bash +else + exec tail -F /opt/omero/server/OMERO.server/var/log/* +fi