first indico workshop hands-on: install mobile alberto resco pérez 27-29 may 2013 cern
TRANSCRIPT
![Page 1: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/1.jpg)
First Indico Workshop
Hands-on: install MobileAlberto Resco Pérez
27-29 May 2013 CERN
![Page 2: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/2.jpg)
4 ThINGSThe Indico Hacker Toolkit
A shellPython (>=2.6)VirtualenvMongoDB
![Page 3: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/3.jpg)
Installing mongodb
$ sudo apt-get install mongodb
$ sudo brew install mongodb
![Page 4: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/4.jpg)
Creating the Virtualenv
$ virtualenv indicomobileInstalling distribute.............done.Installing pip...............done.
$ sudo apt-get install python-virtualenv
$ sudo brew install python$ sudo pip install virtualenv
![Page 5: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/5.jpg)
Activate virtualenv
$ cd indicomobile$ source ./bin/activate(indico-mobile)$
![Page 6: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/6.jpg)
Install – 1st step
(indico-mobile)$ git clone http://github.com/indico/indico-mobile srcCloning into 'src'......
Resolving deltas: 100% (962/962), done.(indico-mobile)$ cd src(indico-mobile)$ pip install -r requirements.txt
![Page 7: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/7.jpg)
Install – 2nd step – configure(indico-mobile)$ vim settings.confSERVER = 'localhost'SERVER_PORT = 8080DEBUG = FalseTIMEZONE = 'Europe/Zurich’CACHE_TTL = 3600CACHE_TYPE = 'filesystem'CACHE_DIR = '/tmp/mobilecache’MONGODB_DATABASE = 'indicomobile’SECRET_KEY = 'aaaaa’INDICO_URL = 'http://indico.cern.ch/’API_KEY = ’xxxxx’REQUEST_TOKEN_URL='http://indico.cern.ch/oauth.py/request_token'ACCESS_TOKEN_URL='http://indico.cern.ch/oauth.py/access_token'AUTHORIZE_URL='http://indico.cern.ch/oauth.py/authorize'CONSUMER_KEY='0rYfaVdoXAptxhyX4FzeqZasHvbE9R2zC5O71mbw'CONSUMER_SECRET='0Ke4vyfnhAyARYzUb8HYE4jQyZI9MWpEcdbXPbCQ'
:x
![Page 8: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/8.jpg)
Install – 3rd step – run DB
$ sudo service mongod start
$ mongod &
![Page 9: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/9.jpg)
Starting the Web ServerNote: This is a development server. Don’t use it in production!
Try it! http://localhost/
(indico-mobile)$ sudo python run.py* Running on http://localhost:8080/
![Page 10: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/10.jpg)
Login to indico mobile
![Page 11: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/11.jpg)
production
![Page 12: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/12.jpg)
Choose a good Web ServerApache? Nginx? We use uwsgi + supervisor + nginx
$ sudo easy_install supervisor uwsgi
$ sudo apt-get install nginx
$ sudo brew install nginx
![Page 13: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/13.jpg)
configurationMain configuration files you must check!
nginx.conf general configuration of nginxsupervisord.conf general configuration of supervisor
![Page 14: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/14.jpg)
Edit configuration files
$ vim /etc/supervisord.conf
$ vim /etc/nginx/nginx.conf
$ vim /usr/local/etc/nginx/nginx.conf
![Page 15: First Indico Workshop Hands-on: install Mobile Alberto Resco Pérez 27-29 May 2013 CERN](https://reader035.vdocuments.site/reader035/viewer/2022081514/5519d8be5503468b0c8b4a8b/html5/thumbnails/15.jpg)
Start the servers
$ sudo service supervisor start$ sudo service nginx start
$ sudo supervisord$ sudo nginx