aboutsummaryrefslogtreecommitdiffstats
path: root/src/orchestrator/pkg
AgeCommit message (Collapse)AuthorFilesLines
2020-10-02Modify GenericPlacement APIs to include DepIntGrpRajamohan Raj7-52/+151
Modify the genericPlacementIntent API such that deploymentIntentGroup becomes a mandatory parameter. Issue-ID: MULTICLOUD-1218 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I33d2eeac5b60228e9c08921c9347b1b6aa3f8d28
2020-09-28Request CSR approvals via /subresource levelIgor D.C1-0/+27
Make use of the new /subresource level (under a resource) to request rsync to process approvals (a K8s subresource) for CSRs. Generic usage of instructions (order, dependency) for consistency. This also introduces a 'subresources' package in 'appcontext' with the first member being the approval subresource. Since subresources aren't necessarily created with yaml, this package will allow developers to specify what should be the "interface" in appcontext for each type of subresource when the different services need to exchange this data (e.g. DCM and rsync). Issue-ID: MULTICLOUD-1143 Change-Id: I8c85b4ee8c5654036a1c7ebb39d111ba4518b468 Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-09-24Let instructions exist under /subresource levelIgor D.C1-1/+1
Instructions (order/dependency) can now belong to an app, a resource or a subresource. Issue-ID: MULTICLOUD-1143 Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com> Change-Id: Iee55c2bbb569de242e66f5a5456ac52025a00f0e
2020-09-24Cleanup tmp resources after instantiationRajamohan Raj1-1/+33
In this patch,we clean up the tmp files and directories generated during the process of instantiation. They include the tmp dirs with prefix : /tmp/helm-tmpl and /tmp/k8s-ext Issue-ID: MULTICLOUD-1206 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I02d11bb2f8d920e35aae7343f041a53b1cd3f057
2020-09-10Merge "Add log level support for orchestrator"Eric Multanen2-0/+14
2020-09-09Changes to add state and retry logic to rsyncManjunath Ranganathaiah3-14/+52
- Adds retry watcher and related functionality. - Adds code to update, get the status from appcontext. - Adds logic to handle state transition during terminate. Issue-ID: MULTICLOUD-1005 Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com> Change-Id: I2ed76efd9d8b6f40fec547bbe8b7d8a86f69ce07
2020-09-09Add log level support for orchestratorRajamohan Raj2-0/+14
In this patch, a new config item for log-level is added, default log-level is set as "warn", for detailed logs, set log-level as "info" Issue-ID: MULTICLOUD-1200 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I3205ce110a492ecc6a7c680e3d35e173a5624bb0
2020-08-31Enhance the status query APIEric Multanen4-61/+592
This patch enhances the status query API. - The ResourceBundleState CRD is modified to just use the k8s Pod structure instead of a customized struct. - Status queries can either present results showing the rsync status of the composite app and resources or from information received from the cluster via the ResourceBundleState CR - Query parameters are provided to the API call to customize the query and response - Support for querying status of cluster network intents is added Issue-ID: MULTICLOUD-1042 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Icca4cdd901e2f2b446414fade256fc24d87594cd
2020-08-27Remove the need for rysnc registration in orchestratorRajamohan Raj2-18/+75
Removed dependency of rsync registration from orchestrator.RSYNC shall have a function NewRsyncInfo to initiate a new rsync independent of the orchestrator and make gRPC calls. Issue-ID: MULTICLOUD-1196 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I16bbac6a6865cf3c4ee7b763dac72abe2ed1ad0a
2020-08-20Add Validation for API'sRitu Sood1-0/+53
Adding input validations for API based on Json schemas Issue-ID: MULTICLOUD-1096 Signed-off-by: Ritu Sood <ritu.sood@intel.com> Change-Id: If6591bdef6305f87cbce7ef56d894376f687c6c1
2020-08-11Add appcontext state, status and resource statusEric Multanen9-120/+321
Add support in the AppContext for managing an AppContext (composite app level) status value. Also adds support for tracking rsync status at the resource level. A mechanism for tracking history at the controlling resource level (i.e. DeploymentGroupIntnt or Cluster) is added, in part, so that all AppContexts associated can be deleted when the resource is eventually deleted. Issue-ID: MULTICLOUD-1042 Change-Id: I3d0a9a97ea45ca11f9f873104476e4b67521e56a Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
2020-08-03Add StateInfo structure synced resourcesEric Multanen4-38/+188
Add a StateInfo structure to the Cluster and Deployment-Intent-Group resources to keep track of the lifecycle state of these resources. Moved the appcontext id that was being kept into this structure as well. Enabled the approve state (and API) for the deployment intent group. Issue-ID: MULTICLOUD-1042 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: I36602d8a0658d9d6d37b8799f9a372a7d1042496
2020-08-03Sanity test script for new releases.Rajamohan Raj1-1/+1
Developed a script which can be used to test a new release and confirm that the minimum components like clm, instantiation by orchestrator and rsync are working fine after the code change. Issue-ID: MULTICLOUD-1174 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I7d519fa88b71fb34d13b7d61f3f8b36edc9fa5f3
2020-07-24Adds PUT api to v2/projectsLarry Sachs2-4/+109
Add functionality to support the PUT api for v2/projects/{project-name} Also add unit tests for the PUT api Issue-ID: MULTICLOUD-1130 Change-Id: Ia271569c5f0dec3152952e64171fd5a182aaa333 Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
2020-07-17Merge "Move status tracking CR to rsync"Ritu Sood2-49/+0
2020-07-17Add APIs for getAll DeploymentIntents and GetAll GenericPlacemnetIntentsRajamohan Raj2-2/+86
In this patch, implemented two separate routes for getting all genericPlacemnetIntents and getting all deployment intents. Issue-ID: MULTICLOUD-1128 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I81fadb126752788da7c459aa43896fafa583310e
2020-07-17Add API to query all composite apps under a projectRajamohan Raj2-1/+34
In this patch implemented a new route to query all compApps under a project. Issue-ID: MULTICLOUD-1127 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I5d5d4861539edd2ca0eccff16d94b75439e14db7
2020-07-16Implement GetAll projects handlerRajamohan Raj1-0/+24
In this patch implement the route: /v2/projects. Issue-ID: MULTICLOUD-1126 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: Ia38aa560a74c26b8528d6bd579038c1b80b4d3c9
2020-07-16Move status tracking CR to rsyncEric Multanen2-50/+1
Handle creation and deletion of the ResourceBundleState Custom Resource per app/cluster in the rsync microservice instead of adding it to the resources of the composite application in the orchestrator service. Issue-ID: MULTICLOUD-1125 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Id0c0639ff62e788628e78f972107a7603c27abfb
2020-07-09Fixing the triple dash issue in YAML.Rajamohan Raj1-0/+5
In this patch, identified the root cause of failure due to triple dash and fixed it. Also reverted back to original helm charts for M3db operator. Issue-ID: MULTICLOUD-1114 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I175cd134cc751bf4b59e72c9c79e0e658a62f348
2020-07-08Add terminate support to orchestrator and ncmEric Multanen4-20/+123
Complete the basic terminate support for the orchestrator and ncm services. 1. When terminate REST API is invoked on a deployment intent group, call the uninstall grpc api to rsync and then remove the app context. 2. When terminate REST API is invoked on a cluster, add the uninstall grpc api call to rsync to remove the network resources from the clusters. Issue-ID: MULTICLOUD-1040 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: I181e891a8c7c973970af061f9ff07d80c3bb64f9
2020-07-08Adds composite app status update and queryEric Multanen6-11/+263
This patch provides the basic framework for supporting monitoring of composite application resources in clusters. 1. Updates to the monitor files for use with v2. 2. Invokes the Watcher process per cluster/app when the app is instantiated. 3. Adds a ResourceBundleState CR resource to the cluster/app so that monitor will be able to update status to it. 4. Watcher updates appropriate appcontext status object when updates are made in clusters by monitor 5. Update appcontext library to define a status handle and object at the app/cluster level 6. Labels resources with an appropriate tracking label to coordinate with the ResourceBundleState CR Issue-ID: MULTICLOUD-1042 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: If007c1fd86ca7a65bb941d1776cfd2d3afed766b
2020-06-26Add instruction and rsync call to instantiateEric Multanen4-13/+125
This patch adds app and resource 'order' and 'dependency' instructions to the appcontext, as these are currently expected by rsync. Adds the rsync client and call to rsync to instantiate the appcontext. Issue-ID: MULTICLOUD-1064 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Iae0da9de4a0ae82bd3ab7ccc72da4abf8b7f2295
2020-06-07Make GRPC calls and delete extra cluster handlesRajamohan Raj2-0/+74
The patch makes grpc calls for context updation for a given list of controllers and deletes the extra set of cluster handles for each anyOf cluster after context updation Issue-ID: MULTICLOUD-1064 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I4b946f5f130300628ef4f655213639a2444be2cc
2020-06-05Implement Priority Based Controller listRajamohan Raj4-11/+182
As part of this patch, have implemented a priorityQueue based contoller list which shall contain placement contollers and action contollers listed based on their priority. Issue-ID: MULTICLOUD-1064 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: Id1beac6e3b6ec5156f64a169042d171ff28e38d6
2020-06-03Add grpc contextupdate client call to orchestratorEric Multanen5-86/+275
Adds a contextupdate client function that can be invoked for any action or placement controller to process intents for that controller. Adds the corresponding server side handling for the ovnaction controller. Issue-ID: MULTICLOUD-1019 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Ifdfc99e522288a530735bc4c1402d45449f6d057
2020-06-03Move cluster management into its own microserviceEric Multanen1-1/+1
Split out the cluster provider and cluster APIs and packages into a separate microservice to align with the architecture. Issue-ID: MULTICLOUD-1029 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: I08f357b5a488004a2389b72a178ae33e101d1540
2020-06-02Reorganize ncm packages to align with architectureEric Multanen1-2/+2
Reorginize the ncm packges to delineate - cluster provider and cluster management - virtual and provider netowrk intent management - intent scheduler - internal ovn4k8s network controller Overall, no code changes, just moving things around. Issue-ID: MULTICLOUD-1029 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: I3d43c7e4eb6f285b51c0385ba18626d3511a14f5
2020-06-01Adding cluster meta data and saving in etcdRajamohan Raj6-135/+372
As part of this patch, we assign groupNumbers for the set of clusters which are under anyOf, or in other words are optional for deployement of app. Also refactored the instantiation flow by separating out the etcd interactions Issue-ID: MULTICLOUD-1064 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I21ece189daf6e6b3a7cfdba5df22d57b3d33ca78
2020-05-21InstallApp Grpc proto and server for rsyncManjunath Ranganathaiah2-391/+0
Add the InstallApp GRPC proto file server code to the resource synchronizer. Issue-ID: MULTICLOUD-1005 Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com> Change-Id: I8e586f1b878009fd4df53ef48aae6deded0f64ea
2020-05-20Changing the value type to interfaceRajamohan Raj1-2/+2
Issue-ID: MULTICLOUD-1064 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I50c1fc3ea0110d4d65d53201c62314ea6c74631b
2020-05-15Adding meta data for app in appContextRajamohan Raj5-45/+158
In this patch, modified the appContext and rtc lib by adding functions for setting and getting the meta data associated with the apps. Issue-ID: MULTICLOUD-1064 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I08f91ddda3044f172caf7b2673c069fed16c32c4
2020-05-14Merge "Create appContext and save to etcd"Ritu Sood3-35/+238
2020-05-12Move controller module into separate packageEric Multanen4-47/+70
Move the controller part of the module package into a separate controller package. Issue-ID: MULTICLOUD-1029 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Id07c1012aeff8a72458b37d42671495510cade75
2020-05-12Create appContext and save to etcdRajamohan Raj3-35/+238
In this patch, following tasks are accomplished 1. Creation of appContext and storing the appcontexts for each app in the compositeApp into etcd as part of the instantiation process 2. Added a util method to extract parameters from k8s manifest files. 3. Added a new testing script to auto create NCM artifacts through the NCM APIs 4. Modified the existing plugin_collection_v2.sh to better test the orchestrator APIs. 5. Added logging to appcontext lib 6. Bug fix in the helm charts. Issue-ID: MULTICLOUD-1064 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I1b0e4d1351ad3a083be529239748015ea5db2a41
2020-04-30Add gRPC framework to orchestratorEric Multanen7-36/+896
Adds proto and generated go files for a healtcheck, contextupdate and installapp rpc services. Adds framework for orchestrator as an rpc client to connect to configured controllers. Issue-ID: MULTICLOUD-1019 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Ie66865789fe2146258c91e168cfb8d5933905814
2020-04-24Fix missing key error while getting resource instManjunath Ranganathaiah1-1/+1
Issue-ID: MULTICLOUD-1005 Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com> Change-Id: I79e9090769f9ef2ce979d5f1a3b5264171164ae0
2020-04-23Merge "Added intentResolver"Ritu Sood7-47/+187
2020-04-22Controller API supportEric Multanen4-26/+152
Add controller API support as baseline for adding gRPC framework. Issue-ID: MULTICLOUD-1019 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Ifd522a0eefbb8e54be45cc62003d3809283c9bfe
2020-04-21Orchestrator support for network intent updatesEric Multanen1-0/+32
Adds support code in orchestrator for handling updates to app context resources when ncm handles network intents. Add a get cluster names call to the app context Issue-ID: MULTICLOUD-1029 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Ifdc78488a1e86f43d6fe656c59675862c4818af5
2020-04-17Added intentResolverRajamohan Raj7-47/+187
IntentResolver shall collect the clusterdetails for each of the app where it needs to be deployed. This shall be called by the instantiation code. Issue-ID: MULTICLOUD-1041 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I7d29901e46a5349ef502786c187c1c88bea61a12
2020-04-14Mongo api changesEric Multanen2-3/+31
Add RemoveTag call to allow removal of attribute from a mongo document. Allow find to return and empty list. Issue-ID: MULTICLOUD-1029 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: I315efb8a4da485b697727254ccc9a5828f11a0d0
2020-04-13Added query routes for deploymentIntentGroupRajamohan Raj2-13/+79
In this patch added a route which can query allIntents belonging to a DeploymentIntentGroup and another route for querying all intents under an intent in a deploymentIntentGroup Issue-ID: MULTICLOUD-1049 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I06ec4d2ee8dae2aeca77e4db3ca690863014cc62
2020-04-13Merge "Adding query APIs for AppIntents"Ritu Sood6-21/+170
2020-04-13Test cases for resolving the helm templatesRajamohan Raj2-6/+5
Added test cases for overriding values and resolving the helm charts. Also addressed the merge conflicts and review comments Issue-ID: MULTICLOUD-1041 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I511e8e2e71c60e878df434370fc053f09cda1f66
2020-04-11Resolve the helm templatesRajamohan Raj6-7/+152
Resolving the helm templates for each of the apps in the compositeApp by utilizing the helm libraries and thus getting the sorted templates with all values rendered. This is a subtask of adding instantiation APIs. Issue-ID: MULTICLOUD-1041 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: Id4fddda69b5276b2409d835723b11367400ab6ea
2020-04-09Adding query APIs for AppIntentsRajamohan Raj8-24/+172
In this patch the following tasks where performed: 1. Added APIs for query Intents for each App in the compositeApp. For example, you can see all intents of collectd or prometheus seperately if both formed a compositeApp Collection. 2. Added 'provider-name' parameter to denote the cluster objects used in all intents. Earlier we had only clusterName and clusterlabel to denote a cluster. Modified the tests also for this. 3. Fixed bugs in the plugin_collection_v2.sh. 4. Fixed some minor logging and formatting bugs. Issue-ID: MULTICLOUD-1048 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: Ic452d7ba5d98bb265eb301de84d679d1abe0e34e
2020-04-08Add validation routinesEric Multanen2-4/+57
Splitting out new orchestration validation routines from other patch for ncm which uses them - so these changes can go in first. Should fix build issues. Issue-ID: MULTICLOUD-1029 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: I89c4163e1204d444e48a4786acececa20fce1844
2020-04-01Add init and reinit interfaces to context libsManjunath Ranganathaiah4-253/+365
Issue-ID: MULTICLOUD-1005 Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com> Change-Id: I9839d265840c25b2fbfbe0265a65c65388eaebcb
2020-03-25App context library interface for etcdManjunath Ranganathaiah2-0/+573
Issue-ID: MULTICLOUD-1005 Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com> Change-Id: Id4d3357fe851f6653112d24ac5d48b6dbaa6e888 Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>