Skip to content

Add extra info on how to use this from host #10

Description

@kakoma

On reviewing the config script, I see that the setup currently forwards traffic on the guest from port 80 to port 8080 on the host and 8181 on the guest to 2223 on the host.

This means that it is possible to use PostMan on the host machine to access the setup. For example, on the host, a quick test to check the payer FSP position can be done using:

curl --fail -X GET     http://localhost:8080/participants/payerfsp/positions     -H 'Host: central-ledger.local'

Expected response is similar to this:

[{"currency":"USD","value":2.11,"changedDate":"2020-11-14T20:54:11.000Z"}]

If /etc/hosts has the mojaloop hosts:

127.0.0.1 central-ledger forensic-logging-sidecar central-kms.local central-ledger.local central-settlement.local central-event-processor.local ml-api-adapter.local email-notifier.local account-lookup-service.local quoting-service.local moja-simulator.local

That 'localhost' can even be replaced with an appropriate name. What this does is it makes it possible to work with the postman collections directly from the host without needing to modify anything.

I think it would be great to add something like this to the documentation to make it easier to go ahead and use the setup after it is up and running.

This bit should probably come as another issue but I'll bundle it here:
We could consider assigning an IP to the guest:
https://www.vagrantup.com/docs/networking/private_network

The DHCP route is fail-safe. It means though that the user will need to ssh into the machine, get its IP and then update /etc/hosts with something like:

192.168.50.5 central-ledger forensic-logging-sidecar central-kms.local central-ledger.local central-settlement.local central-event-processor.local ml-api-adapter.local email-notifier.local account-lookup-service.local quoting-service.local moja-simulator.local

Assuming 192.168.50.5 is the assigned IP.

Again, that way, now, the user can comfortably use the PostMan collections directly from their host without changing much else.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions