halkyonio / tap

Scripts and documentation about Tanzu Application Platform - TAP introducing it like to (un)install and demo it
16 stars 1 forks source link

Create another ClusterSupplyChain able to build a quarkus app using our builder #3

Closed cmoulliard closed 2 years ago

cmoulliard commented 2 years ago

Enhancement

Create another ClusterSupplyChain CRD able to build a quarkus app using the quarkus builder and not the Paketo java builder.

Why: The Paketo java builder proposed on TAP (see hereafter the list of the images - command kubectl get clusterbuilders.kpack.io/default) do not support to build a Quarkus application !

The error reported by TAP can be reproduced using pack

git clone git@github.com:halkyonio/quarkus-tap-petclinic.git && cd quarkus-tap-petclinic
pack build quarkus_app -p ./ -B paketobuildpacks/builder:base
docker run -d -p 8080:8080 -e PORT=8080 quarkus_app
docker logs f494f6ae8a9e
ERROR: failed to launch: determine start command: when there is no default process a command is required

FYI: Here is doc explaining the Workload and supply chain which could help to design a new supplychain where we could specify a quarkus image-builder and a quarkus selector: https://cartographer.sh/docs/v0.2.0/architecture/#clustersupplychain

Image builder

Snippet code of the ClusterSupplyChain/source-to-url - image-builder Command used: kubectl get clustersupplychains.carto.run/source-to-url -o yaml

    - name: image-builder
      params:
      - name: serviceAccount
        value: default
      - name: clusterBuilder
        value: default
      - name: registry
        value:
          repository: halkyonio
          server: ghcr.io
      sources:
        - name: source
          resource: source-provider
      templateRef:
        kind: ClusterImageTemplate
        name: kpack-template

