You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/07/14 05:24:43 UTC

[camel-k] branch main updated: docs: Remove references to kamel local

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


The following commit(s) were added to refs/heads/main by this push:
     new 0114de4f8 docs: Remove references to kamel local
0114de4f8 is described below

commit 0114de4f8636d87b69725f6fe45a9a5a7d7cef5a
Author: Claudio Miranda <cl...@claudius.com.br>
AuthorDate: Thu Jul 13 17:13:26 2023 -0300

    docs: Remove references to kamel local
---
 docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc |  27 ++--
 docs/modules/ROOT/pages/running/local.adoc         | 172 ---------------------
 docs/modules/ROOT/pages/running/running.adoc       |   4 +-
 3 files changed, 15 insertions(+), 188 deletions(-)

diff --git a/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc b/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
index 8f807688f..27c84a423 100644
--- a/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
+++ b/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
@@ -392,11 +392,10 @@ simpler solution that just requires your own machine:
 
 [source]
 ----
-kamel local run Earthquake.java
+camel run Earthquake.java
 ----
 
-The `local` keyword will tell Camel K to use your own machine (you need maven 3.6+ and Java 11+ in order for this to work).
-The integration will start and begin printing out earthquake data every 10 seconds.
+The `camel run` command relies on https://camel.apache.org/manual/camel-jbang.html[Camel JBang] to locally run the integration. The integration will start and begin printing out earthquake data every 10 seconds.
 
 I show an excerpt of what is printed by the integration:
 
