<commit_before>This file documents how to install and run the gcf package.

See README.txt for details on the usage of the gcf package.

Omni users may start here to ensure software dependencies are met.


1) Software Dependencies
========================

Details on required packages:

1. Python M2Crypto package

  The M2Crypto package provides utilities for handling X.509
  certificates and SSL connections. M2Crypto is required by the
  certificate class in sfa/trust. M2Crypto should be readily available
  on most Linux distributions.

  More information is available at:
    http://chandlerproject.org/bin/view/Projects/MeTooCrypto

2. Python dateutil package

  The dateutil package provides date parsing routines to Python. It
  should be readily available on most Linux distributions.

  More information is available at:
    http://labix.org/python-dateutil

3. Python OpenSSL package

  The OpenSSL package provides a python API to the OpenSSL
  package. There is an implicit dependency on OpenSSL, but that
  should be handled by the Linux package manager (yum, apt, etc.)

  More information is available at:
    https://launchpad.net/pyopenssl

4. xmlsec1 package

  The XML Security Library provides implementations of XML Digital
  Signatures (RFC 3275) and W3C XML Encryption. The program xmlsec1
  from this package is used to sign credentials.  

  On rpm systems the required packages are 
     	 xmlsec1
	 xmlsec1-openssl-devel

  On debian systems the packages are 
     	 libxmlsec1
	 xmlsec1
	 libxmlsec1-openssl
	 libxmlsec1-dev

  More information is available at:
    http://www.aleksey.com/xmlsec/
    http://www.w3.org/TR/xmlenc-core/
    http://www.ietf.org/rfc/rfc3275.txt


2) Platform Installation
========================

The GCF package is intended to be run on a modern Unix distribution
(circa 2010 or 2009). Python 2.6 is required. This software is not
Python 3 compatible.

This software requires a number of readily available software
packages. Most modern Linux distributions should have these packages
available via their native package management suite (eg. yum or apt).


Debian/Ubuntu
-------------
sudo apt-get install python-m2crypto python-dateutil \
                     python-pyopenssl libxmlsec1 xmlsec1 \
                     libxmlsec1-openssl libxmlsec1-dev


RedHat/Fedora
-------------
sudo yum install m2crypto python-dateutil pyOpenSSL xmlsec1 \
                 xmlsec1-devel xmlsec1-openssl xmlsec1-openssl-devel


CentOS
------
Please see INSTALL.centos


MAC OS X
--------
You must have macports already installed.

  % sudo port install py26-m2crypto py26-dateutil py26-openssl xmlsec
  % cd /opt/local/lib
  % sudo ln -s libxmlsec1-openssl.dylib libxmlsec1-openssl.so

In each terminal that you wish to run GCF, run this command first for
xmlsec1:

  % export DYLD_LIBRARY_PATH=/opt/local/lib


Windows/Cygwin
--------------
The necessary libraries are likely available but we have no experience
running in this environment.


3) Test Run
===========
Here is a 4 step test install of this software. Full usage instructions 
for each step are in README.txt

1. Copy gcf_config into place.

   In terminal one:
     $ cd $GCF
     $ cp gcf_config.sample gcf_config

   Optional: Edit gcf_config if you want to change settings from the default 
   For a test run edits are not needed.

2. Create certificates and run the GENI Clearinghouse

  In terminal one:
    $ python src/gen-certs.py
    $ python src/gcf-ch.py

3. Run the GENI Aggregate Manager in a second terminal:
    $ python src/gcf-am.py

4. Run the gcf client test script in a third terminal window:
    $ python src/gcf-test.py 


You should see output like this:

$ python src/gcf-test.py 
INFO:gcf-test:CH Server is https://localhost:8000/. Using keyfile /home/jkarlin/.gcf/alice-key.pem, certfile /home/jkarlin/.gcf/alice-cert.pem
INFO:gcf-test:AM Server is https://localhost:8001/. Using keyfile /home/jkarlin/.gcf/alice-key.pem, certfile /home/jkarlin/.gcf/alice-cert.pem
Slice Creation SUCCESS: URN = urn:publicid:IDN+geni:gpo:gcf+slice+1468-659:127.0.0.1%3A8000
Testing GetVersion... passed
Testing ListResources... passed
Testing CreateSliver... passed
Testing SliverStatus... passed
Testing ListResources... passed
Testing RenewSliver... passed. (Result: False)
Testing DeleteSliver... passed<commit_msg>add a period<commit_after>This file documents how to install and run the gcf package.

See README.txt for details on the usage of the gcf package.

Omni users may start here to ensure software dependencies are met.


