Giter Club home page Giter Club logo

omego's Introduction

OME, Go (omego)

image

image

The omego command provides utilities for installing and managing OME applications.

Getting Started

For Python 2.6, you will need to install argparse

$ pip install argparse

With that, it's possible to execute omego:

$ python omego/main.py

Pip installation

To install the latest release of omego use pip install:

$ pip install omego
$ omego

License

omego is released under the GPL.

2013-2016, The Open Microscopy Environment

omego's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

omego's Issues

omego configuration file and command line parsing

I started work on this a while ago but it got sidetracked. I can think of two ways to do this:

  1. Augment argparse with ConfigFileParser or similar
    • Example implementation (more or less works): https://github.com/manics/omego/compare/argparse_config_file

    • This requires two passes of the command line args:

      • On the first pass find and parse any config files specified on the command line (-c FILE, multiple allowed).
      • Use these parsed values as the default values in argparse.add_argument.
      • Do a full parse of the command line arguments
    • I've implemented this by subclassing the main argparse class (actually its a wrapper rather than a subclass to avoid relying on potentially non-public _ members).

    • Advantages

      • if you specify a type in add_argument any values from a config file are converted
      • Doesn't require any major code changes.
      • Might be able to use argcomplete to generate bash-completions (though I've no idea whether it would work in practice with this modified argparse)
    • Disadvantages:

      • Disabling the early-exit-if-help for the first pass but not the second is a bit complicated
      • I'm not sure how robust extending argparse is with regards to future versions
      • If you specify an action arg to add_argument it might not be handled properly
    • Example: omego upgrade -c omego-50-merge.cfg

      # omego-50-merge.cfg
      [main]
      [db]
      [download]
      branch = OMERO-5.0-merge-ice35
      [install]
      branch = OMERO-5.0-merge-ice35
      [upgrade]
      branch = OMERO-5.0-merge-ice35
      [version]
      
  2. Use docopt
    • Examples of docopt messages (note this is non-functional): https://github.com/manics/omego/compare/docopt_args
    • You write the help message, and it automatically creates a parser for you at runtime.
    • Advantages
      • It's cool :-)
      • Easier to understand
      • Relatively simple
    • Disadvantages:
      • No types, everything is a string
      • Gets more complicated because each command has it's own sub-parser
      • Merging of config file values and command line values would happen after command line parsing, and there's no simple way to distinguish between default values from one which is explicitly set to the same as a default value
      • A separate dependency (at present omego has no external deps for Python 2.7 which makes it easier to distribute), though we could bundle it since it's only one file docopt, or fork it to workaround the above limitations

If this is done correctly then it can go into yaclifw

omego upgrade does not recognize PREFIX envvar

See http://ci.openmicroscopy.org/job/OMERO-5.1-merge-upgrade/VERSION=5.0.0,label=ome-c6100-3/33/consoleFull, it seems that PREFIX is not recognized anymore

+ omego upgrade -v --branch=OMERO-5.1-merge-build --labels ICE=3.4 --sym=OMERO.server --dbhost localhost --dbname OMERO-5.1-merge-upgrade --upgradedb
2014-06-30 09:02:14,741 [omego.upgrad] DEBUG              address => ome-c6100-3
2014-06-30 09:02:14,741 [omego.upgrad] DEBUG               branch => OMERO-5.1-merge-build
2014-06-30 09:02:14,741 [omego.upgrad] DEBUG                build => http://ci.openmicroscopy.org/job/OMERO-5.1-merge-build/lastSuccessfulBuild/
2014-06-30 09:02:14,741 [omego.upgrad] DEBUG                  cfg => /home/hudson/config.xml
2014-06-30 09:02:14,741 [omego.upgrad] DEBUG                   ci => ci.openmicroscopy.org
2014-06-30 09:02:14,741 [omego.upgrad] DEBUG               dbhost => localhost
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG               dbname => OMERO-5.1-merge-upgrade
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG               dbpass => omero
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG               dbuser => omero
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG             hostname => ome-c6100-3
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG               labels => ICE=3.4
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG                  mem => Xmx1024M
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG                 name => ome-c6100-3
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG             omerosql => omero.sql
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG            overwrite => keep
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG               prefix => PREFIX
2014-06-30 09:02:14,742 [omego.upgrad] DEBUG           recipients => [email protected]
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG             registry => PREFIX4061
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG             rootpass => omero
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG             savevars => ICE_HOME PATH DYLD_LIBRARY_PATH LD_LIBRARY_PATH PYTHONPATH
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG         savevarsfile => OMERO.server/omero.envvars
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG               sender => [email protected]
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG           skipdelete => true
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG        skipdeletezip => false
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG            skipemail => true
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG              skipweb => false
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG          smtp_server => smtp.dundee.ac.uk
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG                  ssl => PREFIX4064
2014-06-30 09:02:14,743 [omego.upgrad] DEBUG              subject => OMERO - ome-c6100-3 was upgraded
2014-06-30 09:02:14,744 [omego.upgrad] DEBUG                  sym => OMERO.server
2014-06-30 09:02:14,744 [omego.upgrad] DEBUG                  tcp => PREFIX4063
2014-06-30 09:02:14,744 [omego.upgrad] DEBUG                  web => [["localhost", PREFIX4064, "ome-c6100-3"], ["gretzky.openmicroscopy.org.uk", 4064, "gretzky"], ["howe.openmicroscopy.org.uk", 4064, "howe"]]
2014-06-30 09:02:14,744 [omego.upgrad] DEBUG               weburl => http://ome-c6100-3/omero/webclient/

specify ice version

In ome/omero-install#94, we now use omego to install the desire build (latest, merge, release)
We will need to be able to specify the version of the server i.e. ice36 build instead of ice35 corresponding to the version of ice installed.

`omero db` should auto-detect serverdir if possible

See #74 (comment) - there is a necessity postulated to use the --serverdir flag to point to the server in order to find the config (note that the config is needed as by default the config file is used to extract the info about the db). The symlink to the server which the flag is expecting could be by default being searched for, thus sparing the user a level of complication
(reported by @pwalczysko)

Test OMERO.server on Python 3.6

#122 adds support for running omego under Python 3.6, but since the released version of OMERO.server only supports Python 2.7 the full Python 3.6 workflow isn't yet tested.

travis: upgrade step 5.3->5.4

5.2 does not start on the new Xenial Image so it is not currently possible
to have a 2 steps upgrade for now.
We have to do at the moment a 5.3->5.4
When 5.5 is out this should be upgraded to a 2 steps upgrade

cc @manics

Ctrl-C during jenkins reading is nasty

(v)# jamoore@Joshuas-MacBook-Pro:/tmp$ omego download python --branch=OMERO-5.1-latest
^CTraceback (most recent call last):
  File "/opt/v/bin/omego", line 9, in <module>
    load_entry_point('omego==0.2.3-43-g6eb8', 'console_scripts', 'omego')()
  File "/opt/v/lib/python2.7/site-packages/omego/main.py", line 57, in entry_point
    (Version.NAME, OmegoVersion)])
  File "/opt/v/lib/python2.7/site-packages/yaclifw/framework.py", line 197, in main
    ns.func(ns)
  File "/opt/v/lib/python2.7/site-packages/omego/artifacts.py", line 228, in __call__
    artifacts = Artifacts(args)
  File "/opt/v/lib/python2.7/site-packages/omego/artifacts.py", line 40, in __init__
    root = self.read_xml(buildurl)
  File "/opt/v/lib/python2.7/site-packages/omego/artifacts.py", line 65, in read_xml
    url = fileutils.open_url(buildurl + 'api/xml')
  File "/opt/v/lib/python2.7/site-packages/omego/fileutils.py", line 67, in open_url
    return opener.open(url)
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1214, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1187, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1067, in getresponse
    response.begin()
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 409, in begin
    version, status, reason = self._read_status()
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 365, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt

0.6.3 fails with missing arg

bash-4.2$ ../omego/bin/omego upgrade --no-start --sym=OMERO.web OMERO.server-5.3.2-314-7e10599-ice36-b88
2017-07-07 09:50:13,059 [omego.upgrad] WARNI "omero upgrade" is deprecated, use "omego install --upgrade"
2017-07-07 09:50:13,059 [omego.upgrad] INFO  UnixInstall: upgrade
2017-07-07 09:50:13,059 [omego.upgrad] INFO  Upgrading OMERO.server-5.3.2-314-7e10599-ice36-b88 (OMERO.web)...
2017-07-07 09:50:13,591 [omego.extern] ERROR Failed to load environment variables from OMERO.web/omero.envvars: [Errno 2] No such file or directory: 'OMERO.web/omero.envvars'
2017-07-07 09:50:13,592 [omego.upgrad] INFO  Stopping server
2017-07-07 09:50:13,592 [omego.extern] INFO  Running [old environment]: admin status --nodeonly
2017-07-07 09:50:13,592 [omego.extern] INFO  Executing [custom environment]: omero admin status --nodeonly
2017-07-07 09:50:14,322 [omego.extern] ERROR Failed [0.730 s]
2017-07-07 09:50:14,322 [omego.upgrad] ERROR Error whilst stopping server: Non-zero return code
command: omero admin status --nodeonly
return code: 62
stdout:
stderr: Missing internal configuration. Run bin/omero admin rewrite.

2017-07-07 09:50:14,322 [omego.upgrad] INFO  Stopping web
2017-07-07 09:50:14,322 [omego.extern] INFO  Running [old environment]: web stop
2017-07-07 09:50:14,322 [omego.extern] INFO  Executing [custom environment]: omero web stop
2017-07-07 09:50:15,069 [omego.extern] ERROR Failed [0.747 s]
2017-07-07 09:50:15,069 [omego.upgrad] ERROR Error whilst stopping web: Non-zero return code
command: omero web stop
return code: 169
stdout:
stderr: ERROR: Django not installed!

2017-07-07 09:50:15,070 [omego.upgrad] INFO  Copying old configuration from OMERO.web/etc/grid/config.xml
2017-07-07 09:50:15,070 [omego.upgrad] WARNI Upgraded server was the same, not deleting
Traceback (most recent call last):
  File "../omego/bin/omego", line 9, in <module>
    load_entry_point('omego==0.6.3', 'console_scripts', 'omego')()
  File "/opt/omero/omego/lib/python2.7/site-packages/omego/main.py", line 52, in entry_point
    (Version.NAME, Version)])
  File "/opt/omero/omego/lib/python2.7/site-packages/yaclifw/framework.py", line 197, in main
    ns.func(ns)
  File "/opt/omero/omego/lib/python2.7/site-packages/omego/upgrade.py", line 526, in __call__
    UnixInstall(self.NAME, args)
  File "/opt/omero/omego/lib/python2.7/site-packages/omego/upgrade.py", line 70, in __init__
    self.handle_database()
  File "/opt/omero/omego/lib/python2.7/site-packages/omego/upgrade.py", line 272, in handle_database
    if self.args.initdb or self.args.upgradedb:
AttributeError: 'Namespace' object has no attribute 'initdb'
bash-4.2$ ../omego/bin/pip freeze | grep omego
omego==0.6.3

Error message more explicit

I think error message could be more explicit, to point to narrow down by flag. Even better, giving example would be very clear what is wrong.

Probably when release is out default ICE version would be good idea too.

(omego) $ omego download py --branch OMERO-DEV-merge-build
2016-04-28 10:24:05,893 [omego.artifa] ERROR Found 2 matching matrix build runs: ['https://ci.openmicroscopy.org/job/OMERO-DEV-merge-build/ICE=3.5,jdk=8_LATEST,label=octopus/295/', 'https://ci.openmicroscopy.org/job/OMERO-DEV-merge-build/ICE=3.6,jdk=8_LATEST,label=octopus/295/']
ERROR: Expected one matching run, found 2

see #85

omego/db.py is sensitive to .psqlrc settings

In my ~/.psqlrc file I have

\pset linestyle unicode
\timing

which leads to this:

2017-06-14 22:10:43,928 [    omego.db] DEBUG stdout: Timing is on.
Line style is unicode.
OMERO4.4|0
Time: 1.400 ms

