Skip to content

Commit

Permalink
Merge pull request #271 from dominikl/ubuntu2204
Browse files Browse the repository at this point in the history
Ubuntu2204
  • Loading branch information
jburel authored Aug 29, 2023
2 parents 935779a + b541af6 commit 3b69ce1
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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=(centos7 debian10 ubuntu1804 ubuntu2004)
values=(centos7 debian10 ubuntu1804 ubuntu2004 ubuntu2204)
for os in "${values[@]}"; do
echo "${os}"
generate ${os}
Expand Down
52 changes: 52 additions & 0 deletions linux/install_ubuntu2204.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:-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
27 changes: 27 additions & 0 deletions linux/step01_ubuntu2204_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-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
18 changes: 18 additions & 0 deletions linux/step01_ubuntu2204_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-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
7 changes: 7 additions & 0 deletions linux/step01_ubuntu2204_pg_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#start-recommended
apt-get update
apt-get -y install postgresql
service postgresql start
#end-recommended
28 changes: 28 additions & 0 deletions linux/test/ubuntu2204/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:22.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_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"]
12 changes: 12 additions & 0 deletions linux/test/ubuntu2204/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

0 comments on commit 3b69ce1

Please sign in to comment.