Skip to content

jan-fuchs-fuky/korel_rws

Repository files navigation

*** Curl examples ***

    $ curl --insecure -c /tmp/korel_rws.cookies -d "username=fuky&password=heslo" https://localhost/login

    $ cat /tmp/korel_rws.cookies 
    localhost   FALSE   /       FALSE   0       KorelAuthorizationKey   7ed09935-3edc-472c-b4e6-b484cf15dcea
    localhost   FALSE   /       FALSE   0       KorelUserName   fuky

    $ curl --insecure -b "KorelUserName=fuky; KorelAuthorizationKey=7ed09935-3edc-472c-b4e6-b484cf15dcea" -X GET https://localhost/jobs

   korel$ ssh -R 8000:localhost:8000 fuky@alioth
notebook$ ssh -L 8000:localhost:8000 fuky@alioth

$ curl -H "Accept: application/xml" -k https://127.0.0.1:8000

*** /opt/bin/korel ***

# aptitude install libf2c2

*** https://stelweb.asu.cas.cz/vo-korel ***

slon.stel# cat /etc/apache2/sites-enabled/all |grep 'ProxyPass.*korel.*'
ProxyPass         /vo-korel https://korel.stel:8000
ProxyPassReverse  /vo-korel https://korel.stel:8000

*** packages ***

# apt install imagemagick gnuplot apache2 libapache2-mod-wsgi

*** Python dependencies ***

Balicky z Debianu:

    # aptitude install python2.6 python2.6-minimal python-bcrypt python-imaging python-lxml

Podrobnosti:

    email => python2.6
    lxml => python-lxml
    optparse => python2.6-minimal
    StringIO => python2.6-minimal
    bcrypt => python-bcrypt
    ConfigParser => python2.6-minimal
    Image => python-imaging
    ImageDraw => python-imaging
    ImageFont => python-imaging
    logging => python2.6-minimal
    mimetypes => python2.6
    os => python2.6-minimal
    random => python2.6-minimal
    re => python2.6-minimal
    smtplib => python2.6
    subprocess => python2.6-minimal
    tempfile => python2.6-minimal
    traceback => python2.6-minimal
    urllib => python2.6
    uuid => python2.6

*** Spousteni ***

$ ln -s korel_rws-local.cfg korel_rws.cfg
$ KOREL_RWS_DIR=$PWD ./init.d/korel_scheduler start

*** Nastaveni Apache ***

# vim /etc/apache2/sites-available/korel-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
        ServerAdmin [email protected]
        
        ServerName localhost
        ServerAlias *.localhost
        DocumentRoot /home/fuky/svn/korel_rws/trunk
        
        WSGIDaemonProcess korel_rws user=fuky group=fuky processes=1 threads=2
        WSGIProcessGroup korel_rws
        WSGIApplicationGroup %{GLOBAL}
        WSGIScriptAlias / /home/fuky/svn/korel_rws/trunk/korel_rws.py
        
        <Directory /home/fuky/svn/korel_rws/trunk>
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

        SSLEngine on

        SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

        BrowserMatch "MSIE [2-6]" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

</VirtualHost>
</IfModule>

# aptitude install libapache2-mod-wsgi
# a2enmod wsgi
# a2enmod ssl
# a2ensite korel-ssl
# /etc/init.d/apache2 restart

*** Instalace CherryPy ***

POZOR: Musi se pouzit verze 3.1.2, protoze 3.2 je plna chyb.

# wget http://download.cherrypy.org/cherrypy/3.2.0/CherryPy-3.2.0.tar.gz
# tar zxf CherryPy-3.2.0.tar.gz
# cd CherryPy-3.2.0
# python2.6 setup.py build
# python2.6 setup.py install

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published