Skip to content

camel-influxdb2 - missing dependencies added after integration test#293

Merged
jbonofre merged 1 commit intoapache:mainfrom
Talend:camel-influxdb2-fix
May 22, 2024
Merged

camel-influxdb2 - missing dependencies added after integration test#293
jbonofre merged 1 commit intoapache:mainfrom
Talend:camel-influxdb2-fix

Conversation

@ozgurkisir-qlik
Copy link
Collaborator

Missing dependecies added for component camel-influxdb2

@jbonofre jbonofre self-requested a review May 22, 2024 07:35
@jbonofre jbonofre merged commit 65b1452 into apache:main May 22, 2024
@ozgurkisir-qlik
Copy link
Collaborator Author

ozgurkisir-qlik commented May 22, 2024

HOW TO TEST camel-influxdb2 ?

For testing 2 different operations of InfluxDB2 (ping, insert),

  • add the repo with updated camel-influxdb2 feature

  • install camel-blueprint,camel-groovy and camel-influxdb2 features on Apache Camel Karaf

  • prepare InfluxDB2 running on a docker container

  • deploy the blueprint file for testing

  • observe the logs

Add the repo with updated camel-influxdb2 feature

repo-add file:/Users/ozgurkisir/talend_workspace/camel-karaf/features/target/feature/camel-features.xml

#Use the updated camel-features.xml to update the repo of your Apache Karaf (use the correct path to camel-features.xml.
Above is just an example file path for my environment)

Install camel-influxdb, camel-blueprint and camel-groovy features

feature:install camel-influxdb2

feature:install camel-blueprint

feature:install camel-groovy

#Check whether they're up&running

feature:list | grep camel-influxdb2

feature:list | grep camel-blueprint

feature:list | grep camel-groovy

Prepare and run a InfluxDB2 docker container

docker run \
 --name influxdb2 \
 --publish 8086:8086 \
 --env DOCKER_INFLUXDB_INIT_USERNAME=admin \
 --env DOCKER_INFLUXDB_INIT_PASSWORD=admin \
 --env DOCKER_INFLUXDB_INIT_ORG=my-org \
 --env DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \
 influxdb:2


Click http://localhost:8086 to enter web UI of InfluxDB2 to make initial settings and getting authentication token.

Screenshot 2024-05-22 at 14 01 35 Screenshot 2024-05-22 at 14 01 58

Unzip and edit file camel-influxdb2-blueprint.xml.zip

camel-influxdb2-blueprint.xml.zip

Copy the authentication token inside camel-influxdb2-blueprint.xml file as the value of query parameter in myDbClient bean argument(where the below code snippet resides)

> <bean id="myDbClient" class="com.influxdb.client.InfluxDBClientFactory" factory-method="create" >
>         <argument value="http://localhost:8086?token=_QGcCkmN0_tzesB9OemUNR7c3WEqk35LV8ymQRhiSy6x9tQIPw0DgWCSpcnC0B_kIEeNG6aLpAoCAV1-lDRzKA==" />
>     </bean>
> 

Copy camel-influxdb2-blueprint.xml file under /deploy folder of your Karaf application

Observe the logs from karaf console

log:tail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants