Open Cloud Computing Interface (OCCI) Compute Resource Templates Profile

Abstract
This profile specification describes a well-defined number of instanced of the OCCI compute resource type defined in the Open Cloud Computing Interface (OCCI) family of specifications. 
Authors
Michel Drescher, EGI.eu
Boris Parak, CESNET
David Wallom, UOXF

Table of Contents
<<To be generated according to the document guidelines of the associated Standards Development Organisaiton.>>

Section 1: Introduction
This document defines the OCCI Infrastructure Compute resource template profile 1.0 (hereafter, “the Profile”), consisting of a set of well-defined instances of the OCCI compute resource types.
Section 1 introduces the Profile, and explains its relationships to other profiles.
Section 2, "Profile Conformance," explains what it means to be conformant to the Profile.
Each subsequent section addresses a component of the Profile, and consists of two parts: an overview detailing the component specifications and their extensibility points, followed by subsections that address individual parts of the component specifications. Note that there is no relationship between the section numbers in this document and those in the referenced specifications.
1.1	Overview
As a consumer of IaaS cloud services one usually supplies a description of set hardware resource one would like to have provisioned with the requested Cloud compute instance. For example, one may want to request 4 CPU cores of Intel x86 64-bit architecture, together with 32 GB of RAM, and 150 GB of scratch space. The OCCI family of specifications defines a consistent way of defining such compute resource requirements through the Compute resource type. Many IaaS Cloud service providers allow users to supply popular combinations of resource requirements using an identifying token, or name that the provisioning engine then translates into the defined resource requirements. Such mechanism is often referred to “resource templates”.
In federated IaaS Cloud infrastructures it is desirable to provide the user with a consistent set of named resource requirements sets: Instead of forcing the user to provide detailed individual resource requirements, a consistently defined set of resource templates across federated IaaS Cloud service providers is desirable. 
This profile specification addresses this use case by defining a number of resource requirement combinations mapped to normative names, using the Open Cloud Computing Interface family of specifications.
1.2	Relationship to other profiles
The Profile considers the WS-I Basic Profile 1.1 [WS-I BP 1.1] as best practice in procedure, structure and nature of defining a profile across one or more public standard specifications. It includes by reference specific sections and paragraphs of said specifications as detailed in the remainder of this specification.
The Profile has no known relationship to other profiles.
1.3	Notational conventions
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC2119 [RFC2119].
The Profile includes by reference section 1.4 “Notational conventions” of the WS-I Basic Profile 1.1 specification [WS-I BP 1.1] except for the namespace declarations contained therein.  In particular, requirements and extensibility statements MUST be considered namespace qualified – see below.
1.4	Namespaces and terminology
The Profile makes use of and defines the following namespaces as specified in [XMLNamespaces], and defines the associated non-normative prefixes for use in this document:
The default namespace for the Profile is defined as: http://fedcloud.egi.eu/occi/compute/flavour/1.0
The scheme common to all provisions defined in the Profile is defined as: http://fedcloud.egi.eu/occi/compute/flavour/1.0#
profile	http://fedcloud.egi.eu/occi/compute/flavour/1.0	
scheme	http://fedcloud.egi.eu/occi/compute/flavour/1.0#	
core	http://schemas.ogf.org/occi/core#	
Infra	http://schemas.ogf.org/occi/infrastructure#	
Further, this specification defines the following non-normative terms for the purpose of this document: 
•	WSI_BasicProfile – This term refers to the WS-I Basic Profile 1.1 specification [WS-I BP 1.1].
•	XML-Namespace – Refers to the Namespaces in XML 1.0 specification [XMLNamespaces].
•	OCCI-Core – Refers to the Open Cloud Computing Interface – Core specification [OCCI Core 1.1].
•	OCCI-Infrastructure – Refers to the Open Cloud Computing Interface – Infrastructure specification [OCCI Infra 1.1].
•	OCCI-RESTful – Refers to the Open Cloud Computing Interface – Restful HTTP rendering specification [OCCI RESTful 1.1].
•	HTTP – Refers to the Hypertext Transfer Protocol (HTTP/1.1) family of specifications [HTTP 1.1]