Traceback (most recent call last):
  File "/opt/v/bin/omego", line 9, in <module>
    load_entry_point('omego==0.4.0', 'console_scripts', 'omego')()
  File "/opt/v/lib/python2.7/site-packages/omego/main.py", line 52, in entry_point
    (Version.NAME, Version)])
  File "/opt/v/lib/python2.7/site-packages/yaclifw/framework.py", line 197, in main
    ns.func(ns)
  File "/opt/v/lib/python2.7/site-packages/omego/upgrade.py", line 415, in __call__
    UnixInstall(self.NAME, args)
  File "/opt/v/lib/python2.7/site-packages/omego/upgrade.py", line 70, in __init__
    self.upgrade_db()
  File "/opt/v/lib/python2.7/site-packages/omego/upgrade.py", line 205, in upgrade_db
    DbAdmin(self.dir, 'upgrade', self.args, self.external)
  File "/opt/v/lib/python2.7/site-packages/omego/db.py", line 41, in __init__
    getattr(self, command)()
  File "/opt/v/lib/python2.7/site-packages/omego/db.py", line 136, in upgrade
    currentsqlv = '%s__%s' % self.get_current_db_version()
  File "/opt/v/lib/python2.7/site-packages/omego/db.py", line 157, in get_current_db_version
    raise Exception('Got %d rows, expected 1', len(result))
Exception: ('Got %d rows, expected 1', 4)

Found while testing gh-104

no warning on --ci and --build

omego download --ci metadata-ci.openmicroscopy.org.uk:8080 --build OMERO-build server

should have been --branch ... but there was no warning, and a release version was used.

db verify deployed schema

I think it is necessary to have a verify action. This would compare the currently deployed database schema version against the version omego is pointed at.

This would be useful for a non-CI docker environment. In this environment, an implicit upgrade is not desirable should there be a version mismatch. so something like

omego db verify --dbhost "$DBHOST" --dbuser "$DBUSER" --dbname "$DBNAME" \
                --dbpass "$DBPASS" --serverdir=OMERO.server && echo "Verified version"

The success could be used to continue without a) installing/upgrading anything. If the version was not verified then an error exit code would be returned and potentially the output can be used to determine what to do, i.e. There is no schema deployed -> init, otherwise: error or upgrade depending on the use case.

Potentially a command which checks if any schema is installed at all could be separate which could in some use cases avoid having to parse the output at all.

omego checking what DB action is needed

omego is very cleaver to know what DB "action" is needed, but I think the console output given to the user could be improved. I have been using https://github.com/openmicroscopy/omero-test-daemon-c7-docker/blob/master/install/server.sh#L33 to test whether OMERO instance is brand new and requires initialization script or just upgrade patch is needed.

If omero DB hasn't been initialized PG gives the following error https://travis-ci.org/openmicroscopy/omero-test-daemon-c7-docker/jobs/182558170#L2615, is there any better way to do it?

omego plugin install/upgrade

We should have a way of managing OMERO.web plugins (or perhaps OMERO add-ons in general). This could get quite complicated if an app installs files to multiple locations, effectively we'd need a mini package-manager.

Version sourcing

incorrect version

+ /home/omero/omeroenv/bin/pip install omego==0.4.0
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting omego==0.4.0
  Downloading omego-0.4.0.tar.gz
  Requested omego==0.4.0 from https://pypi.python.org/packages/a8/11/323d146d44fb1cf85f561213ffe52bc90fd661c0ed072886c64ade4b000c/omego-0.4.0.tar.gz#md5=acebfa3b1588c90aae0c201eb0b02864, but installing version None
Collecting yaclifw>=0.1.1 (from omego==0.4.0)
  Downloading yaclifw-0.1.2.tar.gz
Collecting argparse (from yaclifw>=0.1.1->omego==0.4.0)
  Downloading argparse-1.4.0-py2.py3-none-any.whl
Building wheels for collected packages: omego, yaclifw
  Running setup.py bdist_wheel for omego
  Stored in directory: /home/omero/.cache/pip/wheels/ca/f3/1c/fe442d9e65866cd93074936cf2dd21a245ec27476082b9edb9
  Running setup.py bdist_wheel for yaclifw
  Stored in directory: /home/omero/.cache/pip/wheels/6f/68/84/fe07e9112771e8a3c2daf6540556e1df76e979b161a2b4e71b
