Giter Site home page Giter Site logo

mimoto's Introduction

mimoto

This is the mobile server backend supporting Inji.

Requirements

  • Java SE 11
  • Maven

Build

mvn clean package

Run

mvn spring-boot:run -Dspring.profiles.active=local

Deployment

Install

  1. Execute Onboarder install script
cd partner-onboarder
./install.sh
  • During the execution of the install.sh script, a prompt appears requesting information for the S3 bucket, including its name and URL.
  • Once the job is completed, log in to S3 and check the reports. There should not be any failures.
  1. Execute mimoto install script
cd helm/mimoto
./install.sh
  • During the execution of the install.sh script, a prompt appears requesting information regarding the presence of a public domain and a valid SSL certificate on the server.
  • If the server lacks a public domain and a valid SSL certificate, it is advisable to select the n option. Opting it will enable the init-container with an emptyDir volume and include it in the deployment process.
  • The init-container will proceed to download the server's self-signed SSL certificate and mount it to the specified location within the container's Java keystore (i.e., cacerts) file.
  • This particular functionality caters to scenarios where the script needs to be employed on a server utilizing self-signed SSL certificates.

Docker compose stack folder structure:

  • bin: service jar files
  • conf: configuration files for docker services.
  • data: using to store shared VC event and generated files.

Follow the build section to compile and get the mimoto-*.jar file in the target folder.

Copy jar files to bin folder. Websub (hub.jar) and safety net is optional, depends on the client app implementation.

Configuration

conf/nginx/conf.d/mimoto.conf

upstream mimoto-service {
    server mimoto-service:8088;
}

server {
    listen 80;
    listen [::]:80;

    access_log /var/log/nginx/mimoto-service.access.log main;

    location / {
        root /usr/share/nginx/html;
        index index.html index.htm;
    }

    location /v1/mimoto {
        proxy_pass http://mimoto-service/v1/mimoto;
        proxy_set_header Host $http_host; # required for docker client's sake
        proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

docker-compose.yml

version: "3.9"
services:
    nginx:
        image: nginx:alpine
        volumes:
            - ./conf/nginx/proxy_params:/etc/nginx/proxy_params
            - ./conf/nginx/conf.d:/etc/nginx/conf.d
        hostname: nginx
        restart: always
        ports:
            - 80:80
        links:
            - mimoto-service
            - websub
            - safetynet
        depends_on:
            - mimoto-service

    mimoto-service:
        image: openjdk:11-jre-slim
        volumes:
            - ./bin:/opt/mimoto-service
            - ./data:/data
        hostname: mimoto-service
        restart: always
        command: >
        bash -c "cd /data && java -jar \
            -Dpublic.url=https://YOUR_PUBLIC_URL_FOR_MIMOTO_SERVICE \
            -Dcredential.data.path=/data \
            -Dmosip.event.delay-millisecs=5000 \
            -Dwebsub-resubscription-delay-millisecs=300000 \
            -Dsafetynet.api.key=GOOGLE_API_KEY \
            /opt/mimoto-service/mimoto-*.jar"
        expose:
            - 8088

Note:

  • Replace public.url with your public accessible domain. For dev or local env ngrok is recommended.
  • Google safetynet API key can be generate from Google Cloud Console.

Run with docker-compose

docker-compose up -d

Update

Copy and replace the new version of the jar files in the bin folder and restart the docker service.

docker-compose restart mimoto-service

Credits

Credits listed here

mimoto's People

Contributors

adityankannan avatar adityankannan-tw avatar akilalakshmanan avatar challabeehyv avatar ckm007 avatar dependabot[bot] avatar gaganama avatar gaganamadival avatar gokulraj136 avatar gsasikumar avatar jeremi avatar kiruthikajeyashankar avatar kneckinator avatar lalithkota avatar mohanachandran-s avatar monobikashdas avatar poojababusingh avatar prafulrakhade avatar rakhimosip avatar rakshitha650 avatar sohandey avatar swatigoel avatar syedsalman3753 avatar typelogic avatar uocnb avatar vijay151096 avatar vsivakalyan avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mimoto's Issues

build failure: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcesso

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.406 s
[INFO] Finished at: 2023-03-21T12:51:07+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project mimoto: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0xe43189c) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0xe43189c -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Test try enabling bio in authType

Is your feature request related to a problem? Please describe.
It is a configuration change request. This is just to test the /req/auth-lock and /req/auth-unlock API endpoints.

Describe the solution you'd like
At present, the authType = bio is disabled for Resident backend config.

Describe alternatives you've considered

Additional context
This is to exercise the endpoints:

  • /req/auth-lock
  • /req/auth-unlock

which requires the bio as value to be tested for authType in the request payload.

operation timeout

2024-01-08 23:31:06.446 ERROR [mimoto,,,] 98773 --- [TaskScheduler-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task.

reactor.core.Exceptions$ReactiveException: io.netty.channel.ConnectTimeoutException: connection timed out: iam.dev2.mosip.net/10.3.148.169:443
at reactor.core.Exceptions.propagate(Exceptions.java:326) ~[reactor-core-3.1.7.RELEASE.jar:3.1.7.RELEASE]
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:91) ~[reactor-core-3.1.7.RELEASE.jar:3.1.7.RELEASE]
at reactor.core.publisher.Mono.block(Mono.java:1175) ~[reactor-core-3.1.7.RELEASE.jar:3.1.7.RELEASE]
at io.mosip.kernel.auth.defaultadapter.helper.TokenHelper.getClientToken(TokenHelper.java:130) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at io.mosip.kernel.auth.defaultadapter.config.SelfTokenRenewalTaskExecutor$SelfTokenHandlerTask.run(SelfTokenRenewalTaskExecutor.java:76) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
Suppressed: java.lang.Exception: #block terminated with an error
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:93) ~[reactor-core-3.1.7.RELEASE.jar:3.1.7.RELEASE]
... 10 common frames omitted

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.