1.5	Profile identification and version 
The Profile includes by reference section 1.5 “Profile identification and versioning” of the WSI-BasicProfile.
The Profile is identified by its name “OCCI Compute resource templates profile” and the version “1.0”.
 Section 2: Profile conformance
The Profile includes by reference sections 2.1 “Conformance requirements”, and section 2.3 “Conformance scope” of the WSI-BasicProfile and abides by its definitions.
2.1 Conformance targets
The Profile defines the following conformance targets:
•	PROVIDER – An implementation of the OCCI families of specifications (OCCI-Core, OCCI-Infrastructure and OCCI-RESTful)
•	MIXIN – An extension mechanism in OCCI-Core allowing to add new resource capabilities to an infrastructure cloud service.
•	COMPUTE – A generic information processing resource as defined in OCCI-Infrastructure.
•	OCCI RESOURCE TEMPLATE – A MIXIN instance defined with a specific scheme in OCCI-Infrastructure.
•	RESOURCE TEMPLATE – Refers to any of the MIXIN instances defined in the Profile related to the OCCI RESOURCE TEMPLATE MIXIN instance, and define a set of Resource attributes values with a term identifier.
•	SMALL INSTANCE – A specific RESOUREC TEMPLATE defined in the Profile.
•	MEDIUM INSTANCE – A specific RESOUREC TEMPLATE defined in the Profile.
•	LARGE INSTANCE – A specific RESOUREC TEMPLATE defined in the Profile.
2.2 Claiming conformance
Claims of conformance to the Profile can be made when Profile requirements are met by an implementation. An implementation may claim base conformance when implementing all unconditional requirements. An implementation may claim extended conformance when and only when implementing all conditional as well as all unconditional requirements.
The Profile defines the conformance claim token as follows following the XML-Namespace specification.
1.	The namespace of the claim token is identical to the namespace of the Profile.
2.	The local name of the claim token for base conformance is defined as “OCCI-CRTP”.
3.	The local name of the extended claim token for extended conformance is defined as “OCCI-CRTP-EP”.
4.	The version of the claim token is defined as “1.0”.
Implementations of the Profile MUST include conformance claims as defined in the Profile.
Section 3: Resource Templates
This section of the Profile incorporates the following specifications by reference, and defines extensibility points within it:
•	Open Cloud Computing Interface – Core [OCCI Core 1.1]
Extensibility points:
o	OCCI-Core explicitly defines many extensibility points (c.f. [OCCI Core 1.1] section 4.6). The Profile includes by reference these extensibility points and defines only those that are affected or further constrained by the Profile’s conformance requirements.
o	E0301 – COMPUTE type mixin relations extensibility – Being an instance of a sub-type of an OCCI Entity, a COMPUTE instance’s mixins attribute MAY contain any number of references to any MIXIN instances of any type. (OCCI-Core, section 4.5.1)
o	E0302 – MIXIN instance extensibility – A PROVIDER MAY define any number of MIXIN instances. (OCCI-Core, section 4.6.3)
•	Open Cloud Computing Interface – Infrastructure [OCCI Infrastructure 1.1]
Extensibility points:
o	E0303 – RESOURCE TEMPLATE extensibility – A PROVIDER MAY define any number of RESOURCE TEMPLATEs as MIXIN instances, and all MUST be related to the OCCI RESOURCE TEMPLATE MIXIN. (OCCI-Infrastructure, section 3.5.2)
Section 3.1 COMPUTE resource support
OCCI-Infrastructure provisions the definitions of a number of Resource and Link sub-types, i.e. Compute, Network, and Storage, and associated Link types such as NetworkLink and StorageLink, but leaves it an implementation choice which types specifically to implement. The Profile mandates the support and implementation of the COMPUTE Resource sub-type, and defines the following constraints on it.
R0301 – A PROVIDER MUST support the COMPUTE resource sub-type defined in OCCI-Infrastructure.
Section 3.1.1 COMPUTE resource mixins attribute requirements
OCCI-Core defines for Entity and its subtypes the attribute “mixins” without restricting number and type of MIXIN instances contained therein (c.f. E0301), allowing ambiguous and undefined side-effects. The Profile constraints the use of the COMPUTE type “mixins” attribute as follows.
R0302 – At any point in its lifetime a COMPUTE resource instance MUST NOT be associated with more than one RESOURCE TEMPLATE defined in the Profile.
Section 3.2 RESOURCE TEMPLATE definitions
OCCI-Infrastructure defines the MIXIN instance OCCI RESOURCE TEMPLATE as an absolute type identifier for PROVIDER-defined RESOURCE TEMPLATEs, which are in turn to be defined as MIXIN instances. The Profile mandates support of the OCCI RESOURCE TEMPLATE in general, and defines specific instances that MUST be supported.
R0303 – A PROVIDER MUST support the OCCI RESOURCE TEMPLATE defined in [OCCI Infrastructure 1.1] section 3.5.2.
R0304 – The “attributes” attribute of a RESOURCE TEMPLATE MUST contain only the following three attributes “occi.compute.cores”, “occi.compute.memory” and “eu.egi.fedcloud.occi.compute.ephemeral” as defined in OCCI-Infrastructure and in Appendix D.1, respectively.
R0305 – Applying a RESOURCE TEMPLATE to a COMPUTE instance, whether at creation time or later during its lifetime, MUST instruct the PROVIDER to provision or modify said COMPUTE instance such that its attributes are populated with values defined for the corresponding RESOURCE TEMPLATE’s attributes in the Profile [OCCI-Core, section 4.4.3, bullet points 2 and 6]
R0306 – A PROVIDER MUST offer and support the SMALL INSTANCE resource template as defined in Appendix D.2
R0307 – A PROVIDER MUST offer and support the MEDIUM INSTANCE resource template as defined in Appendix D.3
R0308 – A PROVIDER MUST offer and support the LARGE INSTANCE resource template as defined in Appendix D.4
R0309 – A PROVIDER MAY offer and support the MEM.SMALL resource template as defined in Appendix D.5
R0310 – A PROVIDER MAY offer and support the MEM.MEDIUM resource template as defined in Appendix D.6
R0311 – A PROVIDER MAY offer and support the MEM.LARGE resource template as defined in Appendix D.7
Section 4: Conformance claim
This section defines the Profile requirements for claiming conformance to this profile. It incorporates the following specifications by reference, and defines extensibility points within it:
•	Hypertext Transfer Protocol (HTTP/1.1) [HTTP 1.1]
o	E0401 – HTTP Server header extensibility – The HTTP headers MAY include any number of arbitrary implementation-specific headers (HTTP, RFC7230 section 3.2.1)
•	Open Cloud Computing Interface - RESTful HTTP Rendering [OCCI RESTful 1.1]
o	No extension points defined in OCCI-Restful
Section 4.1 Conformance claim HTTP rendering definition
OCCI-RESTful defines how OCCI artifacts must be rendered into RESTful HTTP messages. Within OCCI-Restful, section 3.6.5 defines requirements on implementations communicating which version of OCCI is supported.
The Profile mandates conformance to the requirements set out in OCCI-RESTful section 3.6.5 and defines the following conformance requirements:
R0401 – An implementation MUST advertise conformance to the Profile on each response to the client conveyed in a Profile version field.
R0402 – An implementation MUST supply the Profile version field in the format of “token/version”.
R0403 – In rendering the Profile version field, the token part MUST correspond to the claim token local name defined in section 2.2 if the implementation claims basic conformance.
R0404 – In rendering the Profile version field, the token part MUST correspond to the extended claim token local name defined in section 2.2 if the implementation claims extended conformance.
R0405 – In rendering the Profile version field, the version part MUST correspond to the claim version defined in section 2.2.
A non-normative example of how an implementation may advertise the conformance claim is:
HTTP/1.1 200 OK
Server: occi-server/1.1 (linux) OCCI/1.1 OCCI-CRTP/1.0
[...]