Successfully built omego yaclifw
Installing collected packages: argparse, yaclifw, omego
Successfully installed argparse-1.4.0 omego-UNKNOWN yaclifw-0.1.2

0.4.0+ fail travis due to removed CI jobs

https://travis-ci.org/ome/omego/jobs/131498220

self = <omego.artifacts.JenkinsArtifacts object at 0x34e2590>
buildurl = 'http://ci.openmicroscopy.org/job/OMERO-5.1-latest/lastSuccessfulBuild/'
    def read_xml(self, buildurl):
        url = None
        try:
            url = fileutils.open_url(buildurl + 'api/xml')
            log.debug('Fetching xml from %s code:%d', url.url, url.code)
            if url.code != 200:
                log.error('Failed to get CI XML from %s (code %d)',
                          url.url, url.code)
                raise Stop(20, 'Job lookup failed, is the job name correct?')
            ci_xml = url.read()
        except HTTPError as e:
            log.error('Failed to get CI XML (%s)', e)
>           raise Stop(20, 'Job lookup failed, is the job name correct?')
E           Stop: Job lookup failed, is the job name correct?
omego/artifacts.py:230: Stop
----------------------------- Captured stderr call -----------------------------
2016-05-19 18:43:19,658 [omego.artifa] ERROR Failed to get CI XML (HTTP Error 404: Not Found)
================== 2 tests deselected by "-m 'not slowtest'" ===================
============== 3 failed, 8 passed, 2 deselected in 13.13 seconds ===============

Invalid argument leads to wrong upgrade

[omero@minke ~]$ omego/bin/omego upgrade --ci=10.0.51.113:58080 --build=OMERO-build --sym=OMERO.server
[omero@minke ~]$ omego/bin/omego upgrade --ci=10.0.51.113:58080 --branch=OMERO-build --sym=OMERO.server

The first command leads to 5.2.3-ice26 being installed. I would expect a failure message.

make http a possibility in

omego download --ci http://something --branch somebranch will fail.
omego download --ci something --branch somebranch will execute

allow running precheck script

Now that we routinely offer a sql/psql/new-version/old-version-precheck.sql perhaps omego could support doing a precheck.

Cross-ice failure

While trying to upgrade the OMERO-merge-develop-FS installation on c6100-3 from daily-merge-ice34 to 5.0.0-beta2-rc1-ice35 the script failed since bin/omero web stop was not runnable with the given Ice environment.

Note: There's also still a TODO which would overwrite omero.web.server_list

