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

Update omero-grid to the latest server #24

Merged
merged 37 commits into from
Jan 29, 2016

Conversation

manics
Copy link
Member

@manics manics commented Nov 22, 2015

See the README.md for instructions

Ignore the rest of this description, it should be fixed by ome/openmicroscopy#4422

Unfortunately this doesn't work, see https://trello.com/c/3fY2taKP/88-omeor-grid-omero-node-bugs-issues

Attempting to start the slave (Processor-0) leads to an initial Ice connection, but Processor-0.log contains

2015-11-22 19:03:33,716 INFO  [                       omero.util.Server] (MainThread) ********************************************************************************
2015-11-22 19:03:33,716 INFO  [                       omero.util.Server] (MainThread) Waiting 10000 ms on startup
2015-11-22 19:03:43,717 INFO  [                       omero.util.Server] (MainThread) Starting
2015-11-22 19:03:43,719 INFO  [                    omero.util.Resources] (Thread-2  ) Starting
2015-11-22 19:03:43,791 ERROR [                       omero.util.Server] (MainThread) Failed activation
Traceback (most recent call last):
  File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omero/util/__init__.py", line 502, in run
    self.adapter_name)
  File "/usr/lib64/python2.7/site-packages/Ice/Ice.py", line 557, in createObjectAdapter
    adapter = self._impl.createObjectAdapter(name)
SocketException: Ice.SocketException:
Cannot assign requested address
2015-11-22 19:03:43,794 INFO  [                       omero.util.Server] (MainThread) Cleanup
2015-11-22 19:03:43,794 INFO  [              omero.processor.ProcessorI] (MainThread) Cleaning up
2015-11-22 19:03:43,794 INFO  [              omero.processor.ProcessorI] (MainThread) Done
2015-11-22 19:03:43,821 WARNI [                omero.util.ServerContext] (MainThread) Connection failure: exception ::Ice::ObjectNotExistException
{
    id = 
    {
        name = 3505efce-99d6-4f5f-b827-42e87f4278da
        category = session-eb45540f-1e4c-4d4c-b02a-447908ebc69b
    }
    facet = 
    operation = keepAlive
}
2015-11-22 19:03:43,821 INFO  [                       omero.util.Server] (MainThread) Stopped
2015-11-22 19:03:43,821 INFO  [                       omero.util.Server] (MainThread) ********************************************************************************
2015-11-22 19:03:43,822 WARNI [                                  stderr] (MainThread) 2015-11-22 19:03:43.821998 Processor-0: error: Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/Ice/Ice.py", line 1127, in main
    status = self.doMain(args, initData)
  File "/usr/lib64/python2.7/site-packages/Ice/Ice.py", line 1174, in doMain
    return self.run(args)
  File "/home/omero/OMERO.server-5.2.0-ice35-b12/lib/python/omero/util/__init__.py", line 512, in run
    sys.exit(200)
SystemExit: 200
2015-11-22 19:03:43,841 INFO  [                    omero.util.Resources] (Thread-2  ) Halted

TODO:

  • Remove old db image
  • Remove old omero-server and omero-slave images (omero image does both)
  • Update omero-web
  • Cleanup

@manics
Copy link
Member Author

manics commented Nov 24, 2015

I think this is done, apart from some cleanups e.g. removing web dependencies from omero/Dockerfile (I could do this here or in a later PR). See the README: https://github.com/manics/ome-docker/tree/omero-grid-new/omero-grid

Note this also contains a fix for the incorrect Ice.Default.Node causing omero node xxx start to fail. In theory you can use the master configuration arg to create as many slaves and servers as you want.

@manics
Copy link
Member Author

manics commented Nov 24, 2015

This might be an interesting test:

# Glacier only
docker run -d --link postgres:db \
    -e DBUSER=postgres -e DBPASS=postgres -e DBNAME=postgres \
    -p 4063:4063 -p 4064:4064 \
    --name omero-master omero-grid master \
    slave-b0:Blitz-0 slave-b1:Blitz-1 \
    slave-i0:Indexer-0 slave-i1:Indexer-1 \
    slave-d:DropBox,MonitorServer,FileServer slave-s:Storm \
    slave-pi0:PixelData-0 slave-pi1:PixelData-1 \
    slave-t0:Tables-0 slave-t1:Tables-1 \
    slave-pr0:Processor-0 slave-pr1:Processor-1

for slave in slave-b0 slave-b1 slave-i0 slave-i1 slave-d slave-pi0 slave-pi1 \
        slave-t0 slave-t1 slave-pr0 slave-pr1; do
    docker run -d --link omero-master:master \
        --volumes-from omero-master \
        --name $slave omero-grid $slave
done

docker run -d --link omero-master:master -p 80:8080 --name omero-web omero-grid-web

ln -s OMERO.server-5.0.1-ice35-b21 OMERO.server"
USER omero
WORKDIR /home/omero
RUN omego download server --release $OMERO_VERSION && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will likely be the first thing that I'd need to change. Can we make all the arguments passable? Or unpack to a well-known location so an unzipped server can be mounted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you feel about a build-arg for the ci-server and branch?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would work for me. Could be part of the tag that we use: e.g. docker build -t omero-deploy:b148 --build-arg ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's exactly what I was thinking... have a script which takes the version args, sets build-args and somehow munges them into a tag

@joshmoore
Copy link
Member

Cherry-pick joshmoore@d77120a ?

joshmoore and others added 2 commits November 26, 2015 17:42
The directory names now match the suggested image name.
@manics
Copy link
Member Author

manics commented Nov 26, 2015

Cherry-picked, ./build.py added to pass the CI server and branch to the build, README updated.

  • Discovered a mysterious bug in omego download --ci ..., the ci argument appears to be ignored (but it is respected in omego upgrade), which means you can't currently use it in this image.
  • Travis Docker is too old and doesn't support --build-arg.

@joshmoore
Copy link
Member

From https://blog.travis-ci.com/2015-08-19-using-docker-on-travis-ci/ :

The default Docker version installed is currently 1.7.0. We'll keep it up-to-date as we roll out new build environments, but you're also free to install different versions of Docker as part your builds, the APT repository is added by default.

@manics
Copy link
Member Author

manics commented Jan 7, 2016

@joshmoore If you want to play with 5.1 this week you'll need to comment out the rewrite workarounds in https://github.com/ome/ome-docker/pull/24/files#diff-7fe777f48c77321016945317c474b5df

@manics
Copy link
Member Author

manics commented Jan 25, 2016

That's my plan, trying to do too many other things at the same time.

@manics
Copy link
Member Author

manics commented Jan 25, 2016

@joshmoore I think this is ready for testing.

@joshmoore
Copy link
Member

Blocker (or PR doc issue?):

  • ./build.py omero-grid
  • docker tag openmicroscopy/omero-grid:latest omero-grid:josh-test-24
  • docker run omero-grid:josh-test-24 exits
[jamoore@orca-3 omero-grid]$ docker run omero-grid:josh-test-24
Entering a shell
[jamoore@orca-3 omero-grid]$ docker ps

The readme says to add "master" which works.


Few non-blocker comments (i.e. they don't prevent us getting to production with this but affect usability):

  • build.py doesn't provide a way to name the image meaning that it's fairly easy to overwrite someone else's run
  • Use of build-args for CI look prevents use of links to download from a container on the same host (ideally I'd like to have the build in a docker-compose)

Testing continues after lunch.

@manics
Copy link
Member Author

manics commented Jan 26, 2016

Blocker (or PR doc issue?):

Originally the default was to drop into a bash shell which in hindsight is confusing if you're not running interactively. Changed to master now , so no args or just master should start a full server (minus web).

build.py doesn't provide a way to name the image

Added ./build --tag to override the full name/tag

Use of build-args for CI look prevents use of links to download from a container on the same host

Do you mean you're unable to link directly to a zip? If so then that's because I'm using omego download instead of omego install, otherwise OMERO.server automatically starts as a daemon. See ome/omego#69

@joshmoore
Copy link
Member

Currently testing the 2 new commits. Thanks.

Do you mean you're unable to link directly to a zip? If so then that's because I'm using omego download instead of omego install, otherwise OMERO.server automatically starts as a daemon. See ome/omego#69

No, I mean due to DNS, I don't have an IP (in general) for my CI, but I can easily link it into a container for us. But linking isn't available at build time.

@manics
Copy link
Member Author

manics commented Jan 27, 2016

Last three commits should help with testing. Runs a master-slave config, and you can modify params at the top of test.sh, e.g. see ome/openmicroscopy#4422

@manics
Copy link
Member Author

manics commented Jan 27, 2016

No, I mean due to DNS, I don't have an IP (in general) for my CI, but I can easily link it into a container for us. But linking isn't available at build time.

So that's going back to the omero-deploy workflow of installing at runtime? How about a separate PR? I could add a --build-arg devel flag to specify the server is setup during run not build

@joshmoore
Copy link
Member

Summary:

  • works based on Rewrite templates in omero node start, add --foreground openmicroscopy#4422 (comment) (but see the minor RFE there)
  • for the moment, this is certainly working, so yes, let's handle build-arg later. For the moment, I can likely hard-code the IP somewhere to get my builds to work.
  • there might be room for simplification in the little language you're using for service configuration but that's basically coming up with a new API, so definitely down the road.

@joshmoore
Copy link
Member

@manics
Copy link
Member Author

manics commented Jan 28, 2016

https://s3.amazonaws.com/archive.travis-ci.org/jobs/105445281/log.txt

  • build.py checks env-vars (I've defaulted to empty so that it matches the default behaviour of build.py, and overridden the env-var in .travis.yml, though if you disagree I'll hard-code it in test.sh
  • Added smoke tests for web login, dropbox and processor

@manics
Copy link
Member Author

manics commented Jan 28, 2016

I think I really am done now.

@joshmoore
Copy link
Member

I can successfully get a 5.2 server up and running now. 👍 (That doesn't help me with the metadata51 build, though, but perhaps that's just motivation for getting us migrated)

joshmoore added a commit that referenced this pull request Jan 29, 2016
Update omero-grid to the latest server
@joshmoore joshmoore merged commit 5b12c22 into ome:master Jan 29, 2016
@manics manics deleted the omero-grid-new branch January 29, 2016 14:22
@manics
Copy link
Member Author

manics commented Jan 29, 2016

This was stretching out so I decided to focus on 5.2 develop. Now that it's in I could work on metadata51 support if the rebase is going to take a while, add a trello card if you want me to (and find a column for it...).

@joshmoore
Copy link
Member

My primary need is to test @mtbc's DB, but I may be able to do that with an upgraded version. I'll try that first since we'll need to upgrade anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants