bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

Quickstart instructions do not result in a working docker setup



addons.mozilla.org Graveyard
Code Quality
3 years ago
2 years ago


(Reporter: mgoodwin, Assigned: magopian)



(Whiteboard: [qa-])


(1 attachment)



3 years ago
I'm trying to follow the instructions at http://olympia.readthedocs.org/en/latest/#quickstart for a docker install of AMO so I can hack on some blocklist stuff.

The "docker-compose build" step works fine.

The next step; "docker-compose run web npm install" fails like this:
Pulling repository dockerfile/elasticsearch
Traceback (most recent call last):
  File "/usr/local/bin/docker-compose", line 9, in <module>
    load_entry_point('docker-compose==1.1.0', 'console_scripts', 'docker-compose')()
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 31, in main
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/docopt_command.py", line 21, in sys_dispatch
    self.dispatch(sys.argv[1:], None)
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/command.py", line 27, in dispatch
    super(Command, self).dispatch(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/docopt_command.py", line 24, in dispatch
    self.perform_command(*self.parse(argv, global_options))
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/command.py", line 59, in perform_command
    handler(project, command_options)
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 299, in run
  File "/usr/local/lib/python2.7/dist-packages/compose/project.py", line 190, in up
  File "/usr/local/lib/python2.7/dist-packages/compose/service.py", line 357, in start_or_create_containers
  File "/usr/local/lib/python2.7/dist-packages/compose/service.py", line 244, in create_container
    stream_output(output, sys.stdout)
  File "/usr/local/lib/python2.7/dist-packages/compose/progress_stream.py", line 37, in stream_output
    print_output_event(event, stream, is_terminal)
  File "/usr/local/lib/python2.7/dist-packages/compose/progress_stream.py", line 50, in print_output_event
    raise StreamOutputError(event['errorDetail']['message'])
compose.progress_stream.StreamOutputError: Error: image dockerfile/elasticsearch:latest not found

I attempted to modify docker-compose.yml to remove 'dockerfile/' from the mysqld and elasticsearch "image:' values and the "docker-compose run web npm install" step succeeded... only for the "docker-compose run web make update_assets" step to fail like this:

    $ docker-compose run web make update_assets
    Starting new HTTP connection (1): localhost
    Starting olympia_mysqld_1...
    Starting new HTTP connection (2): localhost
    Starting new HTTP connection (3): localhost
    Starting new HTTP connection (4): localhost
    python manage.py compress_assets
    Raven is not configured (logging is disabled). Please see the documentation for more information.
    Traceback (most recent call last):
      File "manage.py", line 46, in <module>
        import amo  # noqa
      File "/code/apps/amo/__init__.py", line 155, in <module>
        import waffle  # noqa
      File "/usr/local/lib/python2.7/site-packages/waffle/__init__.py", line 9, in <module>
        from waffle.models import Flag, Sample, Switch
      File "/usr/local/lib/python2.7/site-packages/waffle/models.py", line 9, in <module>
        from waffle.compat import User
      File "/usr/local/lib/python2.7/site-packages/waffle/compat.py", line 8, in <module>
        User = get_user_model()
      File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 127, in get_user_model
        user_model = get_model(app_label, model_name)
      File "/usr/local/lib/python2.7/site-packages/django/db/models/loading.py", line 271, in get_model
      File "/usr/local/lib/python2.7/site-packages/django/db/models/loading.py", line 78, in _populate
      File "/usr/local/lib/python2.7/site-packages/django/db/models/loading.py", line 99, in load_app
        models = import_module('%s.models' % app_name)
      File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
      File "/code/apps/abuse/models.py", line 8, in <module>
        import amo.utils
      File "/code/apps/amo/utils.py", line 44, in <module>
        from easy_thumbnails import processors
      File "/usr/local/lib/python2.7/site-packages/easy_thumbnails/processors.py", line 7, in <module>
        import Image
    ImportError: No module named Image
    Makefile:78: recipe for target 'update_assets' failed
    make: *** [update_assets] Error 1


3 years ago
Blocks: 1162502


3 years ago
Depends on: 1162504

Comment 1

3 years ago
PR: https://github.com/mozilla/olympia/pull/554

:mgoodwin, can you please have a try and check if it fixes your issues?
Assignee: nobody → mathieu

Comment 2

3 years ago
Created attachment 8605236 [details]

I've tried this several times and repeatedly get "No such image" errors - see log
Flags: needinfo?(mathieu)

Comment 3

3 years ago
It's being discussed in the PR, could you please post your docker versions there?
Flags: needinfo?(mathieu)

Comment 4

3 years ago
Fixed in https://github.com/mozilla/olympia/commit/1d6455758f192c87aa761e8369ff9e7100e75ce7

There's some remaining issues with errors like "no such image". The workaround is to remove this image and recreated it:
1/ docker ps -a (locate the line which has the reference provided in the second column)
2/ docker rm <reference from the first column of the line found in 1/>
3/ docker-compose up
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.