Skip to content

Commit

Permalink
Merge branch 'master' of github.com:CCSI-Toolset/turb_client
Browse files Browse the repository at this point in the history
  • Loading branch information
ksbeattie committed Jan 27, 2018
2 parents eded62f + f09d2d2 commit d2a5d55
Showing 1 changed file with 80 additions and 174 deletions.
254 changes: 80 additions & 174 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,200 +1,66 @@
# turb_client
**Turbine Client** - Tools for communicating with the Turbine Gateway
Python package and utility scripts for communicating with the Turbine Science Gateway Web API, consisting of five Web JSON RESTful interfaces for Application, Session, Job, Simulation, and Consumer.

## Development Practices

* Code development will be peformed in a forked copy of the repo. Commits will not be
made directly to the repo. Developers will submit a pull request that is then merged
by another team member, if another team member is available.
* Each pull request should contain only related modifications to a feature or bug fix.
* Sensitive information (secret keys, usernames etc) and configuration data
(e.g database host port) should not be checked in to the repo.
* A practice of rebasing with the main repo should be used rather that merge commmits.

## Getting Started

Clone the repo

git clone https://github.com/CCSI-Toolset/turb_client.git

Build the distribution

make

For further instructsion on installation look at [README.txt](README.txt).



## Authors

* Josh Boverhof

See also the list of [contributors](https://github.com/CCSI-Toolset/turb_client/contributors) who participated in this project.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available,
see the [tags on this repository](https://github.com/CCSI-Toolset/turb_client/tags).

## License & Copyright

See [LICENSE.md](LICENSE.md) file for details
## List of Web Resources
* Application: The applications available on the Gateway, this should be a subset of foqus, AspenPlus/ACM, gPROMS, Excel.
* Simulation: In a "simulation" description the application is specified (eg. foqus), a set of staged input files are provided and a list of expected staged output files. A "simulation" description must specify one of the application from above.
* Job: A unit of work, which specifies a simulation, and potentially several input parameters.
* Session: A session is a group of jobs that can be submitted, executed, and monitored together.
* Consumer: The consumer resource provides descriptions of all the workers available to process job requests.

## Installation

The turbine python module comes with a handy setup script that should install
everything you need to run turbine and FOQUS. There are multiple options
for installation. Please select the option that matches your needs. Please
report any failures to Jim Leek [email protected]

If you are installing for multiple users and have root privledges, use this command:

% python setup.py install

But if you are only installing for yourself, or do not have root, try:

% python setup.py install --user

If you are a developer (that is, you will make changes to turbine) and have root:

% python setup.py develop

If you are developer and do not have root, this will probably work:

% python setup.py develop --prefix=~/.local


NOTE: For the develop installs you may need to create a directory. If you get an error
like this (inside the quotes):
"""""""""""""""""""""""""""""""""""
[Errno 2] No such file or directory: '$HOME/.local/lib/python2.7/site-packages/test-easy-install-1299.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

$HOME/.local/lib/python2.7/site-packages

This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
"""""""""""""""""""""""""""""""""""

simply create the directory suggested, like so:
mkdir -p $HOME/.local/lib/python2.7/site-packages


If none of those work, you will have to do the install manually. First download
and install these Python modules. Instructions for doing so are in the
"Dependencies" section.

dateutil: version == 1.5
ntlm: version >= 1.0.1 (Only tested with 1.0.1)

Then set your PYTHONPATH to the current directory. (This will pick up
turbine. If you simply set it on the command line like this, you will need to set
it again everytime you log in and want to run turbine.)

% export PYTHONPATH=$PWD:$PYTHONPATH
% python setup.py install

Finally put the scripts directory in on your PATH.
To install for only the current user (no root):

% export PATH=$PWD/scripts:$PATH


## Extras

The 'turbine_session_graphs' script utilizes the python rpy2 module, which requires
R and the ggplot2 package.

1) install R (Mac OS, Windows, Linux)

http://cran.cnr.berkeley.edu/

2) install ggplot2
% R
> install.packages("ggplot2")
3) install rpy2 python module
% easy_install rpy2

## Dependencies

If setup.py worked correctly, you do not need to worry about these dependencies,
they have already been installed. If it failed, follow the directions to
installal manually. You need root priledges for these procedures.

1) dateutil

