I want to configure a dataservice with a MongoDB Datasource.
I have configured MongoDB in the EI 6.6.0 dashboard panel (Create -> DataService) and you can see the MongoDB source type. The EI generate a dataservice with the next datasource:
<config enableOData="false" id="MongoDB_Datasource">
<property name="mongoDB_servers">mmongodev01:27017,vmmongodev02:27017,vmmongodev03:27017</property>
<property name="mongoDB_database">DatabaseName</property>
<property name="username">User</property>
<property name="password">Pass</property>
<property name="mongoDB_write_concern">NONE</property>
<property name="mongoDB_read_preference">PRIMARY</property>
</config>
How can I create that datasource in the Datasource option (Home > Configure > Datasources)
I want to have in my dataservice the next config:
<config enableOData="false" id="Datasource">
<property name="carbon_datasource_name">mongodb-datasource</property>
</config>
How can I add a Datasource in the dashboard of EI 6.6.0, I can’t see MongoDB option, I have tried RDBMS and Custom but I don’t get that work it.
1
MongoDB is not an RDBMS database so you can’t add a datasource using RDBMS type. Only option is to use custom datasource. For that you can use the implementation as in [1] and copy the jar to the MI_HOME/lib folder. You can see sample datasource configurations from [2]
[1] https://github.com/wso2-attic/wso2-dss-connectors/blob/master/mongodb/src/main/java/org/wso2/dss/connectors/mongodb/MongoDBDataSource.java
[2] https://github.com/wso2/product-ei/blob/master/distribution/src/conf/custom-datasources.xml