Difference between revisions of "Fedcloud-tf:WorkGroups:Scenario4"

From EGIWiki
Jump to: navigation, search
(Cloud Accounting Usage Record)
(Redirected page to Federated Cloud Accounting)
 
(70 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Fedcloud-tf:Menu}} {{Fedcloud-tf:WorkGroups:Menu}} {{TOC_right}}
+
#REDIRECT[[Federated_Cloud_Accounting]]
 
 
== Scenario 4: Accounting across Resource Providers ==
 
 
 
<font color="red">Leader: Alison Packer and John Gordon, STFC</font>
 
 
 
== Scenario collaborators ==
 
{| border="1"
 
!Role
 
!Institution
 
!Name
 
|-
 
|Scenario leader
 
|STFC
 
|Alison Packer
 
|-
 
|Collaborator
 
| OeRC
 
| Matteo Turilli
 
|-
 
|Collaborator
 
| BSC
 
| Daniele Lezzi
 
|}
 
 
 
== Plan ==
 
To account for resource usage across multiple resource providers we need to define:
 
 
 
# the elements to be accounted for and how accounting data may be gathered. (This relates to the statement  “Resource providers agree and follow the same rules for accounting the resource usage”.)
 
# how accounting data will be published
 
# what is required from this data (for VM users, Resource Providers, VO Managers, others?)
 
 
 
== Cloud Accounting Usage Record ==
 
