Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Share integrations#240

Merged
tzununbekov merged 3 commits intomainfrom
import-manifest
Feb 3, 2023
Merged

Share integrations#240
tzununbekov merged 3 commits intomainfrom
import-manifest

Conversation

@tzununbekov
Copy link
Copy Markdown
Member

New feature

This PR introduces the new tmctl import command that would allow users to share their integrations.

Sample flow

  1. Create an integration:
    1.1 start the broker

    tmctl create broker foo
    

    1.2 create the source (AWS SQS for example)

    tmctl create source awssqs --arn arn:aws:sqs:eu-central-1:000000000000:foo-queue --auth.credentials.accessKeyID <redacted> --auth.credentials.secretAccessKey <redacted>
    

    1.3 create the target (eg. sockeye)

    tmctl create target --from-image docker.io/n3wscott/sockeye:v0.7.0  --name sockeye
    

    1.4 create the transformation to complete the flow

    tmctl create transformation --source foo-awssqssource --target sockeye <<EOF
    data:
    - operation: add
      paths:
      - key: new-field
        value: hello from Transformation!
    EOF
    
  2. Export the integration:

tmctl dump --no-secrets > foo-integration.yaml

tmctl dump without --no-secrets flag will produce the manifest with AWS SQS credentials. Be careful with sharing those.

2.1 (Optional) Replace arn:aws:sqs:eu-central-1:000000000000:foo-queue in the foo-integration.yaml with <user_input> to request SQS queue ARN on import.

  1. Send foo-integration.yaml to someone who wants to run the integration on their machine or upload it as gist.

  2. On receiving side, just execute tmctl import -f <path/url>, type in requested values (creds, arns), start the integration. Sample manifest with the described integration can be imported from the public gist:

tmctl import -f https://gist.githubusercontent.com/tzununbekov/c19c68706004f92f354bfb2fce49b705/raw/60f495cd7bce0dac94a5dd1d68031c3def9813b8/foo-integration.yaml
tmctl start foo

@tzununbekov tzununbekov self-assigned this Feb 3, 2023
@tzununbekov tzununbekov force-pushed the import-manifest branch 2 times, most recently from e86215b to 6f179f5 Compare February 3, 2023 09:51
@tzununbekov tzununbekov merged commit 2c2db93 into main Feb 3, 2023
@tzununbekov tzununbekov deleted the import-manifest branch February 3, 2023 10:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant