Skip to content
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

feat: add oura and scrolls #5

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

Pacman99
Copy link
Contributor

No description provided.

@Pacman99 Pacman99 marked this pull request as draft June 22, 2022 21:46
@Pacman99 Pacman99 changed the title feat: add oura package and entrypoint feat: add oura package, entrypoint, and oci-image Jun 22, 2022
@Pacman99 Pacman99 force-pushed the oura branch 2 times, most recently from a899860 to 92ad584 Compare June 22, 2022 23:21
Copy link
Contributor

@blaggacao blaggacao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done on the easy part!
Layer 1,2,3 look already pretty good.

I left a few comments for better context.

Looking forward to layer 4 😄

@@ -565,4 +565,16 @@ in {
exec ${packages.ogmios}/bin/ogmios "''${args[@]}"
'';
};

oura = writeShellApplication {
runtimeInputs = prelude-runtime;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depending on how oura is configured, you probably won't need the prelude.

The prelude and all the other bash script are "hacky" workarounds for the operational "shortcomings" of the binaries in this operational context.

name = "entrypoint";
text = ''

${prelude}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same: probably not needed.

config.Cmd = [
"${entrypoints.oura}/bin/entrypoint"
];
config.User = "1000:1000";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming the application refuses to run with a low number uid/gid, we customarily use nobody:nogroup with their respective high numbers instead.

name = "registry.ci.iog.io/oura";
maxLayers = 25;
layers = [
(n2c.buildLayer {deps = entrypoints.oura.runtimeInputs;})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These layers are to have certain control over when which layers needs rebuilding and as such is a pure optimization.

In this particular case, I'm not sure if we even need attitional runtimeInputs for the entrypoint. If we don't, we can drop this layer.

@Pacman99 Pacman99 changed the title feat: add oura package, entrypoint, and oci-image feat: add oura and scrolls Jun 23, 2022
inherit namespace;
endpoints = [
# prometheus metrics for scrolls
"http://127.0.0.1:80/metrics"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be 1337?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants