Tracardi / tracardi

TRACARDI is a new HOME for your customer data. TRACARDI is an Composable API-first solution for any company that need inexpensive CDP to intergrate with.
https://www.tracardi.com
Other
499 stars 90 forks source link

Write new pluging for NOVU (Add subscriber) #836

Open atompie opened 10 months ago

atompie commented 10 months ago

Integrate a fresh NOVU plugin into Tracardi, focusing solely on adding subscribers. This can be achieved by leveraging an existing plugin that already possesses the "Add subscriber" functionality.

For the specific code related to adding subscribers, you can refer to the example code available at this link: Tracardi NOVU Connector Plugin. Extract the relevant logic from this source to create the new plugin.

To understand how to create this plugin, you can refer to the following resources:

NOVU's documentation on creating subscribers via their API: NOVU Create Subscriber API An existing plugin within Tracardi that connects to NOVU and adds subscribers: Tracardi NOVU Connector Plugin Tracardi's documentation on plugin development: Tracardi Plugin Development

AnuraagReddy123 commented 10 months ago

Hey @atompie I would love to try out this issue! But before I start, is it ok if I take some time completing the issue or do you need it to be done urgently? Because I have to give priority to my university work so I might take some time

atompie commented 10 months ago

@AnuraagReddy123 there is no hurry with this issue. Could you please give me some time-frame when you are able to start working on this?

AnuraagReddy123 commented 10 months ago

After 26th October, mostly and I work on open source projects during the night

AnuraagReddy123 commented 10 months ago

@atompie I have to follow this link to set up my environement right? The setup doc asks me to clone the tracardi-api repository too, will that be necessary?

atompie commented 10 months ago

Yes if you would like to write a plug-in and test it.

AnuraagReddy123 commented 9 months ago

image What is the current development version?

atompie commented 9 months ago

@AnuraagReddy123 0.8.2-dev

AnuraagReddy123 commented 9 months ago

Hey so I got everything up and running, and I am able to check out the http://localhost:8686/docs. But when I tried to execute some APIs I get the "Unauthorized" error image Do I need to create an account somewhere? Also I keep getting this error when I try to install missing components in the tracardi gui

image

atompie commented 9 months ago

@AnuraagReddy123 Could you please check if when you type http://localhost:8686 you get a response like {details: "no found"}

atompie commented 9 months ago

@AnuraagReddy123 An Unauthorized error is because there is no installation and no user to autothorize.

atompie commented 9 months ago

@AnuraagReddy123 By the way, did you start the GUI from the container? If so, then http://localhost:8686/ refers to the container, not your localhost. Please find your laptop's IP and then check in the browser using http://your-laptop-ip:8686/, and then use this URL in the GUI. This is the most probable issue, as Docker must access your API installation on your laptop, and localhost is a Docker IP, not your laptop's

AnuraagReddy123 commented 9 months ago

@AnuraagReddy123 Could you please check if when you type http://localhost:8686 you get a response like {details: "no found"}

Yes that is the response I get image

@AnuraagReddy123 By the way, did you start the GUI from the container? If so, then http://localhost:8686/ refers to the container, not your localhost. Please find your laptop's IP and then check in the browser using http://your-laptop-ip:8686/, and then use this URL in the GUI. This is the most probable issue, as Docker must access your API installation on your laptop, and localhost is a Docker IP, not your laptop's

Yes I was starting the gui in the container, (I am new to docker so not really sure about the right way to start containers) image But even when I try going to http://my-laptop-ip:8686/ I still get the details: not found error. (I found my ip by following this Link

atompie commented 9 months ago

If gui is working that means it is all ok. Docker has its own network so when you type localhost it means the localhost of docker. Could you please check if you type into browser http://your-laptop-ip:8686 will you get the details not found.

atompie commented 9 months ago

Not found is not an error it is correct behavior. If you have this in a browser please go to gui click reload icon near the tracardi api and type the url with your laptop ip.

AnuraagReddy123 commented 9 months ago

Ok so the http://your-laptop-ip:8686/docs link is loading but when I try to execute any of the apis provided there, I still get the unauthorized error. This is the output at the output window of main.py

INFO:     <my_ip_address>:58944 - "GET /test/redis HTTP/1.1" 401 Unauthorized

image Even the tracardi GUI at http://your-laptop-ip:8787/login gives a timeout when trying to register with http://your-laptop-ip:8686. The output at main.py is

INFO:     <my_ip_address>:58974 - "OPTIONS /install HTTP/1.1" 200 OK
WARNING:app.api.install_endpoint:Elasticsearch replicas decreased to 0 due to only one data node in the cluster.
ERROR:tracardi.service.plugin.plugin_install:Module `tracardi.process_engine.action.v1.time.time_difference.plugin` was NOT INSTALLED as it raised an error `No module named 'parser'`.
WARNING:app.api.install_endpoint:There is at least one admin account. New admin account not created.
atompie commented 9 months ago

@AnuraagReddy123 Have you managed to install the system through GUI? Can you paste what happens when you type http://your-laptop-ip:8787 in the browser.