TAP - Paketo images

  builderMetadata:
  - homepage: https://github.com/paketo-buildpacks/bellsoft-liberica
    id: paketo-buildpacks/bellsoft-liberica
    version: 9.0.1
  - homepage: https://github.com/paketo-buildpacks/spring-boot
    id: paketo-buildpacks/spring-boot
    version: 5.2.0
  - homepage: https://github.com/paketo-buildpacks/apache-tomcat
    id: paketo-buildpacks/apache-tomcat
    version: 7.0.2
  - homepage: https://github.com/paketo-buildpacks/google-stackdriver
    id: paketo-buildpacks/google-stackdriver
    version: 5.1.1
  - homepage: https://github.com/paketo-buildpacks/azure-application-insights
    id: paketo-buildpacks/azure-application-insights
    version: 5.1.1
  - homepage: https://github.com/paketo-buildpacks/ca-certificates
    id: paketo-buildpacks/ca-certificates
    version: 3.0.1
  - id: tanzu-buildpacks/dotnet-core-sdk-lite
    version: 0.3.0
  - id: tanzu-buildpacks/dotnet-core-runtime-lite
    version: 0.3.0
  - id: tanzu-buildpacks/node-engine-lite
    version: 0.8.2
  - id: tanzu-buildpacks/node-engine-lite
    version: 0.8.1
  - id: tanzu-buildpacks/dotnet-core-aspnet-lite
    version: 0.3.0
  - homepage: https://github.com/pivotal-cf/tanzu-cpython
    id: tanzu-buildpacks/cpython-lite
    version: 0.2.0
  - id: tanzu-buildpacks/go-dist-lite
    version: 0.6.4
  - id: tanzu-buildpacks/node-module-bom-lite
    version: 0.1.3
  - homepage: https://github.com/pivotal-cf/tanzu-pip
    id: tanzu-buildpacks/pip-lite
    version: 0.6.2
  - homepage: https://github.com/pivotal-cf/tanzu-pipenv
    id: tanzu-buildpacks/pipenv-lite
    version: 0.2.3
  - homepage: https://github.com/pivotal-cf/tanzu-miniconda
    id: tanzu-buildpacks/miniconda-lite
    version: 0.1.3
  - homepage: https://github.com/paketo-buildpacks/procfile
    id: paketo-buildpacks/procfile
    version: 5.0.1
  - id: tanzu-buildpacks/dep-lite
    version: 0.1.3
  - id: tanzu-buildpacks/yarn-lite
    version: 0.3.2
  - homepage: https://github.com/paketo-buildpacks/encrypt-at-rest
    id: paketo-buildpacks/encrypt-at-rest
    version: 4.0.1
  - homepage: https://github.com/paketo-buildpacks/maven
    id: paketo-buildpacks/maven
    version: 6.0.1
  - homepage: https://github.com/paketo-buildpacks/sbt
    id: paketo-buildpacks/sbt
    version: 6.0.3
  - homepage: https://github.com/paketo-buildpacks/gradle
    id: paketo-buildpacks/gradle
    version: 6.0.1
  - homepage: https://github.com/paketo-buildpacks/clojure-tools
    id: paketo-buildpacks/clojure-tools
    version: 2.0.1
  - homepage: https://github.com/paketo-buildpacks/leiningen
    id: paketo-buildpacks/leiningen
    version: 4.0.1
  - id: tanzu-buildpacks/icu-lite
    version: 0.0.13
  - homepage: https://github.com/paketo-buildpacks/watchexec
    id: paketo-buildpacks/watchexec
    version: 2.0.1
  - homepage: https://github.com/paketo-buildpacks/upx
    id: paketo-buildpacks/upx
    version: 3.0.0
  - homepage: https://github.com/paketo-buildpacks/syft
    id: paketo-buildpacks/syft
    version: 1.3.0
  - homepage: https://github.com/paketo-buildpacks/watchexec
    id: tanzu-buildpacks/watchexec-lite
    version: 2.0.1
  - id: tanzu-buildpacks/go-build
    version: 0.3.1
  - id: tanzu-buildpacks/dotnet-publish
    version: 0.5.0
  - id: tanzu-buildpacks/dotnet-execute
    version: 0.4.0
  - homepage: https://github.com/pivotal-cf/tanzu-pipenv-install
    id: tanzu-buildpacks/pipenv-install
    version: 0.1.5
  - id: tanzu-buildpacks/npm-install
    version: 0.5.2
  - id: tanzu-buildpacks/yarn-install
    version: 0.3.1
  - id: tanzu-buildpacks/dep-ensure
    version: 0.1.2
  - id: tanzu-buildpacks/go-mod-vendor
    version: 0.2.2
  - homepage: https://github.com/pivotal-cf/tanzu-pip-install
    id: tanzu-buildpacks/pip-install
    version: 0.2.1
  - homepage: https://github.com/pivotal-cf/tanzu-conda-env-update
    id: tanzu-buildpacks/conda-env-update
    version: 0.1.3
  - id: tanzu-buildpacks/node-run-script
    version: 0.2.1
  - id: tanzu-buildpacks/npm-start
    version: 0.2.2
  - id: tanzu-buildpacks/yarn-start
    version: 0.2.2
  - id: tanzu-buildpacks/node-start
    version: 0.3.2
  - homepage: https://github.com/pivotal-cf/tanzu-python-start
    id: tanzu-buildpacks/python-start
    version: 0.4.1
  - homepage: https://github.com/paketo-buildpacks/native-image
    id: paketo-buildpacks/native-image
    version: 5.0.1
  - homepage: https://github.com/paketo-buildpacks/executable-jar
    id: paketo-buildpacks/executable-jar
    version: 6.0.1
  - homepage: https://github.com/paketo-buildpacks/dist-zip
    id: paketo-buildpacks/dist-zip
    version: 5.0.1
  - homepage: https://github.com/paketo-buildpacks/environment-variables
    id: paketo-buildpacks/environment-variables
    version: 4.0.1
  - homepage: https://github.com/paketo-buildpacks/image-labels
    id: paketo-buildpacks/image-labels
    version: 4.0.1
  - homepage: https://github.com/paketo-buildpacks/java
    id: tanzu-buildpacks/java-lite
    version: 6.3.0
  - homepage: https://github.com/paketo-buildpacks/java-native-image
    id: tanzu-buildpacks/java-native-image-lite
    version: 6.3.0
  - homepage: https://docs.pivotal.io/tanzu-buildpacks/nodejs/nodejs-buildpack.html
    id: tanzu-buildpacks/nodejs-lite
    version: 1.13.3
  - homepage: https://docs.pivotal.io/tanzu-buildpacks/dotnet-core/dotnet-core-buildpack.html
    id: tanzu-buildpacks/dotnet-core-lite
    version: 1.11.0
  - homepage: https://docs.pivotal.io/tanzu-buildpacks/go/go-buildpack.html
    id: tanzu-buildpacks/go-lite
    version: 1.10.3
  - id: tanzu-buildpacks/python-lite
    version: 1.1.3
cmoulliard commented 2 years ago

Done. See here