ome / ansible-example-omero-onenode Goto Github PK
View Code? Open in Web Editor NEWExample of deploying an OMERO.server on a single-node
Home Page: https://github.com/ome/omero-deployment-examples
License: BSD 2-Clause "Simplified" License
Example of deploying an OMERO.server on a single-node
Home Page: https://github.com/ome/omero-deployment-examples
License: BSD 2-Clause "Simplified" License
Following the workflow
Dockerfile:
FROM centos/systemd
RUN yum makecache fast && yum install -y /usr/bin/python /usr/bin/python2-config sudo yum-plugin-ovl bash iproute ca-certificates && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all;
CMD ["/sbin/init"]
then
docker build -f Dockerfile.j2 --rm --no-cache -t omero .
docker run --privileged --name omero -v /Users/pwalczysko/omero/:/OMERO -p 22 -p 4063:4063 -p 4064:4064 -p 4080:4080 -p 8080:80 -d omero
docker exec -it omero bash
The, from inside the container
[root@2dade2873d73 /]# LC_CTYPE=en_US.UTF-8
[root@2dade2873d73 /]# export LC_CTYPE
[root@2dade2873d73 /]# yum install --assumeyes python3-pip
[root@2dade2873d73 /]# ansible-playbook --become --connection=local -i hosts.yml playbook.yml
[root@2dade2873d73 /]# pip3 install --upgrade pip
[root@2dade2873d73 /]# pip install ansible
[root@2dade2873d73 dbs]# ansible-galaxy install -r requirements.yml
[root@2dade2873d73 dbs]# ansible-playbook --become --connection=local -i hosts.yml playbook.yml
....
....
TASK [ome.postgresql : postgres | initialise PostgreSQL cluster (skip if data directory already exists)] ***
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["/usr/pgsql-13/bin/postgresql-13-setup", "initdb"], "delta": "0:00:00.515375", "end": "2022-12-12 16:45:53.541899", "msg": "non-zero return code", "rc": 1, "start": "2022-12-12 16:45:53.026524", "stderr": "Failed to get D-Bus connection: No such file or directory", "stderr_lines": ["Failed to get D-Bus connection: No such file or directory"], "stdout": "failed to find PGDATA setting in postgresql-13.service", "stdout_lines": ["failed to find PGDATA setting in postgresql-13.service"]}
PLAY RECAP *********************************************************************
localhost :
I am trying to set up something similar as in the molecule tests of this repo.
The failure is probably connected with systemd, such as https://stackoverflow.com/questions/28495341/start-a-service-in-docker-container-failed-with-error-failed-to-get-d-bus-conne or https://stackoverflow.com/questions/50393525/failed-to-get-d-bus-connection-operation-not-permitted.
This used to work couple of months ago, but something changed in between.
Any ideas @sbesson please ? Do the tests in https://github.com/ome/ansible-example-omero-onenode/blob/master/molecule/resources/Dockerfile.j2 work (not sure how to trigger them) ?
Thanks
When using local CLI connecting to an OMERO.server installed inside a docker using the playbook from this repo, the connection of the CLI is successful, but an import attempt ends in SSL handshake error.
The docker provisioning and OMERO.install see #13
The error on import is
(cli) pwalczysko@ls31618~$ omero import -T Dataset:name:test1 ~/Desktop/Iviewer0c.png
Using OMERO.java-5.6.3-ice36-b228
Using session for root@localhost:4064. Idle timeout: 10 min. Current group: system
2022-08-26 10:45:33,154 322 [ main] INFO ome.formats.importer.ImportConfig - OMERO.blitz Version: 5.5.8
2022-08-26 10:45:33,181 349 [ main] INFO ome.formats.importer.ImportConfig - Bioformats version: 6.5.1 revision: 6f50e4d52c9d96112635fd8b2dde737f31041cf0 date: 7 July 2020
2022-08-26 10:45:33,262 430 [ main] INFO formats.importer.cli.CommandLineImporter - Log levels -- Bio-Formats: ERROR OMERO.importer: INFO
2022-08-26 10:45:33,865 1033 [ main] INFO ome.formats.importer.ImportCandidates - Depth: 4 Metadata Level: MINIMUM
2022-08-26 10:45:33,968 1136 [ main] INFO ome.formats.importer.ImportCandidates - 1 file(s) parsed into 1 group(s) with 1 call(s) to setId in 99ms. (102ms total) [0 unknowns]
2022-08-26 10:45:34,031 1199 [ main] INFO ome.formats.OMEROMetadataStoreClient - Attempting initial SSL connection to localhost:4064
2022-08-26 10:45:34,786 1954 [ main] ERROR formats.importer.cli.CommandLineImporter - Error during import process.
Ice.SecurityException: javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS12]
at IceInternal.AsyncResultI.__wait(AsyncResultI.java:276) ~[ice.jar:na]
at Ice.ObjectPrxHelperBase.end_ice_isA(ObjectPrxHelperBase.java:310) ~[ice.jar:na]
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:92) ~[ice.jar:na]
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:69) ~[ice.jar:na]
at Ice.ObjectPrxHelperBase.checkedCastImpl(ObjectPrxHelperBase.java:2810) ~[ice.jar:na]
at Ice.ObjectPrxHelperBase.checkedCastImpl(ObjectPrxHelperBase.java:2770) ~[ice.jar:na]
at Glacier2.RouterPrxHelper.checkedCast(RouterPrxHelper.java:1787) ~[glacier2.jar:na]
at omero.client.getRouter(client.java:889) ~[omero-blitz.jar:5.5.8]
at omero.client.createSession(client.java:810) ~[omero-blitz.jar:5.5.8]
at omero.client.joinSession(client.java:745) ~[omero-blitz.jar:5.5.8]
at ome.formats.OMEROMetadataStoreClient.initialize(OMEROMetadataStoreClient.java:764) ~[omero-blitz.jar:5.5.8]
at ome.formats.importer.ImportConfig.createStore(ImportConfig.java:381) ~[omero-blitz.jar:5.5.8]
at ome.formats.importer.cli.CommandLineImporter.<init>(CommandLineImporter.java:162) ~[omero-blitz.jar:5.5.8]
at ome.formats.importer.cli.CommandLineImporter.main(CommandLineImporter.java:997) ~[omero-blitz.jar:5.5.8]
Caused by: javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS12]
at sun.security.ssl.Alert.createSSLException(Alert.java:131) ~[na:1.8.0_333]
at sun.security.ssl.Alert.createSSLException(Alert.java:117) ~[na:1.8.0_333]
at sun.security.ssl.TransportContext.fatal(TransportContext.java:357) ~[na:1.8.0_333]
at sun.security.ssl.TransportContext.fatal(TransportContext.java:313) ~[na:1.8.0_333]
at sun.security.ssl.TransportContext.fatal(TransportContext.java:304) ~[na:1.8.0_333]
at sun.security.ssl.ServerHello$ServerHelloConsumer.onServerHello(ServerHello.java:941) ~[na:1.8.0_333]
at sun.security.ssl.ServerHello$ServerHelloConsumer.consume(ServerHello.java:868) ~[na:1.8.0_333]
at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:376) ~[na:1.8.0_333]
at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:479) ~[na:1.8.0_333]
at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:990) ~[na:1.8.0_333]
at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:977) ~[na:1.8.0_333]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_333]
at sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:924) ~[na:1.8.0_333]
at IceSSL.TransceiverI.handshakeNonBlocking(TransceiverI.java:363) ~[ice.jar:na]
at IceSSL.TransceiverI.initialize(TransceiverI.java:33) ~[ice.jar:na]
at Ice.ConnectionI.initialize(ConnectionI.java:1921) ~[ice.jar:na]
at Ice.ConnectionI.message(ConnectionI.java:940) ~[ice.jar:na]
at IceInternal.ThreadPool.run(ThreadPool.java:395) ~[ice.jar:na]
at IceInternal.ThreadPool.access$300(ThreadPool.java:12) ~[ice.jar:na]
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832) ~[ice.jar:na]
at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_333]
When I build this example inside a docker with a Dockerfile like
FROM centos/systemd
CMD ["/sbin/init"]
With a command
docker build -f Dockerfile.j2 --rm --no-cache -t httpd .
Then run it with:
docker run --privileged --name httpd -p 22 -p 4063:4063 -p 4064:4064 -p 4080:4080 -p 8080:80 -d httpd
Then start a bash session inside the docker
docker exec -it httpd bash
Inside the docker run
yum makecache fast && yum install -y /usr/bin/python /usr/bin/python2-config sudo yum-plugin-ovl bash iproute ca-certificates && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all
LC_CTYPE=en_US.UTF-8
export LC_CTYPE
yum install --assumeyes python3-pip
pip3 install --upgrade pip
pip install ansible
Then, copy the three crucial files from this repo, playbook.yml
, requirements.yml
and hosts.yml
to the docker env.
Change the host in the hosts.yml
to localhost
.
Inside the docker, run
ansible-galaxy install -r requirements.yml
ansible-playbook --become --connection=local -i hosts.yml playbook.yml
This results in a successful run of the playbook, and then outside of the docker, I can connect successfully using CLI and OMERO.insight connecting to localhost
and the OMERO works fine, except the SSL handshake problem in CLI during import only (OMERO.insight imports without a problem).
Nevertheless,
Issues:
http://localhost:4080/webclient
- FF reports that "connection was reset".omero config set omero.web.application_server.host 0.0.0.0
and omero web is restarted, then OMERO.web can be accessed on http://localhost:4080/webclient
- but the css is missing, see screenshot below. (note that you can successfully login into such strangely formatted OMERO.web login page, but of course further work is blocked after login by misformatting).My opinion would be that
omero config set omero.web.application_server.host 0.0.0.0
should be added to the playbook.yml.Created a Centos 7 VM with Vagrant, tried to run this example. OMERO.server can't be started.
From Blitz.log:
...
2019-07-12 15:01:57,444 ERROR [ ome.services.util.DBPatchCheck] ( main)
***************************************************************************************
Error connecting to database table dbpatch. You may need to bootstrap.
See https://docs.openmicroscopy.org/latest/omero/sysadmins/server-upgrade.html
***************************************************************************************
org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [select currentversion, currentpatch from dbpatch order by id desc limit 1]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "dbpatch" does not exist
Position: 42
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231) ~[spring-jdbc.jar:4.3.14.RELEASE]
...
More info:
bash-4.2$ ./omero admin diagnostics
================================================================================
OMERO Diagnostics (admin) 5.5.1-ice36-b122
================================================================================
Commands: java -version 1.8.0 (/bin/java)
Commands: python -V 2.7.5 (/bin/python)
Commands: icegridnode --version 3.6.4 (/bin/icegridnode)
Commands: icegridadmin --version 3.6.4 (/bin/icegridadmin)
Commands: psql --version 9.6.14 (/bin/psql)
Commands: openssl version 1.0.2 (/bin/openssl)
Server: icegridnode not started
Log dir: /opt/omero/server/OMERO.server-5.5.1-ice36-b122/var/log exists
Log files: Blitz-0.log 36.0 KB errors=2 warnings=3
Log files: DropBox.log 1.0 KB errors=2 warnings=1
Log files: FileServer.log 341 B
Log files: Indexer-0.log 25.0 KB errors=1 warnings=1
Log files: MonitorServer.log 347 B
Log files: PixelData-0.log 25.0 KB errors=1 warnings=1
Log files: Processor-0.log 15.0 KB errors=4 warnings=8
Log files: Tables-0.log 16.0 KB errors=4 warnings=8
Log files: TestDropBox.log n/a
Log files: master.err 31.0 KB errors=1 warnings=2
Log files: master.out empty
Log files: Total size 0.15 MB
Environment:OMERO_HOME=(unset)
Environment:OMERO_NODE=(unset)
Environment:OMERO_MASTER=(unset)
Environment:OMERO_USERDIR=(unset)
Environment:OMERO_TMPDIR=(unset)
Environment:PATH=/sbin:/bin:/usr/sbin:/usr/bin
Environment:PYTHONPATH=(unset)
Environment:ICE_HOME=(unset)
Environment:LD_LIBRARY_PATH=(unset)
Environment:DYLD_LIBRARY_PATH=(unset)
Cannot list deployed applications.
OMERO data dir:'/OMERO' Exists? True Is writable? True
OMERO temp dir:'/opt/omero/server/omero/tmp' Exists? True Is writable? True (Size: 0)
JVM settings: Blitz-${index} -Xmx595m -XX:MaxPermSize=256m -XX:+IgnoreUnrecognizedVMOptions
JVM settings: Indexer-${index} -Xmx397m -XX:MaxPermSize=256m -XX:+IgnoreUnrecognizedVMOptions
JVM settings: PixelData-${index} -Xmx595m -XX:MaxPermSize=256m -XX:+IgnoreUnrecognizedVMOptions
JVM settings: Repository-${index} -Xmx397m -XX:MaxPermSize=256m -XX:+IgnoreUnrecognizedVMOptions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.