GithubHelp home page GithubHelp logo

midata-servicechoreo's Introduction

Data service integration

The "Data Service Integration" sample demonstrates how to create an integration that integrates with a relational database management system (RDBMS) and exposes employee information stored in the database as a REST API. To use this sample with Choreo, follow these steps:

Setting up the database

  • Start a MySQL instance and create a database (for example, misampledb).
  • Import the script to create the schema and populate employee data.
  • Identify the publicly accessible connection URL and credentials for the database.

Create a MI Integration

  • Login to Choreo console
  • Select the iPaaS profile and create a new component named Integration as an API
  • Provide a name and description for the component.
  • Authorize and select the GitHub details
  • Select the GitHub Account and the forked repository for GitHub Repository
  • Select the Branch as main
  • Select WSO2 MI as Build Preset
  • Enter MIdata-serviceChoreo as the Project Path
  • Enter MIdata-serviceChoreo/openapi.yaml as the OpenAPI File Path
  • Click on "Create" to create the component.
  • Once the component is created, go to the "Deploy" section and click on the "Deploy Manually" button.

Setting up Environment variables

  • The database details need to be passed as environment variables.
  • To do this, go to the DevOps portal and select the component and "Configs & Secrets" to configure the environment variables.
  • Click on "Create" and select "Environment Variables" as the configuration type.
  • Give a name for the Config Name
  • Add key-value pairs to register them as environment variables. For example:
    • DB_DRIVER_CLASS for Key and com.mysql.jdbc.Driver for Value
    • DB_CONNECTION_URL for Key and jdbc:mysql://<public ip or hostname>:3306/misampledb for Value
    • DB_USER for Key and db username for Value
    • DB_PASS for Key and db password for Value
    • Click on Finish to apply the changes

Once done go to the Choreo Test console and use the Swagger console to try out the API

midata-servicechoreo's People

Contributors

theyinyanguy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.