The current version of the Cloud Accounting Usage Record is here: [https://oerc.basecamphq.com/projects/7732005/file/125408455/Current%20Version-CloudAccountingUR.pdf Draft Cloud Accounting Usage Record]
 
 
 
A new version is under discussion, further information is here: [https://oerc.basecamphq.com/projects/7732005/file/149644970/New-CloudAccountingUR.pdf Proposed New Cloud Accounting Usage Record]
 
 
 
==== Previous versions ====
 
This draft schema attempts to map the Cloud Accounting Usage Record fields to fields used by Venus-C and OpenNebula.
 
[https://oerc.basecamphq.com/projects/7732005/file/115587067/Draft-CloudAccountingUR-v3.pdf Version 3 - Cloud Accounting Usage Record]
 
 
 
[https://oerc.basecamphq.com/projects/7732005/file/115133635/Draft%20-%20CloudAccountingUR-v2.pdf Version 2 - Cloud Accounting Usage Record]
 
 
 
[https://oerc.basecamphq.com/projects/7732005/file/105129409/Draft-CloudAccountingUsageRecord-v1.pdf Version 1 - Cloud Accounting Usage Record]).
 
 
 
==== Compute Accounting Record ====
 
To help define what we will account for the existing [https://twiki.cern.ch/twiki/pub/EMI/ComputeAccounting/CAR-EMI-tech-doc-0.8.doc Compute Accounting Record] has been used.
 
 
 
== Publishing Cloud Accounting Records ==
 
 
 
 
 
==== Cloud Accounting System ====
 
The software and technology choices for the new APEL system (which receives compute accounting records) will be used to provide a ‘testbed’ so that the resource providers can send records to a Cloud Accounting System at STFC.  The software is written in Python and the data is stored in a MySQL database, the component parts of the system are:
 
 
 
# SSM
 
# Record loader
 
# MySQL Database
 
 
 
More detail available in the Cloud Accounting System document here:
 
[https://oerc.basecamphq.com/projects/7732005/file/111685266/The%20Cloud%20Accounting%20System.pdf Cloud Accounting System]
 
 
 
==== Publishing Records ====
 
===== OpenNebula resource providers =====
 
Records may be retrieved from OpenNebula databases using the cloudacc script from [https://github.com/EGI-FCTF/opennebula-cloudacc EGI-FCTF/opennebula-cloudacc] which creates a file in the message format which can be sent using the SSM.
 
 
 
Current stable version: 3.8.1-2
 
  https://github.com/EGI-FCTF/opennebula-cloudacc/archive/3.8.1-2.tar.gz
 
  https://github.com/EGI-FCTF/opennebula-cloudacc/archive/3.8.1-2.zip
 
 
 
===== Openstack resource providers =====
 
# Install the software
 
# Check out the doc (man osssmrc)
 
# Edit /etc/osssmrc
 
# activate the osssm service
 
 
 
Resources:
 
* '''[ftp://ftp.in2p3.fr/ccin2p3/egi-acct-osdriver/apel-ssm-openstack binary packages for RHEL and Debian based systems]'''
 
* '''[https://github.com/EGI-FCTF/osssm/wiki Installation documentation]'''
 
* '''[https://github.com/EGI-FCTF/osssm/blob/master/changelog Changelog]'''
 
* '''[https://github.com/EGI-FCTF/osssm osssm sources (Github)]'''.
 
 
 
===== SSM Package for publishing records =====
 
 
 
A new version of the SSM client package can be retrieved from here: [https://oerc.basecamphq.com/projects/7732005/file/134129656/clientssm-1.2-2.noarch.rpm]  It requires configuration and the short description of how to install and setup the new version is here: [https://oerc.basecamphq.com/projects/7732005/file/134129793/SSMClient-setup2.pdf]
 
 
 
===== Terminology: =====
 
 
 
* A message is one file which is sent and received by the SSM. Usually a message will contain a number of records (eg 1000)
 
* A record corresponds to one row in the database. It contains a number of key-value pairs as specified in the table below
 
* The header in each message tells the server which type of records are in that message. You need one header per message, so one header per file.
 
 
 
== Cloud Accounting Message Format ==
 
'''Header''' APEL-cloud-message: v0.1
 
 
 
{| cellspacing="1" cellpadding="1" border="1" width="650"
 
! scope="col" | Key
 
! scope="col" | Value
 
! scope="col" | Description
 
! scope="col" | Mandatory
 
|-
 
| RecordId     || string || Current time + SiteName + MachineName            || Yes
 
|-
 
| SiteName          || string || Sitename, e.g. GOCDB Sitename                    || Yes
 
|-
 
| ZoneName          || string || Location, e.g. EU, AM, AP                        ||
 
|-
 
| MachineName      || string || VM Id                                            || Yes
 
|-
 
| LocalUserId      || string || Local username                                    ||
 
|-
 
| LocalGroupId      || string || Local groupname                                  ||
 
|-
 
| GlobalUserName    || string || User's X509 DN                                    ||
 
|-
 
| FQAN              || string || User's VOMS attributes                            ||
 
|- 
 
| Status            || string || Completion status - started, completed, suspended ||
 
|-
 
| StartTime        || int    || Must be set if Status = Started (epoch time)      ||
 
|-
 
| EndTime          || int    || Must be set if Status = completed (epoch time)    ||
 
|-
 
| SuspendTime      || int    || Set when Status = suspended (epoch time)          ||
 
|-
 
| TimeZone          || string || Time Zone                                        ||
 
|-
 
| WallDuration      || int    || Wallclock - actual time used (seconds)            ||
 
|-
 
| CpuDuration      || int    || CPU time consumed  (seconds)                      ||
 
|-
 
| CpuCount          || int    || Number of CPUs allocated                          ||
 
|-
 
| NetworkType      || string ||                                                  ||
 
|-
 
| NetworkInbound    || int    || GB received                                      ||
 
|-
 
| NetworkOutbound  || int    || GB sent                                          ||
 
|-
 
| Memory            || int    || Memory allocated to the VM (MB)                  ||
 
|-
 
| Disk              || int    || Disk allocated to the VM (GB)                    ||
 
|-
 
| StorageRecordId  || string || Link to associated storage record                ||
 
|-
 
| ImageId          || string || Image ID                                          ||
 
|-
 
| CloudType        || string || e.g. OpenNebula                                  ||
 
|-
 
|}
 
 
 
'''End of record:''' %%
 
 
 
==== Example Message  ====
 
<pre>APEL-cloud-message: v0.1
 
RecordId: 2012-03-14 16:34:45+00:00 STFC-RAL vm-0
 
SiteName: STFC-RAL
 
ZoneName: EU
 
MachineName: vm-0
 
LocalUserId: 0
 
LocalGroupId: 0
 
GlobalUserName: NULL
 
FQAN: NULL
 
Status: completed
 
StartTime: 1331131577
 
EndTime: 1331131929
 
SuspendTime: NULL
 
TimeZone: UTC
 
WallDuration: NULL
 
CpuDuration: NULL
 
CpuCount: NULL
 
NetworkType: NULL
 
NetworkInbound: NULL
 
NetworkOutbound: NULL
 
Memory: 1024
 
Disk: NULL
 
StorageRecordId: NULL
 
ImageId: NULL
 
CloudType: OpenNebula
 
%%
 
...another cloud record...
 
%%
 
...
 
%%
 
</pre>
 
 
 
== Proposed new version of the Cloud Accounting Message Format ==
 
'''Header''' APEL-cloud-message: v0.2
 
 
 
{| cellspacing="1" cellpadding="1" border="1" width="650"
 
! scope="col" | Key
 
! scope="col" | Value
 
! scope="col" | Description
 
! scope="col" | Mandatory
 
|-
 
| VMUUID     || string || Virtual Machine's Universally Unique IDentifier  || Yes
 
|-
 
| SiteName          || string || Sitename, e.g. GOCDB Sitename                    || Yes
 
|-
 
| MachineName      || string || VM Id                                            ||
 
|-
 
| LocalUserId      || string || Local username                                    ||
 
|-
 
| LocalGroupId      || string || Local groupname                                  ||
 
|-
 
| GlobalUserName    || string || User's X509 DN                                    ||
 
|-
 
| FQAN              || string || User's VOMS attributes                            ||
 
|- 
 
| Status            || string || Completion status - started, completed, suspended ||
 
|-
 
| StartTime        || int    || Must be set if Status = Started (epoch time)      ||
 
|-
 
| EndTime          || int    || Must be set if Status = completed (epoch time)    ||
 
|-
 
| SuspendDuration  || int    || Set when Status = suspended (seconds)            ||
 
|-
 
| WallDuration      || int    || Wallclock - actual time used (seconds)            ||
 
|-
 
| CpuDuration      || int    || CPU time consumed  (seconds)                      ||
 
|-
 
| CpuCount          || int    || Number of CPUs allocated                          ||
 
|-
 
| NetworkType      || string || Description                                      ||
 
|-
 
| NetworkInbound    || int    || GB received                                      ||
 
|-
 
| NetworkOutbound  || int    || GB sent                                          ||
 
|-
 
| Memory            || int    || Memory allocated to the VM (MB)                  ||
 
|-
 
| Disk              || int    || Disk allocated to the VM (GB)                    ||
 
|-
 
| StorageRecordId  || string || Link to associated storage record                ||
 
|-
 
| ImageId          || string || Image ID                                          ||
 
|-
 
| CloudType        || string || e.g. OpenNebula, Openstack                        ||
 
|-
 
|}
 
 
 
'''End of record:''' %%
 
==== Example Message  ====
 
<pre>APEL-cloud-message: v0.2
 
VMUUID: https://cloud.cesga.es:3202/compute/47f74797-e9c9-46d7-b28d-5f87209239eb 2013-02-25 17:37:27+00:00
 
SiteName: CESGA
 
MachineName: one-2421
 
LocalUserId: 19
 
LocalGroupId: 101
 
GlobalUserName: /DC=es/DC=irisgrid/O=cesga/CN=host/test30.egi.cesga.es
 
FQAN: NULL
 
Status: completed
 
StartTime: 1361813847
 
EndTime: 1361813870
 
SuspendDuration: NULL
 
WallDuration: NULL
 
CpuDuration: NULL
 
CpuCount: 1
 
NetworkType: NULL
 
NetworkInbound: 0
 
NetworkOutbound: 0
 
Memory: 1000
 
Disk: NULL
 
StorageRecordId: NULL
 
ImageId: NULL
 
CloudType: OpenNebula
 
%%
 
...another cloud record...
 
%%
 
...
 
%%
 
</pre>
 
 
 
 
 
==== Other work on providing OpenNebula Accounting Records ====
 
 
 
Contact made with "VENUS" project developers who have developed a system for extracting accounting data.  Detail on the Cloud Accounting System (above) provided to them, requested more detail on their implementation.
 
 
 
== Feedback from Resource Providers ==
 
{| border="1"
 
!VM
 
!What is measured
 
|-
 
|Oxford/Eucalyptus (no longer running)
 
|Number of VM instantiated - Type of VM - Amount of time each VM has been running - Number of Elastic Block Storage volumes created - Amount of time the EBS volumes have been owned - Times the EBS volumes have been mounted - Binding between EBS volumes and VMs - Number of OS images loaded in the S3 repository - Amount of time the OS images have been loaded into the S3 repository
 
|-
 
|OpenNebula
 
| (Have reviewed UR)
 
|}
 
 
 
== Resource Providers published to Cloud Accounting Database ==
 
 
 
* Current list of Sites: http://goc-accounting.grid-support.ac.uk/cloudtest/cloudsites.html
 
* VMs during last hour: http://goc-accounting.grid-support.ac.uk/cloudtest/vmshour.html
 
* VMs during last day (long list may make your browser choke): http://goc-accounting.grid-support.ac.uk/cloudtest/vms.html
 

Latest revision as of 13:09, 8 June 2015