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 2023/07/11 09:46:25 UTC

[camel-kamelets] 01/03: Added AWS SQS Infra file for Ansible

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

acosentino pushed a commit to branch aws-sqs-infra
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 5dcb95a4c7948ee7569c2ab322d13231be452a73
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jul 11 11:34:35 2023 +0200

    Added AWS SQS Infra file for Ansible
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 infra/aws-sqs/Readme.md            | 52 ++++++++++++++++++++++++++++++++++++++
 infra/aws-sqs/ansible/aws-sqs.yaml | 10 ++++++++
 2 files changed, 62 insertions(+)

diff --git a/infra/aws-sqs/Readme.md b/infra/aws-sqs/Readme.md
new file mode 100644
index 00000000..fd13eb45
--- /dev/null
+++ b/infra/aws-sqs/Readme.md
@@ -0,0 +1,52 @@
+# Apache Camel Kamelets - AWS SQS Commodity Configuration files
+
+In this directory you'll find:
+
+- Ansible
+- Terraform
+- Cloudformation 
+
+Configuration files, to be used for creating your infra for using AWS S3 Kamelets.
+
+This will create an SQS Queue with basic functionalities.
+
+## Ansible
+
+The commmand to create the infra is:
+
+```bash
+ansible-playbook -v ansible/aws-sqs.yaml --extra-vars queue_name=<queue_name> --extra-vars region=<region>
+```
+
+## Terraform
+
+The commmand to create the infra is:
+
+```bash
+$ cd terraform/
+$ terraform init
+$ terraform apply -var="bucket_name=<bucket-name>"
+```
+
+Once completed do:
+
+```bash
+$ cd terraform/
+$ terraform destroy
+```
+
+## Cloudformation
+
+The commmand to create the infra is:
+
+```bash
+$ aws cloudformation deploy --template-file cloudformation/aws-s3.yaml --stack-name my-new-stack --parameter-overrides BucketName=<bucket-name>
+```
+
+Once completed do:
+
+```bash
+$ aws cloudformation delete-stack --stack-name my-new-stack
+```
+
+
diff --git a/infra/aws-sqs/ansible/aws-sqs.yaml b/infra/aws-sqs/ansible/aws-sqs.yaml
new file mode 100644
index 00000000..1dd3b5bb
--- /dev/null
+++ b/infra/aws-sqs/ansible/aws-sqs.yaml
@@ -0,0 +1,10 @@
+---
+- name: Create AWS SQS Queue
+  hosts: localhost
+  tasks:
+    - name: Create SQS Queue
+      community.aws.sqs_queue:
+        name: "{{ queue_name }}"
+        state: present
+        region: "{{ region }}"
+      register: created_queue