From 62aea28dc8006058415cfaaf76ff6a4e53b1883c Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 3 Jul 2024 15:30:11 +0100 Subject: [PATCH] remove reference to centos7 --- linux/README.md | 11 +++--- linux/autogenerate.sh | 68 +++++------------------------------ linux/install_centos7.sh | 55 ---------------------------- linux/test/README.md | 6 ++-- linux/test/centos7/Dockerfile | 32 ----------------- linux/test/test_services.sh | 2 +- 6 files changed, 18 insertions(+), 156 deletions(-) delete mode 100644 linux/install_centos7.sh delete mode 100644 linux/test/centos7/Dockerfile diff --git a/linux/README.md b/linux/README.md index d818a23a..dcd21e15 100644 --- a/linux/README.md +++ b/linux/README.md @@ -2,16 +2,15 @@ Example OMERO Linux install scripts =================================== This directory contains examples of installing OMERO on clean -Ubuntu 18.04, Ubuntu 20.04, Debian 10 -CentOS 7 64-bit systems, see +Ubuntu 22.04, Ubuntu 20.04, Debian 10, Rocky Linux 9 64-bit systems, see https://docs.openmicroscopy.org/latest/omero/sysadmins/unix/server-installation.html Copy the files from this directory, then run one of the install scripts, - bash install_centos7.sh - bash install_ubuntu1804.sh + bash install_ubuntu2204.sh bash install_debian10.sh bash install_ubuntu2004.sh + bash install_rocky9.sh corresponding to the required OS and web platform. @@ -23,10 +22,10 @@ Documentation generation To generate a walkthrough file corresponding to a given OS, run the `autogenerate.sh` script, the OS is specified as a parameter e.g. - OS=ubuntu1804 bash autogenerate.sh + OS=ubuntu2204 bash autogenerate.sh The walkthrough file is used for the omero documention e.g. -https://docs.openmicroscopy.org/latest/omero/sysadmins/unix/server-centos7-ice36.html +https://omero.readthedocs.io/en/stable/sysadmins/unix/server-rockylinux9-ice36.html but it should not be executed. To generate all the walkthroughs, run the following command diff --git a/linux/autogenerate.sh b/linux/autogenerate.sh index d9bb501d..21f39b1d 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 ubuntu2004 ubuntu2204 rocky9) + values=(debian10 ubuntu2004 ubuntu2204 rocky9) for os in "${values[@]}"; do echo "${os}" generate ${os} @@ -38,8 +38,6 @@ if [[ $OS =~ "debian" ]] || [[ $OS =~ "ubuntu" ]] ; then N="ubuntu" elif [[ $OS =~ "rocky" ]] ; then N="rocky" -elif [[ $OS =~ "centos" ]] ; then - N="centos7" fi echo -en '\n' >> $file if ! [[ $OS =~ "rocky" ]] ; then @@ -50,9 +48,7 @@ fi # install java N=$OS -if [[ $OS =~ "centos" ]] ; then - N="centos" -elif [[ $OS =~ "ubuntu1804" ]] ; then +if [[ $OS =~ "ubuntu1804" ]] ; then N="ubuntu1804" elif [[ $OS =~ "ubuntu" ]] ; then N="ubuntu" @@ -128,24 +124,7 @@ echo -en '\n' >> $file N=$OS echo -en '\n' >> $file echo "# install Postgres" >> $file -if [[ $N =~ "centos" ]] ; then - number=$(sed -n '/#start-postgresql-installation-general/=' $dir/step01_"$OS"_pg_deps.sh) - nrs=$((number+1)) - number=$(sed -n '/#end-postgresql-installation-general/=' $dir/step01_"$OS"_pg_deps.sh) - nre=$((number-1)) - line=$(sed -n ''$nrs','$nre'p' $dir/step01_"$OS"_pg_deps.sh) - line="$(echo -e "${line}" | sed -e 's/^[[:space:]]*//')" - - echo "$line" >> $file - - number=$(sed -n '/#start-recommended/=' $dir/step01_"$OS"_pg_deps.sh) - nrs=$((number+1)) - number=$(sed -n '/#end-recommended/=' $dir/step01_"$OS"_pg_deps.sh) - nre=$((number-1)) - line=$(sed -n ''$nrs','$nre'p' $dir/step01_"$OS"_pg_deps.sh) - # remove docker conditional - line=`remove_docker_workaround "${line}"` -elif [[ $OS =~ "rocky" ]] ; then +if [[ $OS =~ "rocky" ]] ; then number=$(sed -n '/#start-pg-enabling/=' $dir/step01_rocky9_deps.sh) nrs=$((number+1)) number=$(sed -n '/#end-pg-enabling/=' $dir/step01_rocky9_deps.sh) @@ -279,40 +258,18 @@ line=$(sed -n ''$ns','$ne'p' $dir/step04_all_omero.sh) line=$(echo -e "${line}" | sed -e "s/\-i.bak/-i/g") line="$(echo -e "${line}" | sed -e 's/^[[:space:]]*//')" echo "$line" >> $file -if [[ $OS =~ "centos7" ]] ; then - echo -en '\n' >> $file - number=$(sed -n '/#start-diffie-hellman/=' $dir/step04_centos7_ciphers.sh) - ns=$((number)) - number=$(sed -n '/#end-diffie-hellman/=' $dir/step04_centos7_ciphers.sh) - ne=$((number)) - line=$(sed -n ''$ns','$ne'p' $dir/step04_centos7_ciphers.sh) - line="$(echo -e "${line}" | sed -e 's/^[[:space:]]*//')" - echo "$line" >> $file -fi - echo -en '\n' >> $file echo -en '\n' >> $file echo "#start-step06: As root, run the scripts to start OMERO automatically" >> $file -if [ $OS = "centos7" ] ; then - number=$(sed -n '/#start-recommended/=' $dir/step06_"$OS"_daemon.sh) - nrs=$((number+1)) - number=$(sed -n '/#end-recommended/=' $dir/step06_"$OS"_daemon.sh) - nre=$((number-1)) - line=$(sed -n ''$nrs','$nre'p' $dir/step06_"$OS"_daemon.sh) - # remove docker conditional - line=`remove_docker_workaround "${line}"` - echo "$line" >> $file -else - number=$(sed -n '/#start-recommended/=' $dir/step06_ubuntu_daemon.sh) - nrs=$((number+1)) - number=$(sed -n '/#end-recommended/=' $dir/step06_ubuntu_daemon.sh) - nre=$((number-1)) - line=$(sed -n ''$nrs','$nre'p' $dir/step06_ubuntu_daemon.sh) - echo "$line" >> $file -fi +number=$(sed -n '/#start-recommended/=' $dir/step06_ubuntu_daemon.sh) +nrs=$((number+1)) +number=$(sed -n '/#end-recommended/=' $dir/step06_ubuntu_daemon.sh) +nre=$((number-1)) +line=$(sed -n ''$nrs','$nre'p' $dir/step06_ubuntu_daemon.sh) +echo "$line" >> $file echo "#end-step06" >> $file echo -en '\n' >> $file @@ -323,13 +280,6 @@ line=$(sed -n ''$start',$p' $dir/step07_all_perms.sh) echo "$line" >> $file echo "#end-step07" >> $file -if [[ $OS =~ "centos" ]]; then - echo "#start-selinux" >> $file - line=$(sed -n '2,$p' $dir/setup_centos_selinux.sh) - echo "$line" >> $file - echo "#end-selinux" >> $file -fi - if [[ $OS =~ "rocky" ]]; then echo "#start-step08: As root, configure" >> $file number=$(sed -n '/#start-recommended/=' $dir/step08_rocky9_config.sh) diff --git a/linux/install_centos7.sh b/linux/install_centos7.sh deleted file mode 100644 index bed8e633..00000000 --- a/linux/install_centos7.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -set -e -u -x - -OMEROVER=${OMEROVER:-latest} -PGVER=${PGVER:-pg11} -ICEVER=${ICEVER:-ice36} - -. `dirname $0`/settings.env - -bash -eux step01_centos7_init.sh - -# install java -bash -eux step01_centos_java_deps.sh - -bash -eux step01_centos7_deps.sh - -# install ice -bash -eux step01_centos7_ice_deps.sh - -# install Postgres -bash -eux step01_centos7_pg_deps.sh - -bash -eux step02_all_setup.sh - -if [[ "$PGVER" =~ ^(pg11|pg12|pg13|pg14)$ ]]; then - bash -eux step03_all_postgres.sh -fi - -bash -eux step01_centos7_ice_venv.sh - - -# Those steps are valid if an omero-server user exists -# This might not be the case when used in the context of devspace -if [ "$(getent passwd omero-server)" ]; then - cp settings.env step04_all_omero.sh setup_omero_db.sh step04_centos7_ciphers.sh ~omero-server - - OMEROVER=$OMEROVER ICEVER=$ICEVER bash -eux step04_all_omero_install.sh - - su - omero-server -c " bash -eux step04_all_omero.sh" - - su - omero-server -c " bash -eux step04_centos7_ciphers.sh" - - su - omero-server -c "bash setup_omero_db.sh" -fi - - -#If you don't want to use the systemd scripts you can start OMERO manually: -#su - omero-server -c ". /home/omero-server/settings.env omero admin start" - -bash -eux setup_centos_selinux.sh - -PGVER=$PGVER bash -eux step06_centos7_daemon.sh - -#systemctl start omero.service diff --git a/linux/test/README.md b/linux/test/README.md index 4bfa0481..6f7a2f09 100644 --- a/linux/test/README.md +++ b/linux/test/README.md @@ -51,7 +51,7 @@ To generate a specific walkthrough, run the following command OS=debian10 ALL=false bash autogenerate.sh The possible values are: -centos7, ubuntu2004, ubuntu2204, debian10, rocky9 (default) +ubuntu2004, ubuntu2204, debian10, rocky9 (default) Configuring Java ---------------- @@ -95,8 +95,8 @@ pg13, pg14, pg15 If you do not want to install Postgres set PGVER to nopg. -To add a new Postgres version, update the following files: -`step01_centos7_pg_deps.sh`, +To add a new Postgres version, update the following files: +`step01_rocky9_deps.sh`, `step01_ubuntu2004_pg_deps.sh`, `step01_ubuntu2204_pg_deps.sh`, `step01_debian10_pg_deps.sh` and update this README.md. diff --git a/linux/test/centos7/Dockerfile b/linux/test/centos7/Dockerfile deleted file mode 100644 index ac2d45e8..00000000 --- a/linux/test/centos7/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -# Dockerfile for testing the OMERO Linux installation instructions -# Not intended for production use -# Note to enable systemd this must be run with on a host with systemd -# and additional flaks, see the omero-ssh-c7 README -FROM openmicroscopy/omero-ssh-c7:0.1.0-1 -MAINTAINER ome-devel@lists.openmicroscopy.org.uk - -ENV LANG en_US.UTF-8 - -# Remove the existing omero user -RUN userdel -r omero && \ - rm -f /etc/sudoers.d/omero && \ - echo 'root:omero' | chpasswd - -ADD omero-install-test.zip / -RUN yum update -y -RUN yum -y install ca-certificates -RUN yum -y install initscripts unzip && unzip omero-install-test.zip - - -# This is so that scripts can detect whether they're in docker -RUN echo 'export container=docker' > /etc/profile.d/docker.sh - -ARG OMEROVER=latest -ARG JAVAVER=openjdk11 -ARG ICEVER=ice36 -ARG PGVER=pg11 - -RUN cd omero-install-test && \ - bash install_centos7.sh - -EXPOSE 22 80 4063 4064 diff --git a/linux/test/test_services.sh b/linux/test/test_services.sh index e37e5ee7..7a160fee 100755 --- a/linux/test/test_services.sh +++ b/linux/test/test_services.sh @@ -2,7 +2,7 @@ set -e -u -x -ENV=${ENV:-centos7} +ENV=${ENV:-rockylinux9} DMNAME=${DMNAME:-dev} . `pwd`/../settings.env