-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EiffelArtifactDeployedEvent? #239
Comments
Adding to Emils list of possible deployment environments/things that know about the deployment - Kubernetes liveness and readiness probes. |
Don't forget to compare this proposal with the existing Eiffel Operations Extension - https://github.com/Ericsson/eiffel-operations-extension, that already have an EiffelArtifactDeployedEvent defined. |
Adding a comment to the reference of eiffel-operations-extensions. It was originally designed to add CD capabilities to Eiffel, to support production based and test/verification based delivery/deployment, which is very common to this issue. The potential difference might be the usage of the "service" notion compared to the suggested "artifact" notion. That difference might represent a much needed definition on how to (in Eiffel) represent various entities in software building blocks, ranging from smallest code-snippet to a deployed/running instance(s) of a small or large service-type product. |
@ebopalm , I'd say anything that is possible to relate to using a Purl could be an artifact. Be it a code snippet or a running instance/service - https://github.com/eiffel-community/eiffel/blob/master/eiffel-syntax-and-usage/glossary.md#artifact |
A general comment; for us it makes a lot of sense to have an event for this. Further down the road we plan to extend the Eiffel pipeline to reach 'all the way' without resorting to something as generic as EiffelActivity*. |
I think there's a general consensus that this is useful. Who wants to take a stab at defining it? |
There is work ongoing in this area within CDF SIG Events right now. In order to not introduce anything in Eiffel that will not be compatible with the coming CDF Event protocol, we should probably wait for that work to progress a bit further, unless someone is really eager to get this event type in sooner. |
There is already an EiffelArtifactDeployedEvent supported in REMReM Semantics. I suspect it comes from the not-yet-published Eiffel Operations Extension. I expect no one is using that event type yet, so that we're free to define it in whatever way. |
This was discussed at the May 2022 meetup (see notes) and at the 2022-06-09 community meeting. Here's my attempt to summarize (or paraphrase?) the outcome of the latter meeting:
Additional thoughts:
cc: |
Thanks @magnusbaeck for adding the notes and creating the picture! Linking:
When is it deployed?
Service:
Clarity:
|
Good comments! I'll post what I have for now and continue later.
Yes, that's another possibility. I imagined DeploymentDefined being used to define eligible deployments, i.e. there might be more DD events than what's actually picked up and deployed. The event could be sent outside of the deployment activity itself by a pipeline actor that monitors events and e.g. flags an artifact for deployment based on a CLM. However, sending DD as part of a deployment activity would also be fine, if that's when the (artifact, configuration, service) tuple is defined.
I guess it depends on whether the CLM decision is made within that activity and what the success criteria of the deployment is. Is it enough that
Yes, that's the idea.
Correct, but artifact publishing is also modeled at a higher, binary, level. We don't care when it starts, nor do we care about any logs produced during the act of publishing an artifact.
Not sure why there would be more CLM than there would be Service(Published|Deployed). But yeah, this is something we talked about during the meeting. Given the current proposal's DeploymentDefined my suggestion would be DeploymentFinished. I'm not sure what the point of having a dedicated event would be though (compared to reusing CLM), except that we don't have to establish a confidence level name that every uses (which might be a sufficient resaon).
I'm not sure how to translate you arithmetic expression to an event model :-) But are you saying that ServiceDeployed would be an event that links to an environment and a deployment that describes the artifact?
Hmm. It makes total sense to use CLM to express confidence in a particular service configuration. One important question is whether a service is a (relatively) static entity with a long lifetime or if we get a new service every time we make changes to it. |
@e-backmark-ericsson and I talked about this at today's community meeting.
|
Answering the rest of @m-linner-ericsson's questions from last week:
Yes. In many cases also the deployment configuration, if separate from the artifact itself (it usually is, in my experience).
What kind of event would that be? I imagine that most deployment activities wouldn't produce any events themselves. |
Some more thoughts that I hope can bring the discussion forward: Reading from https://www.merriam-webster.com/dictionary/deployment and https://dictionary.cambridge.org/dictionary/english/deployment where they describe deployment as:
and
it sound to me that deployments are best modeled with activity events or a specialization of them. On the other hand https://dictionary.cambridge.org/dictionary/english/service and https://www.merriam-webster.com/dictionary/service describes something more persistent
and
We could then have something like this |
Some complementing thoughts on top of Mattias comment above:
|
Regarding serverless: Can we consider a collection of serverless functions as a service? For a user of these functions they would see it as a service. |
In the latest graph above it seems the "service" now describes the dynamic state, i.e. it includes the executing artifact, resulting in a ServiceDefined each time a deployment is made. That's probably okay if we have a PREVIOUS_XXX link to the previous incarnation of the service. It's not clear why we need three new events for deployments instead of just using the regular activity events. We don't have to get to the bottom of this at this time but if we eventually choose that path it should be for good reasons. One such reason could be to be able to link to the ServiceDefined without using a CONTEXT or CAUSE link. What if the service is defined as part of the deployment? It's highly likely that people are going to have CI jobs that send the CD that defines what's being deployed as well as the ServiceDefined. Or would that CI job be a separate activity that wraps the deployment activity? |
Description
Eiffel currently lacks some descriptiveness in the CD (Continuous Delivery/Deployment) area. One example is the possibility to connect a deployment of an artifact (Docker image for example) onto a staging or production environment. An idea would be to add an EiffelArtifactDeployedEvent (ArtD), that would link to ArtC using an ARTIFACT link. ArtD could contain fields to tie the artifact to a certain deployment environment and/or Continuous Delivery tool, such as Keptn/ArgoCD/Spinnaker (managing deployments) and/or Prometheus (managing monitoring) and/or Consul (managing service discovery).
Probably it would be better to use the event to say that a 'deployment process is started', linking to tools used for e.g. canary or blue/green deployments, than to say for each individual deployment that now this specific deployment instance is created. So, maybe EiffelArtifactDeploymentInitiatedEvent is a better name for it?
Motivation
To enable traceability using Eiffel events further into the Continuous Delivery/Deployment area
Exemplification
When e.g. ArgoCD starts to deploy a new Docker image onto a K8s cluster it could send the ArtD event linking to its own internal ArgoCD ids for the specific deployment process
Benefits
It would make it possible to connect and trace more parts of the CI/CD pipeline operations, namely the deployments onto production and/or staging environments.
Possible Drawbacks
This is a slightly new type of usage for Eiffel events, so maybe it could make it harder to distinguish the boundaries for what Eiffel events should be used for?
The text was updated successfully, but these errors were encountered: