Optimization Framework: Homing and Allocation
=============================================
+Shankaranarayanan Puzhavakath Narayanan
+Apr 30 10:52 PM
+OOF-HAS is an policy-driven placement optimizing service (or homing service) that allows ONAP to
+deploy services automatically across multiple sites and multiple clouds.
+It enables placement based on a wide variety of policy constraints including capacity,
+location, platform capabilities, and other service specific constraints.
+HAS is a distributed resource broker that enables automated policy-driven optimized placement of
+services on a global heterogeneous platform using ONAP. Given a set of service components
+(based on SO decomposition flows) and requirements for placing these components
+(driven by policies), HAS finds optimal resources (cloud regions or existing service instances)
+to home these service components such that it meets all the service requirements.
+HAS is architected as an extensible homing service that can accommodate a growing set of
+homing objectives, policy constraints, data sources and placement algorithms. It is also
+service-agnostic by design and can easily onboard new services with minimal effort.
+Therefore, HAS naturally extends to a general policy-driven optimizing placement platform
+for wider range of services, e.g., DCAE micro-services, ECOMP control loops, server capacity, etc.
+Finally, HAS provides an traceable mechanism for what-if analysis which is critical for ease of
+understanding a homing recommendation and resolving infeasibility scenarios.
.. toctree::
- :maxdepth: 2
+ :maxdepth: 1
+
+ ./sections/architecture.rst
+ ./sections/homingspecification.rst
+ ./sections/offeredapis.rst
+ ./sections/consumedapis.rst
+ ./sections/delivery.rst
+ ./sections/logging.rst
+ ./sections/installation.rst
+ ./sections/configuration.rst
+ ./sections/administration.rst
+ ./sections/humaninterfaces.rst
+ ./sections/release-notes.rst
- api
- homingspecification
- release-notes/index
+++ /dev/null
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-
-Bug Fixes
----------
-
+++ /dev/null
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-
-Deprecation Notes
------------------
-
+++ /dev/null
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-
-Release notes
--------------
-
-.. toctree::
- :maxdepth: 2
-
- new-features.rst
- bug-fixes.rst
- known-issues.rst
- security-issues.rst
- upgrade-notes.rst
- deprecation-notes.rst
- other.rst
+++ /dev/null
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-
-Other
------
-
+++ /dev/null
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-
-Security Issues
----------------
-
+++ /dev/null
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-
-Upgrade Notes
--------------
-
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-Known Issues
-------------
+Administration
+=============================================
+ Administration - TBD
\ No newline at end of file
--- /dev/null
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+
+Architecture
+=============================================
+
+Introduction
+------------------
+OOF-HAS is an policy-driven placement optimizing service (or homing service) that allows ONAP to deploy services
+automatically across multiple sites and multiple clouds. It enables placement based on a wide variety of policy
+constraints including capacity, location, platform capabilities, and other service specific constraints.
+
+HAS is a distributed resource broker that enables automated policy-driven optimized placement of services on a
+global heterogeneous platform using ONAP. Given a set of service components (based on SO decomposition flows)
+and requirements for placing these components (driven by policies), HAS finds optimal resources (cloud regions
+or existing service instances) to home these service components such that it meets all the service requirements.
+HAS is architected as an extensible homing service that can accommodate a growing set of homing objectives, policy
+constraints, data sources and placement algorithms. It is also service-agnostic by design and can easily onboard
+new services with minimal effort. Therefore, HAS naturally extends to a general policy-driven optimizing placement
+platform for wider range of services, e.g., DCAE micro-services, ECOMP control loops, server capacity, etc.
+Finally, HAS provides an traceable mechanism for what-if analysis which is critical for ease of understanding a
+homing recommendation and resolving infeasibility scenarios.
+
+HAS in Service Instantiation workflows
+--------------------------------------------
+Below is an illustration of HAS interactions with other ONAP components to enable Policy driven homing. The homing
+policy constraints have been expanded (and categorized) to highlight the range of constraints that could be provided
+to HAS for determining the homing solution. The figure also shows how HAS uses a plugin-based approach to allow an
+extensible set of constraints and data models.
+
+.. image:: ./diagrams/HAS_PolicyDrivenHoming.png
+
+More information on how homing constraints are specified can be found at OOF-HAS Homing Specification Guide, and a
+sample homing template has been drawn up for residential vCPE Homing Use Case.
+
+HAS Architecture (R2)
+----------------------
+
+.. image:: ./diagrams/HAS_SeedCode_Architecture_R2.jpg
+
+Lifecycle of a Homing request in HAS
+--------------------------------------------
+
+.. image:: ./diagrams/PlanLifecycle.jpg
+
+Use cases
+----------------------
+Residential vCPE: https://wiki.onap.org/display/DW/vCPE+Homing+Use+Case
+
+5G RAN: https://wiki.onap.org/display/DW/5G+RAN+use+case
+
+
+A sample heuristic greedy algorithm of HAS (using a vCPE as example)
+------------------------------------------------------------------------
+
+.. image:: ./diagrams/HASHeuristicGreedyAlgorithm.jpg
--- /dev/null
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+
+Configuration
+=============================================
+
+For the configuration inside the config-file, please refer to the README inside Gerrit
+
+It is worth noting that A&AI and MUSIC may be needed to run HAS project. Please refer to their setup page for installation.
+
+For MUSIC version 2.4.x and newer refer Setup for Developing MUSIC
+
+Running the example
+-----------------------
+To start the process, execute the following commands:
+
+ $ conductor-api --port=8091 -- --config-file={conductor_conf_file_location}
+
+ $ conductor-controller --config-file={conductor_conf_file_location}
+
+ $ conductor-solver --config-file={conductor_conf_file_location}
+
+ $ conductor-reservation --config-file={conductor_conf_file_location}
+
+ $ conductor-data --config-file={conductor_conf_file_location}
+
+Committing the Code
+-----------------------
+ $ git commit -am "Initial proj struct"
+
+ $ git review -s
+
+ $ git commit -as --amend
+
+# scroll down 2 lines (above your Change-ID) insert "Issue-ID: {issue_id}"
+
+ $ git review
--- /dev/null
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+
+Consumed APIs
+=============================================
+The following are the dependencies for the project based on the scope for the Beijing Release.
+The required dependencies have been identified based on the current homing requirements for the vCPE use case,
+and the potential dependencies are tentative dependencies that may exist based on how the information required
+for homing (e.g., Hardware Platform Enablement, VIM attributes) is available.
+
+
+AAI
+--------------------------------------------
+See documentation for Active and Available Inventory component
+
+
+Multi-Cloud
+--------------------------------------------
+See documentation for Multi-Cloud component
\ No newline at end of file
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-New Features
-------------
+Delivery
+=============================================
+ Delivery description TBD
\ No newline at end of file
--- /dev/null
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+
+Human Interfaces
+=============================================
+
+ OOF HAS does not expose a human interface
\ No newline at end of file
--- /dev/null
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+
+Installation
+=============================================
+
+Installing from the Source Code
+------------------------------------
+Get HAS seed code from the Linux Foundation Projects page
+ $ git clone https://gerrit.onap.org/r/optf/has
+
+Use python virtual environment (https://virtualenv.pypa.io/en/stable/) to create and manage libraries and dependencies for HAS project.
+ $ virtualenv {virtual_environment_location}
+
+ $ source {virtual_environemtn_location}/bin/activate
+
+Inside of /has/conductor folder, run the following commands:
+ $ python setup.py install
+
+ $ pip install -e .
+
+In {virtual_environment_location}/bin folder, you should see the five components of HAS/Conductor project
+conductor-api,conductor-controller, conductor-solver, conductor-reservation, conductor-data
--- /dev/null
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+
+Logging
+=============================================
+
+HAS uses a single logger, oslo, across all the components. The logging format is compliant with the EELF recommendations,
+including having the following logs:
+error, audit, metric, application.
+
+The log statements follow the following format (values default to preset values when missing):
+
+Timestamp|RequestId|ServiceInstanceId|ThreadId|Virtual Server Name|ServiceName|InstanceUUID|Log Level|Alarm Severity Level|Server IP Address|HOST NAME|Remote IP Address|Class name|Timer|Detailed Message
+
+The logger util module can be found at:
+
+<>/has/conductor/conductor/common/utils/conductor_logging_util.py
\ No newline at end of file
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+
+Offered APIs
+=============================================
+
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
Homing API v1
-=============
+------------------
*Updated: 28 Feb 2018*
It is a work in progress and subject to frequent revision.
General API Information
-=======================
+------------------
Authenticated calls that target a known URI but that use an HTTP method
the implementation does not support return a 405 Method Not Allowed
error response structure.
API versions
-============
+------------------
List all Homing API versions
----------------------------
This operation does not accept a request body.
Plans
-=====
+------------------
Create a plan
-------------
--- /dev/null
+..
+ This work is licensed under a Creative Commons Attribution 4.0
+ International License.
+
+=============
+Release Notes
+=============
+
+Release Date
+------------
+2018-05-24
+
+
+New Features
+------------
+* Baseline HAS functionality
+* Integration with OOF OSDF, AAI, and Multi-Cloud
+* Platform Maturity Level 1
+* ~50%+ unit test coverage
+
+Bug Fixes
+---------
+None
+
+Known Issues
+------------
+None
+
+Security Issues
+---------------
+None
+
+Upgrade Notes
+-------------
+None
+
+Deprecation Notes
+-----------------
+None
+
+Other
+-----
+None
\ No newline at end of file