Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/node upgrade and cli client removal #210

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
686 changes: 548 additions & 138 deletions .circleci/config.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.16.3
16.15.0
37 changes: 22 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
FROM node:12.16.3-alpine AS builder
FROM node:16.15.0-alpine as builder
WORKDIR /opt/app

WORKDIR /opt/mojaloop-testing-toolkit

RUN apk add --no-cache -t build-dependencies git make gcc g++ python libtool autoconf automake \
RUN apk --no-cache add git
RUN apk add --no-cache -t build-dependencies make gcc g++ python3 libtool libressl-dev openssl-dev autoconf automake \
&& cd $(npm root -g)/npm \
&& npm config set unsafe-perm true \
&& npm install -g node-gyp

COPY package.json package-lock.json* /opt/mojaloop-testing-toolkit/
RUN npm install
RUN npm install -g bunyan
COPY package.json package-lock.json* /opt/app/

RUN npm ci

COPY src /opt/app/src
COPY spec_files /opt/app/spec_files
COPY examples /opt/app/examples
COPY secrets /opt/app/secrets

COPY src /opt/mojaloop-testing-toolkit/src
COPY spec_files /opt/mojaloop-testing-toolkit/spec_files
COPY examples /opt/mojaloop-testing-toolkit/examples
COPY secrets /opt/mojaloop-testing-toolkit/secrets
FROM node:16.15.0-alpine
WORKDIR /opt/app

FROM node:12.16.3-alpine
# Create empty log file & link stdout to the application log file
RUN mkdir ./logs && touch ./logs/combined.log
RUN ln -sf /dev/stdout ./logs/combined.log

WORKDIR /opt/mojaloop-testing-toolkit
# Create a non-root user: ml-user
RUN adduser -D ml-user
USER ml-user

COPY --from=builder /opt/mojaloop-testing-toolkit .
COPY --chown=ml-user --from=builder /opt/app .
RUN npm prune --production

EXPOSE 5000
EXPOSE 5050
CMD ["npm", "run", "start", "|bunyan"]
CMD ["npm", "run", "start"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ After installation you can interact with the testing toolkit from either web int

For Web interface follow this [Usage Guide](/documents/User-Guide.md)

For Command line tool follow this [CLI User Guide](/documents/User-Guide-CLI.md)
For Command line tool follow this [CLI User Guide](https://github.com/mojaloop/ml-testing-toolkit-client-lib/blob/master/README.md)


**If you have your own DFSP implementation you can point the peer endpoint to *Mojaloop Testing Toolkit* on port 5000 and try to send requests from your implementation instead of using mojaloop-simulator.**
Expand Down
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ version: "3.7"

services:
mojaloop-testing-toolkit:
image: mojaloop/ml-testing-toolkit:v14.1.0
#image: mojaloop-testing-toolkit:local
#build:
# context: .
# target: builder
# image: mojaloop/ml-testing-toolkit:v14.1.0
image: mojaloop-testing-toolkit:local
build:
context: .
target: builder
volumes:
- "./spec_files:/opt/mojaloop-testing-toolkit/spec_files"
- "./secrets:/opt/mojaloop-testing-toolkit/secrets"
- "./spec_files:/opt/app/spec_files"
- "./secrets:/opt/app/secrets"
ports:
- "5000:5000"
- "5050:5050"
Expand Down
218 changes: 0 additions & 218 deletions documents/User-Guide-CLI.md

This file was deleted.

2 changes: 1 addition & 1 deletion documents/User-Guide-Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ After installation you can interact with the testing toolkit from either web int

For Web interface follow this [Usage Guide](/documents/User-Guide.md)

For Command line tool follow this [CLI User Guide](/documents/User-Guide-CLI.md)
For Command line tool follow this [CLI User Guide](https://github.com/mojaloop/ml-testing-toolkit-client-lib/blob/master/README.md)


****If you have your own DFSP implementation you can point the peer endpoint to **Mojaloop Testing Toolkit** on port 5000 and try to send requests from your implementation instead of using mojaloop-simulator.**
9 changes: 7 additions & 2 deletions documents/User-Guide-Onboarding-DFSP.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,19 @@ You could download a report in several formats by clicking on _Download Report_

### 3.2 CLI tool

You can install the TTK CLI using the following command.
```
npm install @mojaloop/ml-testing-toolkit-client-lib --global
```

#### 3.2.1 Help screen

The help screen allows you to see the usage, possible options and default values

command:

```
node src/cli_client/client -h
ml-ttk-cli -h
```

output:
Expand All @@ -149,7 +154,7 @@ Options:
command:

```
node src/cli_client/client -m outbound -i examples/collections/dfsp/p2p_happy_path.json -e examples/environments/dfsp_local_environment.json --report-format html
ml-ttk-cli -m outbound -i examples/collections/dfsp/p2p_happy_path.json -e examples/environments/dfsp_local_environment.json --report-format html
```

output:
Expand Down
9 changes: 7 additions & 2 deletions documents/User-Guide-Onboarding-HUB.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,19 @@ You could download a report in several formats by clicking on _Download Report_

### 3.2 CLI tool

You can install the TTK CLI using the following command.
```
npm install @mojaloop/ml-testing-toolkit-client-lib --global
```

#### 3.2.1 Help screen

The help screen allows you to see the usage, possible options and default values

command:

```
node src/cli_client/client -h
ml-ttk-cli -h
```

output:
Expand All @@ -144,7 +149,7 @@ Options:
command:

```
node src/cli_client/client -m outbound -i examples/collections/dfsp/p2p_happy_path.json -e examples/environments/dfsp_local_environment.json --report-format html
ml-ttk-cli -m outbound -i examples/collections/dfsp/p2p_happy_path.json -e examples/environments/dfsp_local_environment.json --report-format html
```

output:
Expand Down
2 changes: 1 addition & 1 deletion documents/User-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The document below covers the use-cases with the **Mojaloop Simulator** and **Mo

### The Testing Toolkit CLI

- [The Testing Toolkit CLI User Guide](/documents/User-Guide-CLI.md)
- [The Testing Toolkit CLI User Guide](https://github.com/mojaloop/ml-testing-toolkit-client-lib/blob/master/README.md)

### Connection Manager

Expand Down
Loading