DEBIAN:
% apt-get install python-dateutil
SETUPTOOLS:
% easy_install dateutil

2) ntlm

DEBIAN:
% apt-get install python-ntlm
SETUPTOOLS:
% easy_install ntlm
% python setup.py install --user


## Running turbine scripts

1) Copy Template configuration file
1. Copy Template configuration file

* Localhost deployment copy 'config.txt.in' to 'config.txt'
* Gateway Configuration Template copy 'config_turbine.acceleratecarboncapture.txt.in' to 'config.txt'

2) Section Authentication: Add your credentials to Username/Password.

[Authentication]
username=test1
password=qwerty
2. Section Authentication: Modify with your credentials.

* Note to utilize 'localhost' you will need to contact '[email protected]' and
request credentials.
[Authentication]
username=test1
password=qwerty

* Note Windows authentication via the "python NTLM" you need to include a domain with the username.
Examples:
.\Administrator
MACHINE_NAME\Administrator
3. Security Section: Add or Remove the trusted certificate authorities.

2) Security Section: Add or Remove the trusted certificate authorities.

[Security]
TrustedCertificateAuthorities=cacerts.txt
[Security]
TrustedCertificateAuthorities=cacerts.txt

* To disable server certificate verification remove the 'Security' section
-- NOTE: IIS 7.5 self-signed certificates will not pass verification because the X509v3 Basic Constraints CA
bit is not set to TRUE.

* option 'TrustedCertificateAuthorities' is a file containing all the trusted CA certificates. Included
in this distribution is the CA for use with 'localhost'.
-- NOTE: It's a good idea to change the relative path to the absolute file path.

3) Web Resource Sections:

[Consumer]
url=https://localhost:8080/Turbine/consumer/
[Job]
url=https://localhost:8080/Turbine/job/
[Simulation]
url=https://localhost:8080/Turbine/simulation/
name=mea-uq-billet-1
[Session]
url=https://localhost:8080/Turbine/session/
[Application]
url=https://localhost:8080/Turbine/application/

* Edit the 'url' option as necessary
% turbine_session_list config.txt
[]
** NOTE: IIS 7.5 self-signed certificates will not pass verification because the X509v3 Basic Constraints CA bit is not set to TRUE.

* option 'TrustedCertificateAuthorities' is a file containing all the trusted CA certificates. Included in this distribution is the CA for use with 'localhost'.
** NOTE: It's a good idea to change the relative path to the absolute file path.

4. Web Resource Sections (example for local deployment):

[Consumer]
url=https://localhost:8080/Turbine/consumer/
[Job]
url=https://localhost:8080/Turbine/job/
[Simulation]
url=https://localhost:8080/Turbine/simulation/
name=mea-uq-billet-1
[Session]
url=https://localhost:8080/Turbine/session/
[Application]
url=https://localhost:8080/Turbine/application/
5. Test get the session list ( GET /Turbine/session ):

3) Logging

[Logging]
fileConfig=logging.conf
% turbine_session_list config.txt
[]


## Integration Tests
Expand All @@ -217,3 +83,43 @@ installal manually. You need root priledges for these procedures.
% python suites/acm_test_suite.py
% python suites/aspenplus_test_suite.py
% python suites/excel_test_suite.py
## Extras

The 'turbine_session_graphs' script utilizes the python rpy2 module, which requires R and the ggplot2 package. You probably don't want this.

1. install R (Mac OS, Windows, Linux)

http://cran.cnr.berkeley.edu/

2. install ggplot2

% R
> install.packages("ggplot2")

3. install rpy2 python module

% easy_install rpy2

## Development Practices

* Code development will be peformed in a forked copy of the repo. Commits will not be
made directly to the repo. Developers will submit a pull request that is then merged
by another team member, if another team member is available.
* Each pull request should contain only related modifications to a feature or bug fix.
* Sensitive information (secret keys, usernames etc) and configuration data
(e.g database host port) should not be checked in to the repo.
* A practice of rebasing with the main repo should be used rather that merge commmits.

## Authors

* Josh Boverhof
* See also the list of [contributors](https://github.com/CCSI-Toolset/turb_client/contributors) who participated in this project.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/CCSI-Toolset/turb_client/tags).

## License & Copyright

See [LICENSE.md](LICENSE.md) file for details

0 comments on commit d2a5d55

Please sign in to comment.