1) Software Dependencies
========================

Details on required packages:

1. Python M2Crypto package

  The M2Crypto package provides utilities for handling X.509
  certificates and SSL connections. M2Crypto is required by the
  certificate class in sfa/trust. M2Crypto should be readily available
  on most Linux distributions.

  More information is available at:
    http://chandlerproject.org/bin/view/Projects/MeTooCrypto

2. Python dateutil package

  The dateutil package provides date parsing routines to Python. It
  should be readily available on most Linux distributions.

  More information is available at:
    http://labix.org/python-dateutil

3. Python OpenSSL package

  The OpenSSL package provides a python API to the OpenSSL
  package. There is an implicit dependency on OpenSSL, but that
  should be handled by the Linux package manager (yum, apt, etc.)

  More information is available at:
    https://launchpad.net/pyopenssl

4. xmlsec1 package

  The XML Security Library provides implementations of XML Digital
  Signatures (RFC 3275) and W3C XML Encryption. The program xmlsec1
  from this package is used to sign credentials.  

  On rpm systems the required packages are 
     	 xmlsec1
	 xmlsec1-openssl-devel

  On debian systems the packages are 
     	 libxmlsec1
	 xmlsec1
	 libxmlsec1-openssl
	 libxmlsec1-dev

  More information is available at:
    http://www.aleksey.com/xmlsec/
    http://www.w3.org/TR/xmlenc-core/
    http://www.ietf.org/rfc/rfc3275.txt


2) Platform Installation
========================

The GCF package is intended to be run on a modern Unix distribution
(circa 2010 or 2009). Python 2.6 is required. This software is not
Python 3 compatible.

This software requires a number of readily available software
packages. Most modern Linux distributions should have these packages
available via their native package management suite (eg. yum or apt).


Debian/Ubuntu
-------------
sudo apt-get install python-m2crypto python-dateutil \
                     python-pyopenssl libxmlsec1 xmlsec1 \
                     libxmlsec1-openssl libxmlsec1-dev


RedHat/Fedora
-------------
sudo yum install m2crypto python-dateutil pyOpenSSL xmlsec1 \
                 xmlsec1-devel xmlsec1-openssl xmlsec1-openssl-devel


CentOS
------
Please see INSTALL.centos


MAC OS X
--------
You must have macports already installed.

  % sudo port install py26-m2crypto py26-dateutil py26-openssl xmlsec
  % cd /opt/local/lib
  % sudo ln -s libxmlsec1-openssl.dylib libxmlsec1-openssl.so

In each terminal that you wish to run GCF, run this command first for
xmlsec1:

  % export DYLD_LIBRARY_PATH=/opt/local/lib


Windows/Cygwin
--------------
The necessary libraries are likely available but we have no experience
running in this environment.


3) Test Run
===========
Here is a 4 step test install of this software. Full usage instructions 
for each step are in README.txt

1. Copy gcf_config into place.

   In terminal one:
     $ cd $GCF
     $ cp gcf_config.sample gcf_config

   Optional: Edit gcf_config if you want to change settings from the default.
   For a test run edits are not needed.

2. Create certificates and run the GENI Clearinghouse

  In terminal one:
    $ python src/gen-certs.py
    $ python src/gcf-ch.py

3. Run the GENI Aggregate Manager in a second terminal:
    $ python src/gcf-am.py

4. Run the gcf client test script in a third terminal window:
    $ python src/gcf-test.py 


You should see output like this:

$ python src/gcf-test.py 
INFO:gcf-test:CH Server is https://localhost:8000/. Using keyfile /home/jkarlin/.gcf/alice-key.pem, certfile /home/jkarlin/.gcf/alice-cert.pem
INFO:gcf-test:AM Server is https://localhost:8001/. Using keyfile /home/jkarlin/.gcf/alice-key.pem, certfile /home/jkarlin/.gcf/alice-cert.pem
Slice Creation SUCCESS: URN = urn:publicid:IDN+geni:gpo:gcf+slice+1468-659:127.0.0.1%3A8000
Testing GetVersion... passed
Testing ListResources... passed
Testing CreateSliver... passed
Testing SliverStatus... passed
Testing ListResources... passed
Testing RenewSliver... passed. (Result: False)
Testing DeleteSliver... passed
{'fraction_non_alphanumeric': 0.08645101876366985, 'fraction_numerical': 0.021641533325659032, 'mean_word_length': 3.315946348733234, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 6, 'xml': 44}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1485015', 'n_tokens_mistral': 2723, 'n_tokens_neox': 2499, 'n_words': 997}