diff --git a/scripts/helper/create-topics.sh b/scripts/helper/create-topics.sh index d0733b74c..b3f5f492b 100755 --- a/scripts/helper/create-topics.sh +++ b/scripts/helper/create-topics.sh @@ -8,42 +8,44 @@ KAFKA_CLUSTER_ID=$(curl -s --insecure --location --request GET 'https://localhos echo "cluster_id: ${KAFKA_CLUSTER_ID}" +user="superUser:superUser" + curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \ +--user $user \ --header 'Content-Type: application/json' \ ---header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \ --data-binary @<(jq -n --arg topic_name users --arg confluent_value_schema_validation "true" -f ${DIR}/topic.jq) | jq curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \ +--user $user \ --header 'Content-Type: application/json' \ ---header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \ --data-binary @<(jq -n --arg topic_name "wikipedia.parsed" --arg confluent_value_schema_validation "true" -f ${DIR}/topic.jq) | jq curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \ +--user $user \ --header 'Content-Type: application/json' \ ---header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \ --data-binary @<(jq -n --arg topic_name "wikipedia.parsed.count-by-domain" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \ +--user $user \ --header 'Content-Type: application/json' \ ---header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \ --data-binary @<(jq -n --arg topic_name "wikipedia.failed" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \ +--user $user \ --header 'Content-Type: application/json' \ ---header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \ --data-binary @<(jq -n --arg topic_name "WIKIPEDIABOT" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \ +--user $user \ --header 'Content-Type: application/json' \ ---header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \ --data-binary @<(jq -n --arg topic_name "WIKIPEDIANOBOT" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \ +--user $user \ --header 'Content-Type: application/json' \ ---header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \ --data-binary @<(jq -n --arg topic_name "EN_WIKIPEDIA_GT_1" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq curl -s --insecure --location --request POST "https://localhost:8091/kafka/v3/clusters/${KAFKA_CLUSTER_ID}/topics" \ +--user $user \ --header 'Content-Type: application/json' \ ---header 'Authorization: Basic c3VwZXJVc2VyOnN1cGVyVXNlcg==' \ --data-binary @<(jq -n --arg topic_name "EN_WIKIPEDIA_GT_1_COUNTS" --arg confluent_value_schema_validation "false" -f ${DIR}/topic.jq) | jq