You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/11/03 07:21:23 UTC

[camel-kafka-connector-examples] branch iam-create-group updated (0fd74ba -> 0eaf071)

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

acosentino pushed a change to branch iam-create-group
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector-examples.git.


 discard 0fd74ba  Added an AWS2 IAM sink example for creating a group
    omit e9d8c27  Added AWS2-IAM Example for deleting user
     add 878b5c3  Added AWS2-IAM Example for deleting user
     add ba6ac53  Changed a bit the description for AWS2-IAM examples
     new 0eaf071  Added an AWS2 IAM sink example for creating a group

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (0fd74ba)
            \
             N -- N -- N   refs/heads/iam-create-group (0eaf071)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[camel-kafka-connector-examples] 01/01: Added an AWS2 IAM sink example for creating a group

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch iam-create-group
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector-examples.git

commit 0eaf0710b853f2cb82f3b7628ff128d8894282e1
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Nov 3 08:19:37 2020 +0100

    Added an AWS2 IAM sink example for creating a group
---
 aws2-iam/aws2-iam-sink-create-group/README.adoc    | 84 ++++++++++++++++++++++
 .../config/CamelAWS2IAMSinkConnector.properties    | 31 ++++++++
 2 files changed, 115 insertions(+)

diff --git a/aws2-iam/aws2-iam-sink-create-group/README.adoc b/aws2-iam/aws2-iam-sink-create-group/README.adoc
new file mode 100644
index 0000000..729b96a
--- /dev/null
+++ b/aws2-iam/aws2-iam-sink-create-group/README.adoc
@@ -0,0 +1,84 @@
+= Camel-Kafka-connector AWS2 IAM Sink for creating a group
+
+This is an example for Camel-Kafka-connector AWS2-IAM Sink for creating a group
+
+== Standalone
+
+=== What is needed
+
+- An AWS Account
+
+=== Running Kafka
+
+[source]
+----
+$KAFKA_HOME/bin/zookeeper-server-start.sh $KAFKA_HOME/config/zookeeper.properties
+$KAFKA_HOME/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties
+$KAFKA_HOME/bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic mytopic
+----
+
+=== Download the connector package
+
+Download the connector package zip and extract the content to a directory. In this example we'll use `/home/oscerd/connectors/`
+
+[source]
+----
+> cd /home/oscerd/connectors/
+> wget https://repo1.maven.org/maven2/org/apache/camel/kafkaconnector/camel-aws2-iam-kafka-connector/0.6.0/camel-aws2-iam-kafka-connector-0.6.0-package.zip
+> unzip camel-aws2-iam-kafka-connector-0.6.0-package.zip
+----
+
+=== Configuring Kafka Connect
+
+You'll need to set up the `plugin.path` property in your kafka
+
+Open the `$KAFKA_HOME/config/connect-standalone.properties` and set the `plugin.path` property to your choosen location:
+
+[source]
+----
+...
+plugin.path=/home/oscerd/connectors
+...
+----
+
+=== Setup the connectors
+
+Open the AWS2 IAM configuration file at `$EXAMPLES/aws2-iam/aws2-iam-sink-create-group/config/CamelAWS2IAMSinkConnector.properties`
+
+[source]
+----
+name=CamelAWS2IAMSinkConnector
+connector.class=org.apache.camel.kafkaconnector.aws2iam.CamelAws2iamSinkConnector
+key.converter=org.apache.kafka.connect.storage.StringConverter
+value.converter=org.apache.kafka.connect.storage.StringConverter
+
+topics=mytopic
+
+camel.sink.path.label=iam-point
+
+camel.component.aws2-iam.operation=createGroup
+
+camel.component.aws2-iam.access-key=<accessKey>
+camel.component.aws2-iam.secret-key=<secretKey>
+camel.component.aws2-iam.region=aws-global
+----
+
+and add the correct credentials for AWS.
+
+=== Running the example
+
+Run the kafka connect with the IAM Sink connector:
+
+[source]
+----
+$KAFKA_HOME/bin/connect-standalone.sh $KAFKA_HOME/config/connect-standalone.properties $EXAMPLES/aws2-iam/aws2-iam-sink/config/CamelAWS2IAMSinkConnector.properties
+----
+
+On a different terminal run the kafkacat producer and send the following message
+
+[source]
+----
+> echo "Test1" | ./kafkacat -b localhost:9092 -t mytopic -H "CamelHeader.CamelAwsIAMGroupName=Camel"
+----
+
+On your AWS IAM console, you should see a new group called Camel.
diff --git a/aws2-iam/aws2-iam-sink-create-group/config/CamelAWS2IAMSinkConnector.properties b/aws2-iam/aws2-iam-sink-create-group/config/CamelAWS2IAMSinkConnector.properties
new file mode 100644
index 0000000..3db91e7
--- /dev/null
+++ b/aws2-iam/aws2-iam-sink-create-group/config/CamelAWS2IAMSinkConnector.properties
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name=CamelAWS2IAMSinkConnector
+connector.class=org.apache.camel.kafkaconnector.aws2iam.CamelAws2iamSinkConnector
+key.converter=org.apache.kafka.connect.storage.StringConverter
+value.converter=org.apache.kafka.connect.storage.StringConverter
+
+topics=mytopic
+
+camel.sink.path.label=iam-point
+
+camel.component.aws2-iam.operation=createGroup
+
+camel.component.aws2-iam.access-key=<accessKey>
+camel.component.aws2-iam.secret-key=<secretKey>
+camel.component.aws2-iam.region=aws-global