@@ -576,7 +575,7 @@ public class Earthquake extends RouteBuilder {
 This looks the same as before, but notice that the `period` and `lookAhead` parameters are set in the modeline, while the route uses the `{\{period}}`
 and `{\{lookAhead}}` placeholders instead of the actual values.
 
-As before, this integration can be tested with `kamel local run Earthquake.java` (the modeline parameters will be automatically added by the kamel CLI).
+As before, this integration can be tested with `camel run Earthquake.java` (the modeline parameters will be automatically added by the kamel CLI).
 
 === Step 4 (optional): translate into YAML DSL
 
@@ -600,7 +599,7 @@ If we managed to reduce our integration to contain only a Camel route, convertin
     - set-header:
         name: CamelCaffeineAction
         constant: GET
-    - tod: "caffeine-cache:cache-${routeId}?key=lastUpdate"
+    - toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
     - choice:
         when:
         - simple: "${header.CamelCaffeineActionHasResult}"
@@ -616,7 +615,7 @@ If we managed to reduce our integration to contain only a Camel route, convertin
     - set-header:
         name: CamelHttpMethod
         constant: GET
-    - tod: "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&updatedafter=${exchangeProperty.lastUpdate}&orderby=time-asc"
+    - toD: "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&updatedafter=${exchangeProperty.lastUpdate}&orderby=time-asc"
     - unmarshal:
         json: {}
     - set-property:
@@ -632,7 +631,7 @@ If we managed to reduce our integration to contain only a Camel route, convertin
     - set-header:
         name: CamelCaffeineAction
         constant: PUT
-    - tod: "caffeine-cache:cache-${routeId}?key=lastUpdate"
+    - toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
     - claim-check:
         operation: Pop
     - split:
@@ -654,7 +653,7 @@ This route can be run like the previous one using the `kamel` CLI:
 
 [source]
 ----
-kamel local run earthquake.yaml
+camel run earthquake.yaml
 ----
 
 === Step 5: wrap it into a Kamelet
@@ -681,7 +680,7 @@ spec:
       - set-header:
           name: CamelCaffeineAction
           constant: GET
-      - tod: "caffeine-cache:cache-${routeId}?key=lastUpdate"
+      - toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
       - choice:
           when:
           - simple: "${header.CamelCaffeineActionHasResult}"
@@ -697,7 +696,7 @@ spec:
       - set-header:
           name: CamelHttpMethod
           constant: GET
-      - tod: "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&updatedafter=${exchangeProperty.lastUpdate}&orderby=time-asc"
+      - toD: "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&updatedafter=${exchangeProperty.lastUpdate}&orderby=time-asc"
       - unmarshal:
           json: {}
       - set-property:
@@ -713,7 +712,7 @@ spec:
       - set-header:
           name: CamelCaffeineAction
           constant: PUT
-      - tod: "caffeine-cache:cache-${routeId}?key=lastUpdate"
+      - toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
       - claim-check:
           operation: Pop
       - split:
@@ -823,7 +822,7 @@ spec:
       - set-header:
           name: CamelCaffeineAction
           constant: GET
-      - tod: "caffeine-cache:cache-${routeId}?key=lastUpdate"
+      - toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
       - choice:
           when:
           - simple: "${header.CamelCaffeineActionHasResult}"
@@ -839,7 +838,7 @@ spec:
       - set-header:
           name: CamelHttpMethod
           constant: GET
-      - tod: "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&updatedafter=${exchangeProperty.lastUpdate}&orderby=time-asc"
+      - toD: "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&updatedafter=${exchangeProperty.lastUpdate}&orderby=time-asc"
       - unmarshal:
           json: {}
       - set-property:
@@ -855,7 +854,7 @@ spec:
       - set-header:
           name: CamelCaffeineAction
           constant: PUT
-      - tod: "caffeine-cache:cache-${routeId}?key=lastUpdate"
+      - toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
       - claim-check:
           operation: Pop
       - split:
diff --git a/docs/modules/ROOT/pages/running/local.adoc b/docs/modules/ROOT/pages/running/local.adoc
deleted file mode 100644
index 899fc835e..000000000
--- a/docs/modules/ROOT/pages/running/local.adoc
+++ /dev/null
@@ -1,172 +0,0 @@
-[[running-locally]]
-= Running Locally
-
-While Camel K is a framework for running integrations on a cloud, it also allows you to run your integration locally during development.
-
-NOTE: Not all features are available for the local running. See <<running-locally-limitations>>.
-
-== Available Commands
-
-Available subcommands for `kamel local` are:
-
-.Available Commands
-[cols="1m,2,2m"]
-|===
-|Name |Description |Example
-
-|build
-|Build integration images locally
-|kamel local build
-
-|inspect
-|Generate dependencies list given integration files
-|kamel local inspect
-
-|run
-|Run integration locally
-|kamel local run
-
-|===
-
-To run an integration locally:
-
-[source,console]
-----
-$ kamel local run hello.groovy
-----
-
-To inspect which dependencies are resolved in the integration you are developing:
-
-[source,console]
-----
-$ kamel local inspect hello.groovy
-----
-
-For more information on what options each subcommand accepts, run it with the `--help` option:
-
-[source,console]
-----
-$ kamel local <subcommand> --help
-----
-
-== Local Build
-
-The `local build` subcommand can build integration images locally for development purposes. It provides three main use cases:
-
-1. <<running-locally-build-integration,Build an integration image locally>>
-2. <<running-locally-build-base-image,Build only a base image locally>>
-3. <<running-locally-create-directory,Create a directory structure for an integration>>
-
-[CAUTION]
-====
-It is not intended to be a feature for packaging integrations for later deployment on a Kubernetes cluster. It is purely for development and running on Docker.
-
-To package an integration, use `kamel kit create` to create an `IntegrationKit` on a cluster as a way to package your self-contained resources. Then you can move those kits and reuse them on another cluster.
-====
-
-[[running-locally-build-integration]]
-=== Building an integration
-
-To build an integration image locally, you at least need to specify an image name with the `--image` option in addition to the integration files you want to build.
-
-[source,console]
-----
-$ kamel local build --image=docker.io/myrepo/hello hello.groovy
-----
-
-[[running-locally-build-base-image]]
-=== Building a base image
-
-You can also build only a base image (`integration-base-image`) locally that all integration images are based on. It requires two options, `--base-image` and `--container-registry`, and no arguments.
-
-[source,console]
-----
-$ kamel local build --base-image --container-registry=docker.io/myrepo
-----
-
-It will create a `docker.io/myrepo/integration-base-image:latest` image locally.
-
-[[running-locally-create-directory]]
-=== Creating a directory structure
-
-You can create a directory structure with the integration files: property files, routes, and dependencies.
-
-[source,console]
-----
-$ kamel local build --integration-directory <dir-name> file1.yaml file2.java file3.groovy
-----
-
-The directory will be created in the parent directory of where the command was invoked and will contain the following directory structure:
-----
-<dir-name>/
-├── dependencies/
-├── properties/
-└── routes/
-----
-
-The `properties`, `routes`, and `dependencies` subdirectories will contain the respective integration files.
-
-For convenience you can output just the dependencies with `--dependencies-only` as follows:
-[source,console]
-----
-$ kamel local build --integration-directory <dir-name> --dependencies-only file1.yaml file2.java file3.groovy
-----
-
-The created integration directory can later be run with the `local run` subcommand. See <<running-locally-run-directory>>.
-
-== Local Run
-
-You can run integrations locally with the `local run` subcommand.
-
-[source,console]
-----
-$ kamel local run hello.groovy
-----
-
-[[running-locally-run-image]]
-=== Running with an image
-
-You can also run an integration from an image which has been already built with the `local build` subcommand:
-
-[source,console]
-----
-$ kamel local run --image=docker.io/myrepo/hello
-----
-
-You can also build and run an image all at once with the `--containerize` option:
-
-[source,console]
-----
-$ kamel local run --containerize --image=docker.io/myrepo/hello hello.groovy
-----
-
-[[running-locally-run-directory]]
-=== Running with an integration directory
-
-The `local run` subcommand can take as input an integration directory constructed by `local build`.
-
-NOTE: Only full integration directories can be processed; i.e. directories created with `--dependencies-only` are not supported.
-
-`local run` can use an integration directory as input and run the integration locally:
-[source,console]
-----
-$ kamel local run --integration-directory <dir-name>
-----
-
-`local run` can use an integration directory and run the integration within a container:
-[source,console]
-----
-$ kamel local run --integration-directory <dir-name> --containerize --network=host --image <image-name>
-----
-
-For now, if route files contain modeline options which depend on lazily evaluated environment variables (for example, `\[[env:ENV_VAR]]`) then the command above will need to specify the environment variable explicitly like so:
-[source,console]
-----
-$ kamel local run --integration-directory <dir-name> --env ENV_VAR
-$ kamel local run --integration-directory <dir-name> --containerize --network=host --image <image-name> --env ENV_VAR
-----
-
-[[running-locally-limitations]]
-== Limitations
-
-* Since there is no platform to leverage, traits are not usable for `kamel local` commands. If you specify any traits in the xref:cli/modeline.adoc[modeline], they are simply ignored; The commands show a warning and run an integration locally without traits.
diff --git a/docs/modules/ROOT/pages/running/running.adoc b/docs/modules/ROOT/pages/running/running.adoc
index aca8eee10..311526d0b 100644
--- a/docs/modules/ROOT/pages/running/running.adoc
+++ b/docs/modules/ROOT/pages/running/running.adoc
@@ -60,14 +60,14 @@ Camel K provide a very nice **dev mode** feature that will allow you to apply an
 [[running-integration-locally]]
 == Running an Integration locally
 
-During development, you can also run your integration locally with `kamel local` sub commands. Check out xref:running/local.adoc[Running Locally] for how to use the commands.
+During development, for most of the cases, if you are not using Camel K traits or specific camel quarkus configuration, you can use https://camel.apache.org/manual/camel-jbang.html[Camel JBang] to run the integration.
 
 [[no-cli-integration]]
 == Running an Integration without CLI
 
 You can run your integration also if you have no CLI available. `kamel` CLI manages a lot of fancy features but you can create an xref:apis/camel-k.adoc#_camel_apache_org_v1_Integration[Integration Custom Resource] with all the configuration expected to run your application.
 
-As an example, let's get the result of a **dry run** for a sample route: 
+As an example, let's get the result of a **dry run** for a sample route:
 
 ```
 kamel run Sample.java -o yaml