Closed kirederik closed 2 weeks ago
Overall, very much in favour of these changes!
Agree with the changes to explain the underlying flow after showing things working. I think we have a nice diagram somewhere (maybe in the workshop slides) for how this flow looks?
Agree that requiredPromises
does simplify the workshop by only showing one way of doing things, but just to call out that we'll need to also touch on Promise Releases earlier in the workshop if we go for this approach (since requiredPromises
are versioned).
Agree that we should only add dependencies via Pipelines. Though the fact that we're not mentioning the dependencies
key at all in the workshop does bring up the age-old question of whether we should remove the dependencies
key altogether from Promises. If we're not removing it now, maybe we could just have a callout saying "for simple cases/small dependencies, you can use the dependencies
key..."?
I've seen this section be well-received in workshops, so I'm reluctant to remove it altogether. That said, we could specify the goal more clearly (e.g. demonstrating composability and testability of Pipeline container images), and perhaps also introduce a real "test" to ./scripts/test-pipeline
where we check the dependencies exist?
(I also like the idea of moving/copying some info about workflow best practices to the Kratix docs!)
I think we could keep this too, since it touches on (a) a concrete example of idempotency, and (b) the ability to read the status
from the /kratix/input/object.yaml
. It's a quick section and IMO it's useful to concretely demo these things!
I like this goal, though I'm not quite sure what you mean on implementation!
@shano [on Improving Workflows ] It would be good to know the objective of these docs, it is to get into a platform engineering loop? So make changes, deploy changes, see the changes in action? If so, there's perhaps a simple example to get a person quickly iterating on changes to get a feel for what this process is like. @richcooper95 [on Improving the Workflows] I've seen this section be well-received in workshops, so I'm reluctant to remove it altogether.
Yeah, see the comment above
We originally wanted to introduce the "TDDing your Promise" concept, but it got mixed with moving the dependencies into the pipeline at the same time. Maybe moving the deps to a pipeline directly will clear this up of this "second thing we are trying to achieve" and makes it more on point...
@richcooper95 [on surfacing information] I think we could keep this too, since it touches on (a) a concrete example of idempotency, and (b) the ability to read the status from the /kratix/input/object.yaml. It's a quick section and IMO it's useful to concretely demo these things!
Yeah, there's value in the "reading from status" but, to me, it feels like a secondary concern to "surfacing information" (hence my suggestion of adding it as an extra challenge).
@richcooper95 [on running pipelines locally] I like this goal, though I'm not quite sure what you mean on implementation!
You can do things like:
#!/usr/bin/env bash
input_object="${1:/kratix/input/object.yaml}"
output_dir="${2:/kratix/output}"
name="$(yq .metadata.name "${input_object}")"
kubectl create deployment "${name}" \
--image nginx \
--dry-run=client -o yaml > ${output_dir}/deployment.yaml
So now you can run locally by:
$> ./pipeline.sh test-object.yaml /tmp/
Briefly picked this up end of Oct 17. Small WIP that moves the "platform as a worker" setup (including the label) to the part-0/02-create-clusters
pushed to https://github.com/syntasso/kratix-docs/pull/133
closing this one since it's marked as completed 👀
After running the workshop a few times in recent weeks, I found a few places where we could improve/simplify the learner's journey.
Using Compound Promises:
Too much happens at once
Outdated compound promise
requiredPromises
. This is the Promise we write later on. This brings confusion to learners since they are unsure of what pattern to follow.requiredPromises
in the compound promise.Writing a Promise
Inline dependencies
Improving the Workflows
Unclear goal, complex section
Surfacing information via status
createdAt adds little value
createdAt
andmessage
.createdAt
touches on the need to make status idempotent.createdAt
, focus on surfacing the app url to users via status.Across sections
Can't run the pipeline script locally
docker build + docker run
, we can just rewrite the scripts so they can be executed locally. To test, you just need to run the script (we can provide the input/output/metadata dir as env vars or arguments or assumetest
if/kratix
does not exist).