Giter Site home page Giter Site logo

moja-sim's Introduction

Moja-Sim

A mojaloop simulator that talks to a running mojaloop deployment.

At this stage, we are using the mojaloop/simulator project, but I don't really understand what it does. I'm just going to spend some time trying to figure out what the simulator does, and see if we can hook it up to our mojaloop deployment

Installing the Simulator

Run the container:

docker-compose up

Talk to the container:

curl localhost:8444/health

Open the swagger docs:

open http://localhost:8444/documentation

Talking to Mojaloop

Ok. Now we need to get the simulator to talk to our running mojaloop instance.

It doesn't look like the /payer/** endpoint really does anything. But there is a lot of implementation in /payee which looks like it actually talks to Mojaloop

/parties

Lets try out the parties endpoints, specifically:

GET /payeefsp/parties/{type}/{id}
POST /payeefsp/parties/{type}/{id}
#Create a Party - I think this is cached locally only
#originally from OSS-New-Deployments Postman Collection

curl -X POST \
  http://localhost:8444/payeefsp/parties/MSISDN/27713803912 \
  -H 'Content-Type: application/json' \
  -d '{
    "party": {
        "partyIdInfo": {
            "partyIdType": "MSISDN",
            "partyIdentifier": "27713803912",
            "fspId": "payeefsp"
        },
        "name": "Siabelo Maroka",
        "personalInfo": {
            "complexName": {
                "firstName": "Siabelo",
                "lastName": "Maroka"
            },
            "dateOfBirth": "3/3/1973"
        }
    }
}'




#Get a Party 
DATE=$(echo 'nowDate = new Date(); console.log(nowDate.toGMTString());' > /tmp/date && node /tmp/date)


curl -X GET http://localhost:8444/payeefsp/parties/MSISDN/27713803912 \
  -H 'fspiop-source: payerfsp' \
  -H "date: $DATE"

We first needed to add the Host header in order to talk to our ML deployment. In the future we will fix this, but this will do for now.

I think we will need to expose our endpoints using localtunnel or something, so that Mojaloop can respond to the simulator correctly.

After deploying with tiller, I see the errors on the nginx-ingress-controller

  • "default/dusty-waterbuffalo-simulator" does not have any active Endpoint.

Packaging chart from local

cd /Users/ldaly/developer/vessels/mojaloop/moja-sim/simulator/helm_chart/simulators
helm package

helm install --name=moja-sim --namespace=moja-sim /Users/ldaly/developer/vessels/mojaloop/moja-sim/simulator/helm_chart/simulators/simulators-4.2.0.tgz

login to container

kubectl exec -n mojaloop moja-sim-simulators-576bc59688-2mvp2 -i -t sh

Building and deploying to cluster:

make docker
make redeploy

moja-sim's People

Contributors

lewisdaly avatar

Watchers

 avatar  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.