Appendix A: Referenced specifications and profiles
WS-I BP 1.1	WS-I Basic Profile 1.1, http://www.ws-i.org/profiles/basicprofile-1.1-2004-08-24.html 	
XMLNamespaces	Namespaces in XML, Third edition, http://www.w3.org/TR/REC-xml-names/ 	
OCCI Core 1.1	Open Cloud Computing Interface – Core, GFD-P-R.183, http://www.ogf.org/documents/GFD.183.pdf 	
OCCI Infra 1.1	Open Cloud Computing Interface – Infrastructure, GFD-P-R.184, http://www.ogf.org/documents/GFD.184.pdf 	
OCCI RESTful 1.1	Open Cloud Computing Interface - RESTful HTTP Rendering, GFD-P-R.185, http://www.ogf.org/documents/GFD.185.pdf 	
HTTP 1.1	Hyper Text Transfer Protocol (HTTP/1.1) family of specifications, RFC7230, RFC7231, RFC7232, RFC7233, RFC734, RFC7235, https://tools.ietf.org/html/rfc7230 et al.	
RFC2119	Key words for use in RFCs to Indicate Requirement Levels, RFC2119,
https://www.ietf.org/rfc/rfc2119.txt 	

Appendix B: Extensibility Points
This section re-iterates the extensibility points defined for the Profile components in earlier sections that are not further constrained by Profile requirements defined in earlier sections. 
As defined in section 2 extensibility points defined herein are out of scope of the Profile unless they are further constrained by conformance requirements stated in earlier in this document; their use may affect interoperability of implementations despite it not affecting conformance to the Profile.
B.1 Open Cloud Computing Interface – Core 
•	OCCI-Core explicitly defines many extensibility points (c.f. [OCCI Core 1.1] section 4.6). The Profile includes by reference these extensibility points and defines only those that are affected or further constrained by the Profile’s conformance requirements.
•	E0301 – COMPUTE type mixin relations extensibility – Being an instance of a sub-type of an OCCI Entity, a COMPUTE instance’s mixins attribute MAY contain any number of references to any MIXIN instances of any type. (OCCI-Core, section 4.5.1)
•	E0302 – MIXIN instance extensibility – A PROVIDER MAY define any number of MIXIN instances. (OCCI-Core, section 4.6.3)
B.2 Open Cloud Computing Interface – Infrastructure
E0303 – RESOURCE TEMPLATE extensibility – A PROVIDER MAY define any number of RESOURCE TEMPLATEs as MIXIN instances, and all MUST be related to the OCCI RESOURCE TEMPLATE MIXIN. (OCCI-Infrastructure, section 3.5.2)
B.3 Hypertext Transfer Protocol (HTTP/1.1)
•	E0401 – HTTP Server header extensibility – The HTTP headers MAY include any number of arbitrary implementation-specific headers (HTTP, RFC7230 section 3.2.1)
Appendix C: Acknowledgements
The authors of the Profile wish to thank the EGI Federated Cloud members at large for their valuable feedback and contributions to this document.
The authors also would like to thank in no particular order John Gordon (STFC), Álvaro López García (IFCA) for their invaluable input.
Appendix D: Profile type definitions
D.1. eu.egi.fedcloud.occi.compute.ephemeral attribute definition
This section normatively defines the properties of the OCCI Compute resource type attribute eu.egi.fedcloud.occi.compute.ephemeral referenced earlier in the Profile. Notational conventions follow those used in OCCI-Infrastructure for defining attributes.
Attribute	Type	Multiplicity	Mutability	Description	
eu.egi.fedcloud.occi.compute.ephemeral	Float, 109 (GiB)	1	Immutable	Ephemeral storage provisioned for the associated Compute instance.	
The semantics of eu.egi.fedcloud.occi.compute.ephemeral are defined such that upon instantiation of a COMPUTE instance using a RESOURCE TEMPLATE instance defined in this profile, the PROVIDER MUST make available ephemeral storage capacity exclusively for the provisioned COMPUTE instance constrained to the lifetime of that COMPUTE instance. Preservation of data stored in ephemeral storage is not guaranteed; any provisions for this case are out of scope of the Profile.
It is implementation-specific how ephemeral storage will be provisioned to the COMPUTE instance. Regardless the specific implementation the outcome MUST always be the same, in that the ephemeral storage MUST be accessible using the default file system provided through the COMPUTE instance’s Operating System. Any further definition of specific file system paths etc. is out of scope for the Profile. 
D.2. SMALL INSTANCE attribute value definitions
The following table normatively defines the specific values for immutable SMALL INSTANCE attributes, and specific values for a SMALL INSTANCE for attributes defined for RESOURCE TEMPLATES in section 3.2.
Attribute	Value	
scheme	http://fedcloud.egi.eu/occi/compute/flavour/1.0#	
term	small	
title	A small Compute instance	
related	[ http://schemas.ogf.org/occi/infrastructure#resource_tpl ]	
actions	[ ]	
occi.compute.cores	1	
occi.compute.memory	1.0	
eu.egi.fedcloud.occi.compute.ephemeral	10.0	

D.3. MEDIUM INSTANCE attribute value definitions
The following table normatively defines the specific values for immutable MEDIUM INSTANCE attributes, and specific values for a MEDIUM INSTANCE for attributes defined for RESOURCE TEMPLATES in section 3.2.
Attribute	Value	
scheme	http://fedcloud.egi.eu/occi/compute/flavour/1.0#	
term	medium	
title	A medium Compute instance	
related	[ http://schemas.ogf.org/occi/infrastructure#resource_tpl ]	
actions	[ ]	
occi.compute.cores	2	
occi.compute.memory	2.0	
eu.egi.fedcloud.occi.compute.ephemeral	20.0	

D.4. LARGE INSTANCE attribute value definitions
The following table normatively defines the specific values for immutable LARGE INSTANCE attributes, and specific values for a LARGE INSTANCE for attributes defined for RESOURCE TEMPLATES in section 3.2.
Attribute	Value	
scheme	http://fedcloud.egi.eu/occi/compute/flavour/1.0#	
term	large	
title	A large Compute instance	
related	[ http://schemas.ogf.org/occi/infrastructure#resource_tpl ]	
actions	[ ]	
occi.compute.cores	4	
occi.compute.memory	4.0	
eu.egi.fedcloud.occi.compute.ephemeral	40.0	

D.5. MEM.SMALL INSTANCE attribute value definitions
The following table normatively defines the specific values for immutable MEM.SMALL INSTANCE attributes, and specific values for a MEM.SMALL INSTANCE for attributes defined for RESOURCE TEMPLATES in section 3.2.
Attribute	Value	
Scheme	http://fedcloud.egi.eu/occi/compute/flavour/1.0#	
Term	mem.small	
title	A small Compute instance for memory-intensive applications	
related	[ http://schemas.ogf.org/occi/infrastructure#resource_tpl ]	
actions	[ ]	
occi.compute.cores	1	
occi.compute.memory	4.0	
eu.egi.fedcloud.occi.compute.ephemeral	10.0	

D.6. MEM.MEDIUM INSTANCE attribute value definitions
The following table normatively defines the specific values for immutable MEM.MEDIUM INSTANCE attributes, and specific values for a MEM.MEDIUM INSTANCE for attributes defined for RESOURCE TEMPLATES in section 3.2.
Attribute	Value	
scheme	http://fedcloud.egi.eu/occi/compute/flavour/1.0#	
term	mem.medium	
title	A medium Compute instance for memory-intensive applications	
related	[ http://schemas.ogf.org/occi/infrastructure#resource_tpl ]	
actions	[ ]	
occi.compute.cores	2	
occi.compute.memory	8.0	
eu.egi.fedcloud.occi.compute.ephemeral	20.0	

D.7. MEM.LARGE INSTANCE attribute value definitions
The following table normatively defines the specific values for immutable MEM.LARGE INSTANCE attributes, and specific values for a MEM.LARGE INSTANCE for attributes defined for RESOURCE TEMPLATES in section 3.2.
Attribute	Value	
scheme	http://fedcloud.egi.eu/occi/compute/flavour/1.0#	
term	mem.large	
title	A large Compute instance for memory-intensive applications	
related	[ http://schemas.ogf.org/occi/infrastructure#resource_tpl ]	
actions	[ ]	
occi.compute.cores	4	
occi.compute.memory	16.0	
eu.egi.fedcloud.occi.compute.ephemeral	40.0