diff --git a/.github/actions/kamel-build-binary/build-binary.sh b/.github/actions/kamel-build-binary/build-binary.sh index 435149301e..08347a8451 100755 --- a/.github/actions/kamel-build-binary/build-binary.sh +++ b/.github/actions/kamel-build-binary/build-binary.sh @@ -89,7 +89,7 @@ else fi if [ -n "${REGISTRY_PUSH_HOST}" ]; then - RULES="${RULES} images-push" + RULES="${RULES} image-push" fi make ${RULES} diff --git a/docs/modules/ROOT/pages/contributing/local-development.adoc b/docs/modules/ROOT/pages/contributing/local-development.adoc index ff6197b552..a5729205be 100644 --- a/docs/modules/ROOT/pages/contributing/local-development.adoc +++ b/docs/modules/ROOT/pages/contributing/local-development.adoc @@ -31,6 +31,7 @@ This command will build and publish your actual Camel K development version to t You can provide any customization required such as `--log-level`, `--operator-id`, etcetera. Mind that you need to use `./kamel` in order to use the development binary you've just built, as tipically, `kamel` is the production CLI you have installed in your binary path. +[[local-camel-k-runtime]] === Local Camel K runtime Camel K integrations are based on https://github.com/apache/camel-k-runtime[Camel K runtime], generally paired with the operator release. If you need to specify a different runtime, or you have a local Camel K Runtime that you want to test you need to build a Camel K version bundled with the local Camel K Runtime bits @@ -41,3 +42,13 @@ make images CAMEL_K_RUNTIME_DIR= Once this is done you need to re-install via `./kamel install`. +[[local-multi-arch]] +=== Local Multiple Architecture + +Since Camel K version 2 we're introducing the support for multiple architecture. If you want to build your container image operator for a specific architecture, you can provide a parameter, `IMAGE_ARCH`. See the example: + +---- +IMAGE_ARCH=arm64 make images +---- + +With this configuration, you will build an ARM64 architecture container image that you can reference later as `apache/camel-k:-arm64`. \ No newline at end of file diff --git a/docs/modules/ROOT/pages/installation/advanced/multi-architecture.adoc b/docs/modules/ROOT/pages/installation/advanced/multi-architecture.adoc index 91b6fbb7c0..9319387624 100644 --- a/docs/modules/ROOT/pages/installation/advanced/multi-architecture.adoc +++ b/docs/modules/ROOT/pages/installation/advanced/multi-architecture.adoc @@ -1,37 +1,24 @@ [[multi-architecture-props]] = Multi Architecture -To use kamel inside other architecture like arm64 you must build it and use Buildah as builder strategy. +NOTE: this part is evolving quickly during development of version 2 so it may be slightly inaccurate. -NOTE: For now only arm64 is supported as other architectures +To use Camel K operator with any architecture like `arm64` you must use Buildah as builder strategy. -[[multi-architecture-build]] -== Build and Publish Kamel - -As first step it's necessary to build kamel project `https://github.com/apache/camel-k` manually and push image to own docker repository. - -I suggest to create a free docker image repository with `docker-hub` or `ghcr`. - -[source,shell] -.script/Makefile ----- -make build images-arch images-push ----- - -NOTE: The base image of kamel operator is graalvm because multi architecture quarkus-mandrel image not published yet +Since version 2, Camel K is publishing an ARM64 architecture beside the default AMD64 architecture. You need to reference this as `apache/camel-k:-arm64`. You can build your particular architecture from source, following the guidelines in xref:contributing/local-development.adoc[Local development]. [[multi-architecture-install]] -== Install Kamel +== Install Camel K ARM64 operator -Proceed with installation of kamel inside kubernetes cluster with the below command +Proceed with installation of kamel inside kubernetes cluster with the below command: [source,shell] ---- -./kamel install --build-publish-strategy=Buildah --registry YOUR_REGISTRY --registry-auth-username YOUR_USERNAME --registry-auth-password YOUR_PASSWORD +kamel install --operator-image=apache/camel-k:-arm64 --build-publish-strategy Buildah --build-publish-strategy-option BuildahPlatform=linux/arm/v8 --registry ... ---- [[multi-architecture-use]] -== Use kamel +== Test an integration Build and run an integration @@ -52,7 +39,7 @@ kamel run hello.groovy [[multi-architecture-configure-optional]] == Optional Buildah Configuration -If you want change the default architecture of buildah build strategy, you must edit integration platform manually. +If you want change the default architecture of Buildah build strategy once this is installed, you must edit integration platform manually. [source,shell] ---- @@ -78,4 +65,4 @@ status: BuildahPlatform: linux/arm/v8 ---- -NOTE: It's important to know buidah supports only amd64 and arm64 +NOTE: It's important to know Buidah supports only amd64 and arm64 diff --git a/script/Makefile b/script/Makefile index f500f26a8a..36ec113a44 100644 --- a/script/Makefile +++ b/script/Makefile @@ -437,6 +437,10 @@ else docker build --platform=linux/$(IMAGE_ARCH) -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-$(IMAGE_ARCH) -f build/Dockerfile . endif +# Mainly used for internal CI purposes +image-push: + docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION) + images-push: docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION) docker push $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-arm64