This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 374822a618c5f74e7833fd07b23aa75e6e14e85b
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Tue Jun 6 09:55:38 2023 +0200

    chore(doc): multi arch support update
---
 .github/actions/kamel-build-binary/build-binary.sh |  6 ++---
 .../ROOT/pages/contributing/local-development.adoc | 11 ++++++++
 .../installation/advanced/multi-architecture.adoc  | 31 +++++++---------------
 script/Makefile                                    |  6 ++++-
 4 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/.github/actions/kamel-build-binary/build-binary.sh 
b/.github/actions/kamel-build-binary/build-binary.sh
index 435149301..a1ca0fb81 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}
@@ -98,9 +98,9 @@ fi
 echo "Moving kamel binary to be visible on PATH"
 
 if [ "$RUNNER_OS" == "macOS" ]; then
-  ${SUDO} mv ./kamel /usr/local/bin
+  ${SUDO} mv $(readlink kamel) /usr/local/bin/kamel
 else
-  ${SUDO} mv ./kamel /usr/bin
+  ${SUDO} mv $(readlink kamel) /usr/bin/kamel
 fi
 echo "Kamel version installed: $(kamel version)"
 
diff --git a/docs/modules/ROOT/pages/contributing/local-development.adoc 
b/docs/modules/ROOT/pages/contributing/local-development.adoc
index ff6197b55..a5729205b 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=<path/to/local/ck-runtime/project>
 
 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:<version>-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 91b6fbb7c..931938762 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:<version>-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:<version>-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 f500f26a8..94ba6b0e1 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -343,7 +343,7 @@ test-quarkus-native-high-memory: do-build
 
 build-kamel:
        @echo "####### Building kamel CLI for $(IMAGE_ARCH) architecture..."
-       GOOS=linux GOARCH=$(IMAGE_ARCH) go build $(GOFLAGS) -o 
build/_output/bin/kamel-$(IMAGE_ARCH) ./cmd/kamel/*.go
+       CGO_ENABLED=0 GOOS=linux GOARCH=$(IMAGE_ARCH) go build $(GOFLAGS) -o 
build/_output/bin/kamel-$(IMAGE_ARCH) ./cmd/kamel/*.go
        # Symbolic link to a local CLI
        ln -sf build/_output/bin/kamel-$(IMAGE_ARCH) ./kamel
 
@@ -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

Reply via email to