Deployment process from DEV to PROD VM


#41

ok just use something like wetransfer and post the link or try emailing it to me. not sure if the cern mail server allows attachments that big, but my private one should be fine with it -> adrian@planetcoding.net


#42

cheers - sent a zip to email - hope it gets there


#43

Your wheel looks fine to me. I don’t see why it would cause the weird issues you are having.

PS: Some unrelated thing I noticed while looking at your wheel: there’s no need to change DEFAULTS entries in the code; those config options can (and should) be set directly in indico.conf instead.


#44

You could try recreating the whole virtualenv:

deactivate
rm -rf ~/.venv
virtualenv ~/.venv
source ~/.venv/bin/activate
pip install -U pip setuptools
pip install /path/to/your/indico*.whl

#45

ok - did that - is started to install, a lot of cashed files being used and requirements already satified, and then this…



ollecting Pillow==5.4.1 (from indico==2.2.dev0+20190423.1332.df161ea)
  Using cached https://files.pythonhosted.org/packages/0d/f3/421598450cb9503f4565d936860763b5af413a61009d87a5ab1e34139672/Pillow-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting PyYAML==5.1 (from indico==2.2.dev0+20190423.1332.df161ea)
ERROR: Exception:
Traceback (most recent call last):
  File "/opt/indico/.venv/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 178, in main
    status = self.run(options, args)
  File "/opt/indico/.venv/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 352, in run
    resolver.resolve(requirement_set)
  File "/opt/indico/.venv/lib/python2.7/site-packages/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/opt/indico/.venv/lib/python2.7/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/opt/indico/.venv/lib/python2.7/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
  File "/opt/indico/.venv/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 353, in prepare_linked_requirement
    progress_bar=self.progress_bar
  File "/opt/indico/.venv/lib/python2.7/site-packages/pip/_internal/download.py", line 873, in unpack_url
    unpack_file_url(link, location, download_dir, hashes=hashes)
  File "/opt/indico/.venv/lib/python2.7/site-packages/pip/_internal/download.py", line 807, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "/opt/indico/.venv/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 628, in unpack_file
    flatten=not filename.endswith('.whl')
  File "/opt/indico/.venv/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 505, in unzip_file
    zip = zipfile.ZipFile(zipfp, allowZip64=True)
  File "/usr/lib64/python2.7/zipfile.py", line 766, in __init__
    self._RealGetContents()
  File "/usr/lib64/python2.7/zipfile.py", line 807, in _RealGetContents
    raise BadZipfile, "File is not a zip file"
BadZipfile: File is not a zip file

Is this of any help (lets hope so).


#46

I never saw this error, but it sounds like the file it downloaded was corrupted.

Did you simply try running it again? If that doesn’t help, use rm -rf ~/.cache/pip to clear pip’s cache so it re-downloads everything.


#47

ok
cleared out cashe - fine
ran complete setup again - seemed to install ok with no errors

end of script below

  Building wheel for scandir (setup.py) ... done
  Stored in directory: /opt/indico/.cache/pip/wheels/91/95/75/19c98a91239878abbc7c59970abd3b4e0438a7dd5b61778335
  Building wheel for infinity (setup.py) ... done
  Stored in directory: /opt/indico/.cache/pip/wheels/b9/7a/91/cf9903933d1788bd68870c9b3d3b114909eb574f7f8c4b9a68
  Building wheel for pycparser (setup.py) ... done
  Stored in directory: /opt/indico/.cache/pip/wheels/f2/9a/90/de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511
Successfully built Markdown alembic terminaltables blinker WTForms-Components SQLAlchemy pytest-localserver translitcodec pyatom Flask-BabelEx pyPdf html2text pojson zope.interface colorclass simplejson termcolor PyYAML Mako billiard node-semver simplegeneric validators intervals speaklater functools32 pyrsistent scandir infinity pycparser
Installing collected packages: Markdown, six, webencodings, html5lib, lxml, itsdangerous, click, MarkupSafe, Jinja2, Werkzeug, Flask, SQLAlchemy, Mako, python-editor, python-dateutil, alembic, atomicwrites, pluggy, attrs, scandir, pathlib2, py, more-itertools, funcsigs, pytest, terminaltables, dnspython, idna, email-validator, pytz, billiard, vine, amqp, kombu, celery, redis, psycopg2, urllib3, chardet, certifi, requests, oauthlib, requests-oauthlib, pynpm, node-semver, pywebpack, pyparsing, packaging, blinker, backports.shutil-get-terminal-size, simplegeneric, enum34, ipython-genutils, decorator, traitlets, pygments, ptyprocess, pexpect, wcwidth, prompt-toolkit, pickleshare, ipython, ipaddress, WTForms, Flask-WTF, bleach, validators, infinity, intervals, WTForms-Components, pytest-localserver, coverage, pytest-cov, marshmallow, flask-marshmallow, translitcodec, pycparser, cffi, bcrypt, freezegun, qrcode, Flask-PluginEngine, marshmallow-enum, indico-fonts, Babel, marshmallow-sqlalchemy, Flask-Multipass, pyatom, speaklater, Flask-BabelEx, pbr, mock, pytest-mock, pyPdf, functools32, pyrsistent, jsonschema, pycountry, html2text, simplejson, webargs, Flask-SQLAlchemy, Flask-Migrate, polib, argparse, pojson, hiredis, zope.interface, icalendar, Pillow, reportlab, colorclass, Flask-OAuthlib, flask-webpackext, contextlib2, xlsxwriter, termcolor, PyYAML, indico
Successfully installed Babel-2.6.0 Flask-0.12.4 Flask-BabelEx-0.9.3 Flask-Migrate-2.4.0 Flask-Multipass-0.2.2 Flask-OAuthlib-0.9.5 Flask-PluginEngine-0.3.1 Flask-SQLAlchemy-2.3.2 Flask-WTF-0.14.2 Jinja2-2.10 Mako-1.0.9 Markdown-2.3.1 MarkupSafe-1.1.1 Pillow-5.4.1 PyYAML-5.1 SQLAlchemy-1.3.1 WTForms-2.2.1 WTForms-Components-0.10.3 Werkzeug-0.14.1 alembic-1.0.8 amqp-2.4.2 argparse-1.4.0 atomicwrites-1.3.0 attrs-19.1.0 backports.shutil-get-terminal-size-1.0.0 bcrypt-3.1.6 billiard-3.5.0.5 bleach-3.1.0 blinker-1.4 celery-4.2.1 certifi-2019.3.9 cffi-1.12.3 chardet-3.0.4 click-7.0 colorclass-2.2.0 contextlib2-0.5.5 coverage-4.5.3 decorator-4.4.0 dnspython-1.16.0 email-validator-1.0.3 enum34-1.1.6 flask-marshmallow-0.10.0 flask-webpackext-1.0.0 freezegun-0.3.11 funcsigs-1.0.2 functools32-3.2.3.post2 hiredis-1.0.0 html2text-2018.1.9 html5lib-1.0.1 icalendar-4.0.3 idna-2.8 indico-2.2.dev0+20190423.1332.df161ea indico-fonts-1.1 infinity-1.4 intervals-0.8.1 ipaddress-1.0.22 ipython-5.8.0 ipython-genutils-0.2.0 itsdangerous-1.1.0 jsonschema-3.0.1 kombu-4.4.0 lxml-4.3.2 marshmallow-3.0.0rc4 marshmallow-enum-1.4.1 marshmallow-sqlalchemy-0.16.1 mock-2.0.0 more-itertools-5.0.0 node-semver-0.6.1 oauthlib-2.1.0 packaging-19.0 pathlib2-2.3.3 pbr-5.1.3 pexpect-4.7.0 pickleshare-0.7.5 pluggy-0.9.0 pojson-0.7 polib-1.1.0 prompt-toolkit-1.0.16 psycopg2-2.7.7 ptyprocess-0.6.0 py-1.8.0 pyPdf-1.13 pyatom-1.4 pycountry-18.12.8 pycparser-2.19 pygments-2.3.1 pynpm-0.1.1 pyparsing-2.4.0 pyrsistent-0.14.11 pytest-4.3.1 pytest-cov-2.6.1 pytest-localserver-0.5.0 pytest-mock-1.10.1 python-dateutil-2.8.0 python-editor-1.0.4 pytz-2019.1 pywebpack-1.0.0 qrcode-6.1 redis-3.2.1 reportlab-3.5.13 requests-2.21.0 requests-oauthlib-1.1.0 scandir-1.10.0 simplegeneric-0.8.1 simplejson-3.16.0 six-1.12.0 speaklater-1.3 termcolor-1.1.0 terminaltables-3.1.0 traitlets-4.3.2 translitcodec-0.4.0 urllib3-1.24.2 validators-0.12.5 vine-1.3.0 wcwidth-0.1.7 webargs-5.2.0 webencodings-0.5.1 xlsxwriter-1.1.5 zope.interface-3.8.0
(.venv) [indico@centos ~]$ 
(.venv) [indico@centos ~]$ 
(.venv) [indico@centos ~]$ 
(.venv) [indico@centos ~]$ 

didn’t / haven’t left env

tried chrome from centos desktop - still get internal server error!

will try logging off / on again and restarting celery.service - which didnt start last time as stated in errors earlier


#48

Celery doesn’t really matter for this - except for periodic tasks and email sending everything in Indico works fine without celery (so while testing you can even leave it stopped).

Does indico shell show anything now?


#49

OK OK OK
Logged off and back in - made sure services were running
went via chrome and got indico up - will now check to see if my changes came across
also went into env and run indico shell - got prompt and a warning message about unknown config key ASSETS_DIR
will carrry on now - Thanks for all you have done and lets hope we DONT talk soon LOL :slight_smile:

[indico@centos root]$ source ~/.venv/bin/activate
(.venv) [indico@centos root]$ indico shell
/opt/indico/.venv/lib/python2.7/site-packages/indico/core/config.py:184: UserWarning: Ignoring unknown config key ASSETS_DIR
  warnings.warn('Ignoring unknown config key {}'.format(key))
Indico v2.2-dev+20190423.1332.df161ea is ready for your commands
In [1]: exirt
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-01d922c51ce1> in <module>()
----> 1 exirt

NameError: name 'exirt' is not defined

In [2]: quit
(.venv) [indico@centos root]$ 

#50

ASSETS_DIR was removed in 2.2, so you can remove that line from the config (you can also rm -rf the directory it points to).


#51

will do - thanks - AND my code changes have taken effect :slight_smile: