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

Rocky9 #212

Merged
merged 80 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
c5b081f
run web on rocky9
jburel Feb 8, 2024
2988014
install python redis from pypi
jburel Sep 14, 2023
ae61218
java11-devel now installed by default
jburel Sep 14, 2023
4462ab1
remove py3 env
jburel Sep 14, 2023
b5cf8dd
clean up
jburel Sep 14, 2023
bcc5490
switch to rocky9
jburel Feb 8, 2024
1eee6de
do not install mencoder
jburel Sep 14, 2023
5e11178
comment out line
jburel Sep 14, 2023
037b595
bump version
jburel Sep 14, 2023
c1d3df0
set location of settings.env
jburel Sep 18, 2023
00cea1d
update dockerfile to work with rocky9
jburel Feb 8, 2024
9cb7709
use own repo
jburel Sep 18, 2023
225b222
switch to rocky9
jburel Sep 18, 2023
567d0c7
use dnf
jburel Sep 18, 2023
43cac60
remove installation
jburel Sep 18, 2023
f16c97c
build as root
jburel Sep 18, 2023
69bba97
remove OMERO_INSTALL
jburel Sep 19, 2023
b0c3c8c
install ice Python binding
jburel Sep 19, 2023
9fd13b2
Remove root
jburel Sep 20, 2023
b645f4b
change label
jburel Sep 20, 2023
3cb176d
run as root
jburel Sep 20, 2023
ffbdfa5
pin nexus to 3.59.0
jburel Sep 21, 2023
47a58f4
install setuptools
jburel Sep 22, 2023
f1d322b
update version
jburel Sep 22, 2023
7627018
remove scl python from path
jburel Sep 22, 2023
e7db430
install make, required to build the docs
jburel Sep 22, 2023
fb1a85f
use python3
jburel Sep 22, 2023
ee14b0a
update job
jburel Sep 23, 2023
b41900e
remove cap
jburel Sep 23, 2023
d5c6e35
use python3
jburel Sep 23, 2023
adf93c1
remove omero-server and omero-web user. Adding complexity
jburel Sep 23, 2023
e01231f
use new tag
jburel Sep 25, 2023
832fc3b
remove ref to omero-install
jburel Sep 25, 2023
99ff871
adjust instructions about ssh key
jburel Sep 25, 2023
49748d6
adjust info about rename script
jburel Sep 25, 2023
9b48ddf
update web tagging
jburel Sep 25, 2023
fea0687
bump nginx to 1.24 for nginx_jenkins
jburel Sep 28, 2023
81b0151
bump base image version
jburel Sep 28, 2023
3a62f52
use official pre-built ice binaries
jburel Sep 28, 2023
a9df7d3
comment out server config
jburel Sep 29, 2023
9c60358
enable to install the latest stable version
jburel Sep 29, 2023
c1b20ce
bump nginx version to 1.24
jburel Sep 29, 2023
242c6d8
remove ref to omero-install
jburel Sep 29, 2023
2937c5c
use pg16
jburel Oct 1, 2023
f69ad4d
fix job name
jburel Oct 2, 2023
cca27ce
bump to nodejs 20
jburel Jan 25, 2024
d912839
change jenkins version
jburel Jan 30, 2024
e6bafed
add check
jburel Jan 31, 2024
0d5500f
bump version
jburel Jan 31, 2024
724ab34
change permission to start the node:
jburel Feb 1, 2024
7502965
use the branch name
jburel Feb 1, 2024
c21ce88
replace docker-compose by docker compose
jburel Feb 1, 2024
f7240a2
install build
jburel Feb 1, 2024
15f3df1
bump base image version
jburel Feb 1, 2024
83b29be
install blosc
jburel Feb 1, 2024
936c819
remove all tag search
jburel Feb 1, 2024
b162fee
fix blosc installation
jburel Feb 1, 2024
4813beb
add env to keep set the hub
jburel Feb 1, 2024
9c5372c
remove instructions not belonging to file
jburel Feb 1, 2024
a449d8c
remove installation of docker-compose. This is now a plugin
jburel Feb 2, 2024
0acc1ee
remove unused git container
jburel Feb 2, 2024
628d24e
install libraries for running python tests
jburel Feb 5, 2024
29a9342
use org image
jburel Feb 8, 2024
9c1d0f6
remove code from rebase
jburel Feb 8, 2024
5df5e74
update to docker compose
jburel Feb 8, 2024
7eecada
update general doc
jburel Feb 8, 2024
22cc432
remove git dockerfile no longer needed
jburel Feb 8, 2024
634c7e6
Clean to prevent errors
jburel Feb 8, 2024
e313498
set variable
jburel Feb 9, 2024
fbe5cdd
configure job to allow injection of PRs
jburel Feb 9, 2024
2c52088
adjust url
jburel Feb 9, 2024
929abdd
remove output that do not exist
jburel Feb 9, 2024
0c771cb
Clear workspace to avoid build error
jburel Feb 12, 2024
8182f7a
review configuration to allow injection of PRs
jburel Feb 13, 2024
68a4e3e
Add ulimits. Server startup was very slow without
jburel Feb 13, 2024
9873831
add instructions to run test-folder job
jburel Feb 13, 2024
a3a9829
bump devagent to 0.8.1
jburel Feb 13, 2024
7038757
install cli-duplicate from snoopy
jburel Feb 27, 2024
bfa1520
add email config
jburel Feb 27, 2024
59f9b7e
fix comment
jburel Mar 15, 2024
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
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ REPO_CURATED=/tmp/curated
REPO_CONFIG=/tmp/config

# Variables for controlling external dependencies versions
POSTGRES_VERSION=13
NGINX_VERSION=1.23
POSTGRES_VERSION=16
NGINX_VERSION=1.24

# Other variables
DOCKER_EXECUTORS=10
94 changes: 47 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,14 @@ Running Devspace requires access to SSH and Git configuration files used for fet

Devspace code depends on the following repositories:

* [OMERO install](https://github.com/ome/omero-install/)
* [devslave-c7-docker](https://github.com/ome/devslave-c7-docker)
* [devagent-docker](https://github.com/ome/devagent-docker)

# Installation

The following instructions explain how to deploy a devspace on a Docker host.

* Log into the Docker host using ssh

* Install the prerequisites [Docker engine](https://docs.docker.com/) and
[Docker compose](https://docs.docker.com/compose/) either globally or in
a virtual environment:

$ pip install docker-compose

* Create a directory ``/data/username`` and change ownership:

$ sudo mkdir /data/username
Expand All @@ -52,7 +45,8 @@ The following instructions explain how to deploy a devspace on a Docker host.

* Copy the SSH and Git configuration files used for fetching and pushing the
Git repositories under `slave/.ssh` and `slave/.gitconfig`. This is usually
your own SSH and Git configuration files.
your own SSH and Git configuration files. Make sure that the permissions of the key are not
too open. If this is the case, change the permissions e.g. ``chmod 400 YOUR_KEY`
You need to use a public key without a passphrase and a `.gitconfig` file containing
the following sections:
```
Expand All @@ -66,10 +60,10 @@ The following instructions explain how to deploy a devspace on a Docker host.

* Run `rename.py` to match your topic name. Specify the Git user corresponding to
the confguration files used above. If you do not yet have
topic branches available on origin, use `develop` or one of the
topic branches available on origin, use `develop/master` or one of the
main branches:

$ ./rename.py MYTOPIC --user git_user
$ ./rename.py USER MYTOPIC --user git_user

* This will also replace the `USER_ID` of the various Dockerfile with the ID of the user who
will run the devspace, assumed to be: `id -u`, i.e. the current user.
Expand All @@ -83,27 +77,34 @@ The following instructions explain how to deploy a devspace on a Docker host.

Start and configure:

* Build devspace using `docker-compose`:
* Build devspace using `docker compose`:

$ docker-compose -f docker-compose.yml build
$ docker compose -f docker-compose.yml build

* Start devspace using `docker-compose`:
* Start devspace using `docker compose`:

$ docker-compose -f docker-compose.yml up -d
$ docker compose -f docker-compose.yml up -d

By default, this will use the name of the directory as the project name. In the case of a shared Docker host, it is possible to override the project name using

$ docker-compose up -p my_project -d
$ docker compose up -p my_project -d

* Depending on the ssh key, you might have to run the following comment in the ``test-integration`` container. For example:
$ docker exec -it devspace-testintegration-1 bash
$ ssh -T [email protected]

A message should be returned after running the command:
$ Hi snoopycrimecop! You've successfully authenticated, but GitHub does not provide shell access.

* Retrieve the dynamic port of the Jenkins NGINX container. You can access
the Jenkins UI from https://HOST_IP:PORT after accepting the self-signed
certificate:

$ docker-compose -p my_project port nginxjenkins 443
$ docker compose -p my_project port nginxjenkins 443

* Create the `maven-internal` Nexus repository:

$ docker-compose exec nexus /nexus-data/createRepoMavenInternal.sh
$ docker compose exec nexus /nexus-data/createRepoMavenInternal.sh

* [Optional] Turn on Basic HTTP authentication for Jenkins

Expand Down Expand Up @@ -134,7 +135,7 @@ After the script has completed you can either leave it in place so it will overr

# Job configurations

* When running the OMERO-build job for the first time, select the ``PURGE_DATA`` option to create the database.
* When running the OMERO-server job for the first time, select the ``PURGE_DATA`` option to create the database.

# Job workflow

Expand All @@ -147,24 +148,24 @@ they are associated with and a short description of the jobs.
| Job name | Name | Description | docker name |
| -----------------------|-----------------| ------------------------------------------|----------------------------|
| Trigger | | Runs all the following jobs in order | |
| BIOFORMATS-push | testintegration | Merges all Bio-Formats PRs | devspace_testintegration_1 |
| BIOFORMATS-build | testintegration | Builds Bio-Formats components | devspace_testintegration_1 |
| BIOFORMATS-image | testintegration | Builds a Docker image of Bio-Formats | devspace_docker_1 |
| OMERO-push | testintegration | Merges all OMERO PRs | devspace_testintegration_1 |
| OMERO-build | testintegration | Builds OMERO artifacts (server, clients) | devspace_testintegration_1 |
| OMERO-server | omero | Deploys an OMERO.server | devspace_omero_1 |
| OMERO-web | web | Deploys an OMERO.web client | devspace_web_1 |
| OMERO-test-integration | testintegration | Runs the OMERO integration tests | devspace_testintegration_1 |
| OMERO-robot | testintegration | Runs the Robot tests | devspace_testintegration_1 |
| nginx | nginx | Reloads the nginx server | devspace_nginx_1 |
| OMERO-docs | testintegration | Builds the OMERO documentation | devspace_testintegration_1 |
| BIOFORMATS-push | testintegration | Merges all Bio-Formats PRs | devspace-testintegration-1 |
| BIOFORMATS-build | testintegration | Builds Bio-Formats components | devspace-testintegration-1 |
| BIOFORMATS-image | testintegration | Builds a Docker image of Bio-Formats | devspace-docker-1 |
| OMERO-push | testintegration | Merges all OMERO PRs | devspace-testintegration-1 |
| OMERO-build | testintegration | Builds OMERO artifacts (server, clients) | devspace-testintegration-1 |
| OMERO-server | omero | Deploys an OMERO.server | devspace-omero-1 |
| OMERO-web | web | Deploys an OMERO.web client | devspace-web-1 |
| OMERO-test-integration | testintegration | Runs the OMERO integration tests | devspace-testintegration-1 |
| OMERO-robot | testintegration | Runs the Robot tests | devspace-testintegration-1 |
| nginx | nginx | Reloads the nginx server | devspace-nginx-1 |
| OMERO-docs | testintegration | Builds the OMERO documentation | devspace-testintegration-1 |


This means that by default the following repositories need to be
forked to your GitHub account:

* [ome/openmiscrocopy](https://github.com/ome/openmicroscopy)
* [ome/ome-documentation](https://github.com/ome/ome-documentation)
* [ome/omero-documentation](https://github.com/ome/omero-documentation)
* [ome/bioformats](https://github.com/ome/bioformats)

If you do not have some of the repositories forked, you will need to remove the jobs from the list
Expand All @@ -185,29 +186,28 @@ Alternatively create a new job in the Jenkins web-interface in the usual way.

# Default packages used

| Name | Version | Optional |
| -----------|---------------| -----------------------------------|
| Java | openJDK 1.8 | openJDK 1.8 devel, oracleJDK 1.8 |
| Python | 2.7 | - |
| Ice | 3.6 | 3.5 |
| PostgreSQL | 9.4 | https://hub.docker.com/_/postgres/ |
| Nginx | 1.8 | - |
| Redis | latest | https://hub.docker.com/_/redis/ |
| Name | Version |
| -----------|-------------------|
| Java | openJDK 11-devel |
| Python | 3.9 |
| Ice | 3.6 |
| PostgreSQL | 16 |
| Nginx | 1.24 |

# Troubleshooting

See [Troubleshooting](Troubleshooting.md)

# ADVANCE: extend omero-install

In order to install additional components or new version of packages e.g. PostgreSQL 10, it is required to:
# Upgrade

* Modify the files in [omero-install](https://github.com/ome/omero-install)
* Create a new image of [devslave-c7-docker](https://github.com/ome/devslave-c7-docker) using the updated omero-install files
* Push the new image to [Docker Hub](https://hub.docker.com/). You will need to your own account
* Modify each Dockerfile of this repository to use the new image
See [Changelog](CHANGELOG.md)

# Run BioFormats jobs

# Upgrade
To run the BioFormats testing the various readers on sample data, you will need to activate the a private
job

See [Changelog](CHANGELOG.md)
* In the ``devspace``, create a directory ``home/jobs/DATA_REPO_CONFIG-merge/``
* Download the job configuration from ``config.xml`` in https://github.com/openmicroscopy/management_tools/tree/master/ci/jobs/DATA_REPO_CONFIG-merge (private repository) and place it in the newly created directory
* Comment out the line ``build job: "DATA_REPO_CONFIG-merge"`` in the ``trigger`` job
38 changes: 23 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ services:
environment:
- JENKINS_OPTS= --prefix=${JENKINS_PREFIX} --argumentsRealm.passwd.${JENKINS_USERNAME}=${JENKINS_PASSWORD} --argumentsRealm.roles.${JENKINS_USERNAME}=admin

git:
build: git
volumes:
- /src
command: 'true'

pg:
image: postgres:${POSTGRES_VERSION}
networks:
Expand All @@ -41,7 +35,7 @@ services:
environment:
- SLAVE_NAME=testintegration
- SLAVE_EXECUTORS=2
- SLAVE_PARAMS=-labels centos7 -labels ice36 -labels java11 -disableClientsUniqueId
- SLAVE_PARAMS=-labels rocky9 -labels ice36 -labels java11 -disableClientsUniqueId
- JENKINS_MASTER=${JENKINS_BASE}${JENKINS_PREFIX}
- WEB_PREFIX
- REPO_CONFIG
Expand All @@ -50,6 +44,10 @@ services:
ports:
- "${OMERO_SERVER_TEST_SSL}14064"
- "${OMERO_SERVER_TEST_TCP}14063"
ulimits:
nofile:
soft: 8192
hard: 65536

omero:
build:
Expand All @@ -58,16 +56,20 @@ services:
networks:
- omero-network
volumes:
- ./server:/home/omero-server
- ./server:/home/omero
environment:
- SLAVE_NAME=omero
- SLAVE_EXECUTORS=2
- SLAVE_PARAMS=-labels centos7 -labels ice36 -labels java11 -disableClientsUniqueId
- SLAVE_PARAMS=-labels rocky9 -labels ice36 -labels java11 -disableClientsUniqueId
- JENKINS_MASTER=${JENKINS_BASE}${JENKINS_PREFIX}
- WEBHOST=http://nginx${WEB_PREFIX}
ports:
- "${OMERO_SERVER_SSL}4064"
- "${OMERO_SERVER_TCP}4063"
ulimits:
nofile:
soft: 8192
hard: 65536

web:
build:
Expand All @@ -76,12 +78,12 @@ services:
networks:
- omero-network
volumes:
- ./web:/home/omero-web
- ./nginx/conf.d:/home/omero-web/nginx
- ./web:/home/omero
- ./nginx/conf.d:/home/omero/nginx
environment:
- SLAVE_NAME=web
- SLAVE_EXECUTORS=2
- SLAVE_PARAMS= -labels centos7 -labels ice36 -labels java11 -disableClientsUniqueId
- SLAVE_PARAMS= -labels rocky9 -labels ice36 -labels java11 -disableClientsUniqueId
- JENKINS_MASTER=${JENKINS_BASE}${JENKINS_PREFIX}
- WEB_PREFIX

Expand All @@ -93,12 +95,12 @@ services:
- omero-network
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./web/static:/home/omero-web/static
- ./web/static:/home/omero/static
- ./nginx/log:/var/log/nginx
- ./nginx/sslcert:/etc/nginx/ssl
environment:
- SLAVE_NAME=nginx
- SLAVE_PARAMS=-labels centos7 -labels java11 -disableClientsUniqueId
- SLAVE_PARAMS=-labels rocky9 -labels java11 -disableClientsUniqueId
- JENKINS_MASTER=${JENKINS_BASE}${JENKINS_PREFIX}
ports:
- "${NGINX_PORT}80"
Expand Down Expand Up @@ -139,6 +141,9 @@ services:
- SCREEN_WIDTH=1920
- SCREEN_HEIGHT=1080
- SCREEN_DEPTH=24
- SE_EVENT_BUS_HOST=seleniumhub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
depends_on:
- seleniumhub

Expand All @@ -152,6 +157,9 @@ services:
- SCREEN_WIDTH=1920
- SCREEN_HEIGHT=1080
- SCREEN_DEPTH=24
- SE_EVENT_BUS_HOST=seleniumhub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
depends_on:
- seleniumhub

Expand All @@ -171,7 +179,7 @@ services:
- REPO_CONFIG

nexus:
image: sonatype/nexus3
image: sonatype/nexus3:3.59.0
user: ${USER_ID}
networks:
- omero-network
Expand Down
18 changes: 7 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
FROM openmicroscopy/devslave-c7:0.7.2
FROM openmicroscopy/devagent:0.8.1

MAINTAINER OME

# manually install java11
RUN yum -y install java-11-openjdk-devel
# Switch Java version
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
ENV PATH=$JAVA_HOME/bin:$PATH
USER root

RUN yum -y install -y yum-utils \

RUN dnf -y install -y yum-utils \
device-mapper-persistent-data \
lvm2

RUN yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo

RUN yum -y install docker-ce
RUN dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

RUN dnf -y install docker-ce

# Change user id to fix permissions issues
ARG USER_ID=1000
Expand Down
13 changes: 0 additions & 13 deletions git/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion home/jenkins.model.JenkinsLocationConfiguration.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.1' encoding='UTF-8'?>
<jenkins.model.JenkinsLocationConfiguration>
<adminAddress>address not configured yet &lt;nobody@nowhere&gt;</adminAddress>
<jenkinsUrl>https://SPACENAME-ci.openmicroscopy.org/jenkins/</jenkinsUrl>
<jenkinsUrl>https://BRANCHCI.openmicroscopy.org/jenkins/</jenkinsUrl>
</jenkins.model.JenkinsLocationConfiguration>
7 changes: 6 additions & 1 deletion home/jobs/BIOFORMATS-build/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@
<parentCredentials>false</parentCredentials>
<shallow>false</shallow>
</hudson.plugins.git.extensions.impl.SubmoduleOption>
<hudson.plugins.git.extensions.impl.CleanCheckout/>
<hudson.plugins.git.extensions.impl.CleanCheckout>
<deleteUntrackedNestedRepositories>false</deleteUntrackedNestedRepositories>
</hudson.plugins.git.extensions.impl.CleanCheckout>
<hudson.plugins.git.extensions.impl.CleanBeforeCheckout>
<deleteUntrackedNestedRepositories>true</deleteUntrackedNestedRepositories>
</hudson.plugins.git.extensions.impl.CleanBeforeCheckout>
</extensions>
</scm>
<assignedNode>testintegration</assignedNode>
Expand Down
4 changes: 3 additions & 1 deletion home/jobs/BIOFORMATS-push/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
<parentCredentials>false</parentCredentials>
<shallow>false</shallow>
</hudson.plugins.git.extensions.impl.SubmoduleOption>
<hudson.plugins.git.extensions.impl.CleanCheckout/>
<hudson.plugins.git.extensions.impl.CleanBeforeCheckout>
<deleteUntrackedNestedRepositories>true</deleteUntrackedNestedRepositories>
</hudson.plugins.git.extensions.impl.CleanBeforeCheckout>
</extensions>
</scm>
<assignedNode>testintegration</assignedNode>
Expand Down
4 changes: 2 additions & 2 deletions home/jobs/OMERO-build/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ OMERO_VEN=$WORKSPACE/omero-virtualenv
source $HOME/settings.env
python3 -m venv $OMERO_VEN

$OMERO_VEN/bin/pip install https://github.com/ome/zeroc-ice-py-centos7/releases/download/0.3.0/zeroc_ice-3.6.5-cp38-cp38-linux_x86_64.whl
$OMERO_VEN/bin/pip install https://github.com/glencoesoftware/zeroc-ice-py-rhel9-x86_64/releases/download/20230830/zeroc_ice-3.6.5-cp39-cp39-linux_x86_64.whl
$OMERO_VEN/bin/pip install -U setuptools omero-py
source docs/hudson/OMERO.sh
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>src/target/*.zip,src/target/*.egg,src/target/*.log,src/target/*INFO,target/version.tsv</artifacts>
<artifacts>src/target/*.zip,src/target/*.log,src/target/*INFO</artifacts>
<allowEmptyArchive>false</allowEmptyArchive>
<onlyIfSuccessful>false</onlyIfSuccessful>
<fingerprint>false</fingerprint>
Expand Down
Loading