Table of Contents
-
RHTAP access
Don’t forget first to be logged to your favorite registry and to have the permissions to push an image
Example:
QUAY_USERNAME="<QUAY_USERNAME>"
QUAY_PASSWORD="<QUAY_PASSWORD>"
docker logout quay.io
docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io|
💡
|
You can easily and locally run a kubernetes cluster using kind with the scripts developed by the Snowdrop team curl -s -L "https://raw.githubusercontent.com/snowdrop/k8s-infra/main/kind/kind.sh" | bash -s install
curl -s -L "https://raw.githubusercontent.com/snowdrop/k8s-infra/main/kind/registry.sh" | bash -s install --registry-name kind-registry.local |
cd ~/temp; rm -rf quarkus-hello
mvn io.quarkus.platform:quarkus-maven-plugin:3.3.2:create \
-DprojectGroupId=me.snowdrop \
-DprojectArtifactId=quarkus-hello \
-DprojectVersion=1.0 \
-Dextensions='resteasy-reactive,kubernetes,buildpack'
cd quarkus-hello
./mvnw install -Dquarkus.container-image.build=true \
-Dquarkus.buildpack.jvm-builder-image=paketobuildpacks/builder-jammy-tiny:0.0.211 \
-Dquarkus.container-image.image="quay.io/ch007m/quarkus-hello:1.0" \
-Dquarkus.buildpack.builder-env.BP_NATIVE_IMAGE="false" \
-Dquarkus.buildpack.builder-env.BP_MAVEN_BUILT_ARTIFACT="target/quarkus-app/lib/ target/quarkus-app/*.jar target/quarkus-app/app/ target/quarkus-app/quarkus/" \
-Dquarkus.buildpack.builder-env.BP_MAVEN_BUILD_ARGUMENTS="package -DskipTests=true -Dmaven.javadoc.skip=true -Dquarkus.package.type=fast-jar"Test the quarkus application
docker push quay.io/ch007m/quarkus-hello:1.0
docker run --platform linux/amd64 -i --rm -p 8080:8080 quay.io/ch007m/quarkus-hello:1.0 &Using curl or http
http :8080/hellocd ~/temp; rm -rf quarkus-hello
mvn io.quarkus.platform:quarkus-maven-plugin:3.3.2:create \
-DprojectGroupId=me.snowdrop \
-DprojectArtifactId=quarkus-hello \
-DprojectVersion=1.0 \
-Dextensions='resteasy-reactive,kubernetes,buildpack'
cd quarkus-hello
./mvnw clean package
pack build quay.io/ch007m/quarkus-hello --path . \
--builder quay.io/snowdrop/ubi-builder:0.1.1 \
--volume $HOME/.m2:/home/cnb/.m2:rw \
--publishLet’s pull the image
IMAGE=quay.io/ch007m/quarkus-hello:latest
docker pull $IMAGE
docker run -i --rm -p 8080:8080 $IMAGE &Test the quarkus application
http :8080/hellocd ~/temp; rm -rf nodejs-rest-http
git clone https://github.com/nodeshift-starters/nodejs-rest-http
cd nodejs-rest-http
pack build quay.io/ch007m/nodejs-pack-test \
--path . \
--builder paketobuildpacks/builder-ubi8-base \
--publishLet’s pull the image
docker pull quay.io/ch007m/nodejs-pack-test
docker run --platform linux/amd64 -i --rm -p 8080:8080 quay.io/ch007m/nodejs-pack-test &Test the quarkus application
http :8080/api/greeting name==charlesYou can install first Tekton, Dashboard and ingress route on kind using the commands:
./scripts/play-with-tekton install-tekton
./scripts/play-with-tekton install-tekton-dashboard|
💡
|
Review the instructions defined within the |
Next play with a pipelinerun:
./scripts/play-with-tekton /Users/cmoullia/code/redhat-buildpacks/testing/k8s/tekton/examples/pipeline-run-quarkus.yml
./scripts/play-with-tekton /Users/cmoullia/code/redhat-buildpacks/testing/k8s/tekton/examples/pipeline-run-nodejs-extension.yml