I finally worked around this by doing:

  • diff -r OLD/etc NEW/etc
  • Checked the values
  • for x in OLD/etc/*.config OLD/etc/*cfg OLD/etc/grid/*.xml; do cp $x ${x#/*}; done

A command for just this would probably be useful. (Eventually it could also copy over the lib/scripts etc.)

"std" memory management

I've just upped the memory settings for PixelData for OMERO-merge-(stable|develop):

perl -i -pe 's/Xmx256M/Xmx1024M/' etc/grid/templates.xml

Note: this setting is not ideal because it also bumps the indexer.

This type of setting should be permanent between executions.

@manics, @sbesson

missing openmicroscopy.zip from artifacts

https://ci.openmicroscopy.org/job/OMERO-DEV-latest/227/ICE=3.5,jdk=8_LATEST,label=octopus/artifact/src/target/openmicroscopy-5.2.2-14-3f616af.zip

is missing from the list and cannot be downloaded

$ omego download --build https://ci.openmicroscopy.org/job/OMERO-DEV-latest/227/ICE=3.5,jdk=8_LATEST,label=octopus/artifact/src/target/
Artifacts available for download. Initial partial matching is supported for all except named-components). Alternatively a full filename can be specified to download any artifact, including those not listed.
named-components:
  linux
  matlab
  python
  server
  win
omerozips:
  docs-5.2.2-ice35-b17
  insight-5.2.2-ice35-b17-linux
  insight-5.2.2-ice35-b17-mac
  insight-5.2.2-ice35-b17-win
  insight-ij-5.2.2-ice35-b17
  java-5.2.2-ice35-b17
  matlab-5.2.2-ice35-b17
  py-5.2.2-ice35-b17
  server-5.2.2-ice35-b17
zips:
  OMERO.docs-5.2.2-ice35-b17
  OMERO.insight-5.2.2-ice35-b17-linux
  OMERO.insight-5.2.2-ice35-b17-mac
  OMERO.insight-5.2.2-ice35-b17-win
  OMERO.insight-ij-5.2.2-ice35-b17
  OMERO.java-5.2.2-ice35-b17
  OMERO.matlab-5.2.2-ice35-b17
  OMERO.py-5.2.2-ice35-b17
  OMERO.server-5.2.2-ice35-b17
Mac-Book-Pro:~ ola$ 

omego-for-ansible

cF:

To simplify adding requirements for the various install targets that omego provides, the following could be added:

  • dependency on ansible so that pip installing also installs ansible
  • a command req (or deps or ansible or setup) or a flag like install --setup could be added which:
    • generates a requirements.yml
    • runs ansible-galaxy
    • generates a playbook
    • (optionally) runs the playbook
  • skip generating those files if they already exist

The requirements.yml file might look like:

# web
- src: openmicroscopy.ice
- src: openmicroscopy.omero-web-runtime
- src: openmicroscopy.nginx # optionally

# server
 - src: openmicroscopy.java
 - src: openmicroscopy.omero-server

# etc.

The playbook would largely might look like:

# server
- hosts: localhost:
   roles:
   - role: openmicroscopy.omero-server

The goal would be to reduce the number of steps and necessary files needed for the likes of docker to:

RUN pip install omego && omego install --with-playbook

omego developer mode

Disable some of the developer-oriented features unless a flag is explicitly passed, this should make omego safer to use by external sysadmins. This might include:

  • Non-release upgrades
  • DEV db upgrades
  • Jenkins-specific features (e.g BUILD_IDDONT_KILL_ME)
  • PSQL superuser commands (create new DBs)

Omego, webserver and config

Webserver
As discussed with @manics during testing of his PR, I have major problems with the development server starting every time as a default option in omego.
The solution would be --skipweb=TRUE, but it is hard to remember to pass this flag every time.
This is convoluted with the fact that I am using a development webserver. This is being passed in my config (see below about the config passing).
My, development webserver, starts every time I use omego without the --skipweb flag (=very often), and then it is not possible to stop it using bin/omero web stop - it has to be stopped "manually", killing the processes one by one -> very annoying.

Suggestions for Webserver:

  1. Was told by @manics , the production web server would really restart during omego upgrade, which makes me doubt about my original suggestion to make --skipweb=TRUE a default option.
  2. I would still opt for --skipweb=TRUE to be a default when omego install is run - with an appropriate output on the cmd line of course, saying "please sort yourself out, check all is fine with your server, check your config, then start the bin/omero web start from appropriate folder" - just a suggestion.

Config:
I find it often very confusing to figure out what config will be actually used in this or that case. This might be even dangerous, in case the --upgradedb flag is used (I might upgrade the db to a version I did not intend -> no downgrade -> problem.
There is a --cfg ./config.xml option, which works, but then you have to take care of the config.xml file beforehand - not very nice.

Suggestions for config:

  1. make it very easy to check your config using omego (remember that when using omego, you are in a parent directory to the one where your bin/omero… commands can be executed from - not very straightforward to jump from one dir to another just to check your present config.
  2. make it very clear what config will be used when the omego commands are going ahead with installs, upgrades etc. - maybe even a compulsory question at the start, saying - for dbupgrade this and that config will be used, for the init this and that config, for the upgraded server this and that config - yes, you do not have the exact config variables at hand before the command is executed, but you can inform the user FROM WHERE will the configs be taken from. A simple question then follows: Are you happy to proceed ? y n. I am sure an admin would rather like to stop and ponder for 1 min before blowing up the DB of the whole institute using hidden omego configs.

Simplify the command line options in omego

@manics : As discussed during testing of your PR, the options are not very self-explanatory. Hit the problem with
--skipweb has some compulsory parameters and the name always suggested to me rather that the web will be somehow skipped during the omego upgrade. In fact, this means that the web server will not start automatically after download.
There are other rather intricate and longish options which need rationalising.
See #26

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.