Replies: 8 comments 17 replies
-
https://github.com/gardener/component-spec/blob/master/doc/proposal/02-component-descriptor.md#references
Third:
Dependencies are not mentioned at all. When do I declare a dependency as a resource and when as component reference then?
Can't we give a real example here? I feel this is entirely meaningless ...? |
Beta Was this translation helpful? Give feedback.
-
I see it the same way as Balazs said. If it is a dependency, I would wrap it around a component descriptor, however........ Argument for Explicit dependency declarationRight now, the references are only traversed and then added as a list that is then processed in that order. There is no topological order in between them, so you don't know which component depends on which. The only thing that happens right now in It's also used in some other circumstances but there is no dependency declaration and the order is not guaranteed. There is an argument that the dependencies should be taken care of outside the schema definition but I disagree on that. I believe as Paul put it, it would be beneficial to define explicit dependencies as other specs do such as cyclonedx's dependency graph for example. What would we needWe would need something that declares dependencies. Right now, references in code are called dependencies, but they are only such in the sense of references and declaration. And not further processing. We have two options: Renamed
|
Beta Was this translation helpful? Give feedback.
-
I would add a new field to the |
Beta Was this translation helpful? Give feedback.
-
The idea of the dependsOn is the order of deployment of items within a component and as I understand it components can contain resources and references to other components. My thinking is that a component descriptor will contain a number of resources which are part of the component and references to other components that it requires. The order in which these are processed might be important. |
Beta Was this translation helpful? Give feedback.
-
My thinking was that a component might be something like a LAMP stack. In this example the resources might be a database, a webserver, frontend and backend applications etc. It might be that the database is shared between a number of application and thus is a component rather than a resource so in my component it is a component reference and that component might have some number of resources that if done in sequence deploys and populates or upgrades and migrates DDL/DML. |
Beta Was this translation helpful? Give feedback.
-
Hi @Skarlso, I'm not sure if I really understand, why we need an explicit dependency declaration for components? If this should be used e.g. by some installer to deploy the components in the right order, isn't it required that the model must also include all other information to install these components, i.e. export/import data, deploy mechanism (helm,...)? Only modelling the component installation dependencies seems to be not sufficient for me and we still need another formalism to describe the complete installation information. |
Beta Was this translation helpful? Give feedback.
-
My thoughts are that in order the make the OCM a successfully open source project we should...
The top diagram describes the proposed relationship between component descriptors. The consumer of an application component descriptor would build an infrastructure component descriptor and an environment component descriptor which would contain a component reference to the infrastructure component descriptor and also a reference to the provider’s application component descriptor. When this consumer environment component descriptor is uploaded to the consumer’s OCI repository it will be deployed to the consumers deployment management cluster by Flux and processed by the OCM controllers. Each processing phase will follow the links to referenced component descriptors, applying those to the cluster for processing by the OCM controllers. The OCM processing flow will be implemented by a number of different controllers. The first step is to verify signatures. Only when the component descriptor has been verified with other steps progress. Optionally an OCM Synchronisation controller will apply the consumers policy relating to use of external resources. The consumer might be happy to consume artefacts directly from providers and other public repositories but they might want to copy all artefacts they plan to use into their own repository. Note that the synchronisation and pack/unpack steps could be nested, i.e. sync from provider to community repositories and then to repositories for specific consumers and even within a consumer to repositories within siloed environments within an organisation. The next step is to execute source and image scanning using tools determined by the consumer’s policy. Finally the OCM deployer will process the consumer’s application component descriptor and the component descriptors that it referenced, creating resource custom resources for processing by the appropriate resource deployer controller. Resource DeployerFor each type of resource a resource deployer will process the resources of that type. At this point dependencies will be considered, resource deployment will not commence until the status of the resources it depends on indicated success. Resource Deployer DiscoveryAny component descriptor that contains a resource of a given type should include a component reference to a component descriptor of the same name that will contain one or more deployers for that type. A component descriptor for each resource type will contain one or more resources that describe executables that can be used to deploy a resource of this type. These resources will have types and the component descriptor will contain a component reference to the component descriptor for that type’s deployer. The base deployer type will be platform specific deployer such as brew, yum, apt etc. A label inherited from a referring component descriptor will define the specific base deployer to use. In the absence of such a label local platform detection will be used to set the label. For example, a helm chart resource type can be described using HelmRelease and HelmRepository custom resources and deployed using Flux. Alternatively, it could be described using command line arguments and deployed using the helm client. In each case the resource type is a helm chart but the resource will be labelled accordingly to indicate the type of deployer it requires. The OCM processor will use the component reference to the helm chart deployer component descriptor and deploy the resources that match the label on the resource being deployed. BootstrapA consumer needs an OCM bootstrap process. We should provide a cli tool that can be used to deploy component descriptors on the local machine, other machines or cloud resources. We would also provide a component descriptor that described a Kubernetes controller based OCM deployer solution. For example the cli tool when deployed on a Debian server would be deployed using apt and thus would be able to rely on apt being available to deploy resources on that machine, it could specify some other prerequisites too if needed but my vision is that a user should be able to deploy the OCM command line tool and then use it to deploy a provider’s component, i.e. apt install ocm-cli We would also provide a Kubernetes OCM manager component descriptor that they could deploy. The default version of this would deploy a Kubernetes cluster using Kind on the local machine and deploy Flux, Landscaper and OCM controllers etc into it. We could provide versions of this for EKS, AKS etc. Alternatively the user could provide the url of their own component descriptor that defines the environment they want to build (or already have) and reference the Kubernetes OCM manager component descriptor as a component reference, effectively deploying it in an existing environment. From this point the user can deploy any component descriptor that defines resources that are deployed using Kubernetes controllers like Landscaper including any resource described using Terraform, via a Terraform controller. |
Beta Was this translation helpful? Give feedback.
-
I thought that the main purpose of OCM is to describe the artefacts of a component but not how to deploy them. Of course you could extend OCM with such information but this make it more complex. The alternative is to define a model to describe the deployment separately, decoupling these aspects. This is how the current approach with the landscaper looks like, where so called blueprints/installations define the deploy logic based on a component model quite similar to OCM. This allows everyone to use OCM as a basis and if required its own deployment model on top. @In-Ko told me that you already plan to discuss these alternatives during the next days. |
Beta Was this translation helpful? Give feedback.
-
This thread is to consolidate all the things of the OCM proposal spec, which are problematic, unclear, need rephrasing, need examples, and so on ... Let's gather everything here, and then have a meeting to discuss all these points and agree on how to improve them.
Beta Was this translation helpful? Give feedback.
All reactions