1. Installation
*
Note:
- The following commands require root privileges and
Internet connection.
- Once the packages are installed, please log
out and back in again to complete the installation.
1.1 Debian-based distributions
1.1.1 Add package repository
No arch: wget http://compss.bsc.es/releases/repofiles/repo_deb_noarch.list -O /etc/apt/sources.list.d/pmes-framework_noarch.list
1.1.2 Add signing key
wget -qO - http://compss.bsc.es/repo/debs/deb-gpg-bsc-grid.pub.key | apt-key add -
1.1.3 Refresh repository
apt-get update
1.1.4 Install packages
apt-get install pmes-framework
1.1.5 Check Java environment
Select Java 7 as the principal JVM version (type: update-alternatives --config java)
1.2. RedHat-based distributions
1.2.1 Add package repository
No arch
(Suse) zypper addrepo -f http://compss.bsc.es/repo/rpms/stable/suse/noarch compss
(RHL, Centos) wget http://compss.bsc.es/releases/repofiles/repo_rpm_centos_noarch.repo -O /etc/yum.repos.d/pmes-framework_noarch.repo
1.2.2 Refresh package list
(Suse) zypper refresh
(RHL, Centos) Nothing to do
1.2.3 Install packages
(Suse) zypper install pmes-framework
(RHL, Centos) yum install pmes-framework
2. Configuration
2.1 Set pmes account password
sudo passwd pmes
su pmes
2.2 Create the PMES Service keystore
cd /opt/pmes-framework/pmes-service/certs/
keytool -genkey -alias your_client_alias -keyalg RSA -keystore /path/to/keystore_file
Example:
keytool -genkey
-alias pmes -keyalg RSA -keystore keystore
Enter keystore password: <somePassword> Re-enter new password: <somePassword>
What is your first and last name?
[Unknown]: pmes-service.bsc.es (Must be the hostname of the machine).
What is the name of your organizational unit?
[Unknown]: Computer Sciences
What is the name of your organization?
[Unknown]: Barcelona Supercomputing Center
What is the name of your City or Locality?
[Unknown]: Barcelona
What is the name of your State or Province?
[Unknown]: Spain
What is the two-letter country code for this unit?
[Unknown]: ES
Is CN=pmes-service.bsc.es, OU=Computer Sciences, O=Barcelona Supercomputing Center, L=Barcelona, ST=Spain, C=ES correct?
[no]: yes
Enter key password for pmes (RETURN if same as keystore password): [return]
Important: The key password must be the same as the keystore password.
2.3 Export your public certificate
cd /opt/pmes-framework/pmes-service/certs/
keytool -export -alias your_client_alias -keystore /path/to/keystore_file -file /path/to/certificate_file
Example:
keytool -export -alias pmes -keystore keystore -file pmes-cert.cer
Enter keystore password:
Certificate stored in file <pmes-cert.cer>
2.4 Setting keystore on Apache Tomcat
vi /opt/pmes-framework/pmes-service/apache-tomcat/conf/server.xml
In Tomcat server.xml configuration file add:
<Connector port="8443" SSLEnabled="true" maxThreads="150"
scheme="https" secure="true" clientAuth="false" sslProtocol="TLS"
keystoreFile="/opt/pmes-framework/pmes-service/certs/keystore"
keystorePass="<KeystorePassword>"/>
2.5 Configuring PMES
The PMES service can be configured editing the the /opt/pmes-framework/pmes-service/conf/PMESConfig.xml file.
2.5.1 Configuring the service
- The <Address> configures the service endpoint. Just replace the HOSTNAME by the actual machine name.
- The <Scheduler> points to the implementation class of the chosen scheduler. This scheduler is used to apply different policies into the jobs queue.
- The <MaxJobWallClock> refers to the maximum lifetime of a job, if it is exceeded, the job will be automatically cancelled.
- The <UpdateLogsTime> is the logs refresh frequency of a job.
- The <*ExpTime> the maximum time that a terminated job will remain on the database. If exceeded the job will be preserved into the accounting table.
Example:
<!-- PMES Configuration --> <PMES> <Address>https://HOSTNAME:8443/pmes/factory</Address> <Scheduler>com.bsc.pmes.jobmanager.jobscheduler.SJNScheduler</Scheduler> <!-- Max allowed time per job (minutes) --> <MaxJobWallClock>300</MaxJobWallClock> <!-- Update logs time (minutes) --> <UpdateLogsTime>1</UpdateLogsTime> <!-- Job expiration control (minutes) --> <FinishedExpTime>120</FinishedExpTime> <CancelledExpTime>120</CancelledExpTime> <FailedExpTime>120</FailedExpTime> <ExpCheckTime>5</ExpCheckTime> <!-- Jobs accounting (values: true/false) --> <Accounting>true</Accounting> </PMES>
2.5.2 Configuring the resources
The PMES resources section should be configured in order to allow the system to adquire virtual resources from cloud providers.
Configuring cloud providers
- The <Name> defines the name of the provider or institution offering the resources.
- The <Server> points to the cloud manager front-end server.
- The <Implementation> refers to the implementing class of the cloud connector. In the example the rOCCI (Ruby OCCI) will be used.
- The <Type> defines if a provider is the main one. If not it will be used as a backup one in case of exhausting the primary provider. (NOTE: There can only be one primary provider.)
Setting up <properties>: The properties section depends on chosen connector, and will be passed directly to the implementing class to be used internally by the connector logic. In the case of rOCCI connector we should define:
- The <templates> file where the virtual machine (VM) templates are defined. This templates will be also deployed on a requested VM under the <Deploy> path.
- The <auth> configures the authentication method used by the provider.
- The <ca-path> sets the path where the certificate CA has been installed.
- The <user-cred> is the user certificate on the provider.
- The <password> is the password of the certificate.
Example:
<!-- CLOUD Provider Configuration --> <Connectors> <!-- Main provider --> <Provider> <Name>BSC</Name> <Server>https://HOST:PORT/...</Server> <Implementation>com.bsc.pmes.connectors.rocci.ROCCI</Implementation> <!-- Main Provider will provide Master VMs --> <Type>main</Type> <Properties> <Property> <Name>templates</Name> <Value>/opt/pmes-framework/pmes-service/templates/.../MyTEMPLATE.xml</Value> <Deploy>/home/user/certs/</Deploy> </Property> <Property> <Name>auth</Name> <Value>x509</Value> </Property> <Property> <Name>ca-path</Name> <Value>/etc/grid-security/certificates</Value> </Property> <Property> <Name>user-cred</Name> <Value>/opt/pmes-framework/pmes-service/certs/.../MyCERT.pem</Value> <Deploy>/home/user/certs/</Deploy> </Property> <Property> <Name>password</Name> <Value>MyPASSWORD</Value> </Property> </Properties> </Provider> <!-- Extra provider (if cloud bursting needed) --> <Provider> <Name>MyPROVIDER</Name> <Server>https://HOST:PORT/...</Server> <Implementation>any.cloud.api.ImplClass</Implementation> <Properties> ... </Properties> </Provider> </Connectors>
Defining deployment details
- The <User> specifies the user to access the virtual machine.
- The <MaxVMCreationTime> sets the maximum time that a virtual resource could take to boot up. If the time exceeds the maximum the system will assume a failure on the VM creation.
- The <DeploymentPath> is the path where the applications will be deployed into the virtual resources.
- The <WorkingDir> is the path where the application data will be temporarily stored during the execution. The directory could be shared by NFS, or any DFS clients.
Example:
<User>user</User> <!-- Maximum allowed VM creation time in minutes --> <MaxVMCreationTime>10</MaxVMCreationTime> <!-- Applications deploy path on provider VM --> <DeploymentPath>/home/user/apps</DeploymentPath> <!-- Working directory on virtual instances (could be shared storage) --> <WorkingDir> <Path>/sharedDisk</Path> <Shared>true</Shared> </WorkingDir>
Configuring system capabilities
- The <StaticPool> section allows to define a pool of static machines created from a specific template and specs in the main provider. It speeds up the job deployment time (optional).
- The <MaxCores> and <MaxMemory> sets the maximum CPU and Memory quota that a user has granted.
Example:
<Resources> <!-- Defines a pool of pre-started VMs speeding up job submissions --> <StaticPool> <Resource image="VIRTUALAPPLIANCEIMAGE"> <Instances>2</Instances> <CPU>1</CPU> <MEM>2.0</MEM> <Disk>1.0</Disk> <Arch>x86_64</Arch> </Resource> </StaticPool> <!-- Maximum of system cores --> <MaxCores>44</MaxCores> <!-- Maximum of system memory --> <MaxMemory>112</MaxMemory> </Resources>
2.5.3 Setting COMP Superscalar configuration
Configuring COMPSs settings
- This section will configure the details of the COMPSs installation on the virtual machines.
Example:
<!-- COMP Superscalar configuration --> <COMPSs> <Location>/opt/COMPSs/Runtime</Location> <!-- Choose the proper COMPSs cloud connector --> <Connector>integratedtoolkit.connectors.rocci.ROCCI</Connector> <WorkingDir>/home/user/IT</WorkingDir> <!-- COMPSs job monitoring frequency (seconds) --> <MonitorFreq>3</MonitorFreq> </COMPSs>
Defining COMPSs custom Master VM (Optional)
- If the section is not defined, the same VM template will be used for whole job resources.
Example:
<!-- Custom definition of COMPSs Master VMs --> <Master> <CPU>4</CPU> <MEM>4.0</MEM> <Disk>1.0</Disk> <Arch>x86_64</Arch> </Master>
Defining Web Service resources on COMPSs (Optional)
- A set of web-services could be defined in this section to be used within a COMPSs application. The configuration will be injected on-the-fly into the COMPSs runtime.
<!-- COMPSs Web service resources --> <Services> <Service> <Name>HmmerObjects</Name> <WSDL>http://HOSTNAME:PORT/servicepath?wsdl</WSDL> <Namespace>http://hmmerobj.worker</Namespace> <Port>HmmerObjectsPort</Port> <Tasks>3</Tasks> </Service> </Services>
2.5.4 Configuring storage adaptors
- This <ADAPTORS> section defines a protocol → adaptor mapping. It links each supported storage protocol with its respective adaptor implementation, that manages the data transfers.
<!-- Storage adaptors protocol map --> <ADAPTORS> <Adaptor> <Protocol>ftp</Protocol> <Implementation>com.bsc.pmes.jobmanager.datastager.FTPDataStager</Implementation> </Adaptor> <Adaptor> <Protocol>http</Protocol> <Implementation>com.bsc.pmes.jobmanager.datastager.CDMIDataStager</Implementation> </Adaptor> <Adaptor> <Protocol>gcubestorage</Protocol> <Implementation>com.bsc.pmes.jobmanager.datastager.GStorageDataStager</Implementation> </Adaptor> ... </ADAPTORS>
2.5.5 Configuring cloud provider templates
NOTE: The templates should be defined in ascending order, i.e: tiny, small, medium, large, extra-large, huge).
In order to map machine specifications into provider templates, PMES uses the: templates provider file, found on the /opt/pmes-framework/pmes-service/templates/PROVIDER_NAME.xml
<Templates> <Instance> <Type>small</Type> <CPU>1</CPU> <Memory>2.0</Memory> <Disk>5.0</Disk> <Price>0.085</Price> </Instance> <Instance> ... </Instance> ... <!-- Estimated VM creation time (in seconds) --> <EstimatedCreationTime>120</EstimatedCreationTime> </Templates>
2.6 Using PMES
2.6.1 Starting the service
/etc/init.d/pmes-framework (start | stop | restart)
2.6.2 Job submission
Graphical User Interface:
- https://localhost:8443/pmes
- The administrator user is: admin and the default password is 1234, it is highly recommendable to change it ASAP.
Web-Service endpoint:
- https://localhost:8443/pmes/factory
2.6.3 Managing PMES database
The PMES service comes with a management script named pmes-db. This script allow to manage the system database allowing to: backup, restore, purge and show database tables.
NOTE: It is highly recomendable to backup periodically system database. To do so, a CRON job executing a pmes-db -b command should be configured at convenience.
2.6.4 System logs
/opt/pmes-framework/pmes-service/logs/pmes-compss.log
/opt/pmes-framework/pmes-service/apache-tomcat/logs/catalina.out (verbose)
2.6.5 Job logs
/opt/pmes-framework/pmes-service/tmp/JOBNAME_JOBID_.[log|out|err]
3. Additional information
3.1 Using the OCCI (Open Cloud Computing Interface) connector
The OCCI connector uses the rOCCI binary client inplementation (v4.2.5 or newer) which has to be properly installed into the PMES service machine and in any virtual appliance where COMPSs will run.
To install the client follow the instructions detailed at http://appdb.egi.eu/store/software/rocci.cli
NOTE: In case of finding any issue during the installation process do not hesitate to contact us at out support mailing list. To join send an e-mail to support-compss-join@bsc.es