Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu2404 support #291

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
os: [rockylinux9, ubuntu2204]
os: [rockylinux9, ubuntu2204, ubuntu2404]
pg: [pg13, pg14, pg15, pg16]
exclude:
- os: ubuntu2204
pg: pg13
- os: ubuntu2404
pg: pg13
- os: ubuntu2404
pg: pg14
- os: ubuntu2404
pg: pg15
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
19 changes: 5 additions & 14 deletions linux/autogenerate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ echo "${l}"

#generate the walkthrough for all supported os
function generate_all() {
values=(ubuntu2004 ubuntu2204 rocky9)
values=(ubuntu2004 ubuntu2204 ubuntu2404 rocky9)
for os in "${values[@]}"; do
echo "${os}"
generate ${os}
Expand Down Expand Up @@ -47,12 +47,6 @@ if ! [[ $OS =~ "rocky" ]] ; then
fi

# install java
N=$OS
if [[ $OS =~ "ubuntu1804" ]] ; then
N="ubuntu1804"
elif [[ $OS =~ "ubuntu" ]] ; then
N="ubuntu"
fi
echo -en '\n' >> $file
echo "# install Java" >> $file
if [[ $OS =~ "rocky" ]] ; then
Expand All @@ -62,11 +56,11 @@ if [[ $OS =~ "rocky" ]] ; then
ne=$((number-1))
line=$(sed -n ''$ns','$ne'p' $dir/step01_rocky9_deps.sh)
else
number=$(sed -n '/#start-recommended/=' $dir/step01_"$N"_java_deps.sh)
number=$(sed -n '/#start-recommended/=' $dir/step01_ubuntu_java_deps.sh)
ns=$((number+1))
number=$(sed -n '/#end-recommended/=' $dir/step01_"$N"_java_deps.sh)
number=$(sed -n '/#end-recommended/=' $dir/step01_ubuntu_java_deps.sh)
ne=$((number-1))
line=$(sed -n ''$ns','$ne'p' $dir/step01_"$N"_java_deps.sh)
line=$(sed -n ''$ns','$ne'p' $dir/step01_ubuntu_java_deps.sh)
fi

# remove leading whitespace
Expand All @@ -77,9 +71,6 @@ echo -en '\n' >> $file
echo "# install dependencies" >> $file
# install dependencies
N=$OS
if [[ $OS =~ "ubuntu" ]] ; then
N="ubuntu1804"
fi

if [[ $OS =~ "rocky" ]] ; then
number=$(sed -n '/#start-general/=' $dir/step01_rocky9_deps.sh)
Expand All @@ -88,7 +79,7 @@ if [[ $OS =~ "rocky" ]] ; then
ne=$((number-1))
line=$(sed -n ''$ns','$ne'p' $dir/step01_rocky9_deps.sh)
else
line=$(sed -n '2,$p' $dir/step01_"$N"_deps.sh)
line=$(sed -n '2,$p' $dir/step01_ubuntu_deps.sh)
fi

echo "$line" >> $file
Expand Down
52 changes: 52 additions & 0 deletions linux/install_ubuntu2404.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash

set -e -u -x

OMEROVER=${OMEROVER:-latest}
PGVER=${PGVER:-pg15}
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_ubuntu_java_deps.sh

bash -eux step01_ubuntu_deps.sh

# install ice
bash -eux step01_ubuntu2404_ice_deps.sh

cat omero-ice36.env >> /etc/profile

# install Postgres
bash -eux step01_ubuntu2404_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_ubuntu2404_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
27 changes: 27 additions & 0 deletions linux/step01_ubuntu2404_ice_deps.sh
Original file line number Diff line number Diff line change
@@ -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-ubuntu2404-x86_64/releases/download/20240619/Ice-3.6.5-ubuntu2404-x86_64.tar.gz
tar xf Ice-3.6.5-ubuntu2404-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
18 changes: 18 additions & 0 deletions linux/step01_ubuntu2404_ice_venv.sh
Original file line number Diff line number Diff line change
@@ -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-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp312-cp312-manylinux_2_28_x86_64.whl

# Install server dependencies
$VENV_SERVER/bin/pip install omero-server
#end-ice-py
8 changes: 8 additions & 0 deletions linux/step01_ubuntu2404_pg_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

PGVER=${PGVER:-pg16}
#start-recommended
apt-get update
apt-get -y install postgresql
service postgresql start
#end-recommended
28 changes: 28 additions & 0 deletions linux/test/ubuntu2404/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Dockerfile for testing the OMERO Linux installation instructions
# Not intended for production use
FROM ubuntu:24.04
MAINTAINER [email protected]

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_ubuntu2404.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"]
12 changes: 12 additions & 0 deletions linux/test/ubuntu2404/run.sh
Original file line number Diff line number Diff line change
@@ -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