Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
# Makefile

# Define the sample images to build (assuming each subdirectory in samples is an app)
SAMPLE_IMAGES := $(shell find samples -maxdepth 1 -type d -not -path "samples" -printf "%P ")
SAMPLE_IMAGES ?= $(shell find samples -maxdepth 1 -type d -not -path "samples" -printf "%P ")

# Buildpacks directory (assuming each subdirectory contains a buildpack)
BUILDPACKS := $(shell find buildpacks -maxdepth 1 -type d -not -path "buildpacks" -printf "%P ")
BUILDPACKS ?= $(shell find buildpacks -maxdepth 1 -type d -not -path "buildpacks" -printf "%P ")

# Buildpacks directory (assuming each subdirectory contains a buildpack)
EXTENSIONS := $(shell find extensions -maxdepth 1 -type d -not -path "extensions" -printf "%P ")
EXTENSIONS ?= $(shell find extensions -maxdepth 1 -type d -not -path "extensions" -printf "%P ")

# Builders directory (assuming each subdirectory contains a builder definition)
BUILDERS := $(shell find builders -maxdepth 1 -type d -not -path "builders" -printf "%P ")
BUILDERS ?= $(shell find builders -maxdepth 1 -type d -not -path "builders" -printf "%P ")

# Define the builder image to use
BUILDER_IMAGE ?= $(word 1, $(BUILDERS))

# Define the allowed frontends
FRONTENDS := jupyterlab vscodium
FRONTENDS ?= jupyterlab vscodium

# Define the frontend image to use
FRONTEND ?= $(word 1, $(FRONTENDS))
Expand All @@ -29,28 +29,28 @@ SAMPLE_IMAGE ?= $(word 1, $(SAMPLE_IMAGES))
all: buildpacks extensions builders samples

buildpacks:
@echo "Building buildpacks..."
@echo "Building buildpacks $(BUILDPACKS)..."
@for bp in $(BUILDPACKS); do \
echo " Building buildpack: $$bp"; \
pack buildpack package $$bp --config buildpacks/$$bp/package.toml --target "linux/amd64"; \
done

extensions:
@echo "Building extensions..."
@echo "Building extensions $(EXTENSIONS)..."
@for extension in $(EXTENSIONS); do \
echo " Building extension: $$extension"; \
pack extension package $$extension --config extensions/$$extension/package.toml; \
done

builders:
@echo "Building builders..."
@echo "Building builders $(BUILDERS)..."
@for builder in $(BUILDERS); do \
echo " Building builder: $$builder"; \
pack builder create $$builder --config builders/$$builder/builder.toml --target "linux/amd64"; \
done

samples:
@echo "Building sample images..."
@echo "Building sample images $(SAMPLE_IMAGES)..."
@for image in $(SAMPLE_IMAGES); do \
echo " Building image: $$image with $(BUILDER_IMAGE)"; \
pack build $$image-$(FRONTEND) --path samples/$$image --env BP_REQUIRES=$(FRONTEND) --builder $(BUILDER_IMAGE) --platform "linux"; \
Expand Down
24 changes: 5 additions & 19 deletions builders/selector/builder.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,35 @@ description = "Ubuntu 22.04 Jammy Jellyfish full image with buildpacks for Apach

[[buildpacks]]
uri = "docker://ghcr.io/swissdatasciencecenter/vscodium-buildpack/vscodium:0.2"
version = "0.2.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure we should un-pin buildpacks that do not live in this repo

Copy link
Member Author

Choose a reason for hiding this comment

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

But the tag for all of them is already in the uri. So why have the tag in two places?


[[buildpacks]]
uri = "../../buildpacks/kernel-installer"
version = "0.0.1"
id = "renku/kernel-installer"

[[buildpacks]]
uri = "../../buildpacks/frontend-selector"
version = "0.0.1"

[[buildpacks]]
uri = "../../buildpacks/jupyterlab"
version = "0.0.1"

[[buildpacks]]
uri = "../../buildpacks/frontends"
version = "0.0.1"
id = "renku/frontends"

[[buildpacks]]
uri = "docker://gcr.io/paketo-buildpacks/go:4.13.11"
version = "4.13.11"
id = "paketo-buildpacks/go"
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

Copy link
Member Author

Choose a reason for hiding this comment

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

But the tag is already in the uri. So why have the tag in two places?


[[buildpacks]]
uri = "docker://gcr.io/paketo-buildpacks/nodejs:7.4.0"
version = "7.4.0"
id = "paketo-buildpacks/nodejs"
Copy link
Collaborator

Choose a reason for hiding this comment

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

here too

Copy link
Member Author

Choose a reason for hiding this comment

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

Tag is in the uri


[[buildpacks]]
uri = "docker://gcr.io/paketo-buildpacks/python:2.24.3"
version = "2.24.3"
id = "paketo-buildpacks/python"
Copy link
Collaborator

Choose a reason for hiding this comment

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

and there

Copy link
Member Author

Choose a reason for hiding this comment

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

Tag is in the uri


[[extensions]]
id = "renku/renku"
version = "0.0.1"
uri = "../../extensions/renku"

[lifecycle]
Expand All @@ -44,46 +40,36 @@ description = "Ubuntu 22.04 Jammy Jellyfish full image with buildpacks for Apach

[[order.group]]
id = "renku/frontends"
version = "0.0.1"
[[order.group]]
id = "paketo-buildpacks/go"
version = "4.13.11"
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

Copy link
Member Author

Choose a reason for hiding this comment

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

We have this though:

[[buildpacks]]
  uri = "docker://gcr.io/paketo-buildpacks/go:4.13.11"
  id = "paketo-buildpacks/go"

[[buildpacks]]
  uri = "docker://gcr.io/paketo-buildpacks/nodejs:7.4.0"
  id = "paketo-buildpacks/nodejs"

[[buildpacks]]
  uri = "docker://gcr.io/paketo-buildpacks/python:2.24.3"
  id = "paketo-buildpacks/python"

[[extensions]]
  id = "renku/renku"
  uri = "../../extensions/renku"

[lifecycle]
  version = "0.20.6"

[[order]]

  [[order.group]]
    id = "renku/frontends"
  [[order.group]]
    id = "paketo-buildpacks/go"
  [[order.group]]
    id = "renku/kernel-installer"
    optional = true

So the tag of the buildpack is already specified in the buildpacks section. In the order we just use the id to refer to that same buildpack. So the versions in the builder are not needed.

[[order.group]]
id = "renku/kernel-installer"
version = "0.0.1"
optional = true

[[order]]

[[order.group]]
id = "renku/frontends"
version = "0.0.1"
[[order.group]]
id = "paketo-buildpacks/python"
version = "2.24.3"
Copy link
Collaborator

Choose a reason for hiding this comment

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

and there

[[order.group]]
id = "renku/kernel-installer"
version = "0.0.1"
optional = true

[[order]]

[[order.group]]
id = "renku/frontends"
version = "0.0.1"
[[order.group]]
id = "paketo-buildpacks/nodejs"
version = "7.4.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

and here

[[order.group]]
id = "renku/kernel-installer"
version = "0.0.1"
optional = true

[[order-extensions]]

[[order-extensions.group]]
id = "renku/renku"
version = "0.0.1"

[stack]
build-image = "docker.io/paketobuildpacks/build-jammy-full:0.1.76"
Expand Down