Deployment process from DEV to PROD VM



I have both a development VM and a production VM (built as per installation guide)

One of the processes that we run on development when we start the application up is

./bin/maintenance/ indico --dev --watch (as per guide)

Within the local codebase on the development VM I have changed some code, and by restarting the application we can see the effects of our changes.

Can you please advise on what I need to do to copy from my development VM to my production VM (and where to place it) to allow me to port my changes from dev to prod.

I assume an rpm will need to be built / is being built? – can you please advice on any processes I need to undertake on dev VM as well to prepare the code for prod.

As you can tell, I am new to working both with Indico and the linux environment.

Also please note that when I say prod, we are of course gong via UAT first, but this has been configured just as out production VM has.


Buiild a wheel using ./bin/maintenance/ indico and install that on the production machine using pip install indico-*.whl

Some useful commandline arguments of this script:

  --no-assets           skip building assets
  --add-version-suffix  Add a local suffix (+yyyymmdd.hhmm.commit) to the

I would recommend you to use --add-version-suffix so each build has an increasing version number; that way you can easily install a later wheel the same way to update.


Tried above and got errors

[indico@centos indico]$ cd src
[indico@centos src]$ ./bin/maintenance/ indico 

Error: Invalid value for "--target-dir" / "-d": Directory "dist/" does not exist.
[indico@centos src]$ pwd
[indico@centos src]$ mkdir dist
[indico@centos src]$ ./bin/maintenance/ indico 
Traceback (most recent call last):
  File "./bin/maintenance/", line 334, in <module>
  File "/usr/lib/python2.7/site-packages/click/", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "./bin/maintenance/", line 250, in build_indico
    clean, output = git_is_clean_indico()
  File "./bin/maintenance/", line 119, in git_is_clean_indico
    toplevel = list({x.split('.')[0] for x in find_packages(include=('indico', 'indico.*',))})
TypeError: find_packages() got an unexpected keyword argument 'include'


Seems to be a setuptools version issue. Can you check what version you are using?


setuptools (40.8.0) - got this from pip list


Can you just make sure that it is the case by running:

python -c "import setuptools;print setuptools.__version__"


env) [indico@centos indico]$
(env) [indico@centos indico]$ python -c “import setuptools;print setuptools.version
(env) [indico@centos indico]$


Sorry, I meant:

env python -c "import setuptools;print setuptools.__version__"


I notice last time i didnt run the build within the ‘env’ - do you want me to try that?


(env) [indico@centos indico]$ env python -c “import setuptools;print setuptools.version
(env) [indico@centos indico]$


Try to run the script while having the virtualenv active.

And maybe double-check and run env python -c "import setuptools;print setuptools.__version__" outside of the virtualenv.


yep - that was the issue!!!

On my ‘prod’ machine where do i go to install it (directory wise) or is it just from default root dir?

(env) [indico@centos src]$ ./bin/maintenance/ indico
Error: working tree is not clean
 indico/core/                        | 3 ++-
 indico/web/client/styles/partials/_main.scss | 4 ++--
 indico/web/templates/footer.html             | 7 +++++++
 3 files changed, 11 insertions(+), 3 deletions(-)

but go nothing in my dist dir - where is the wheel file I need to copt ?


As the error message states

Error: working tree is not clean

you should either commit all changes or pass --ignore-unclean as an argument to the script.


many thanks - owe you a beer sometime - it is doing loads more now - should be OK, will see how i get on.


on my prod VM, I have inported my wheel file and run the pip command from /opt/indico (I created an env) but it seems to have messed everything up - didnt save the log!! -was that the correct folder to run it from?


the folder doesn’t matter as long as the virtualenv is active