hello-world-sg4-service/Instructions.md

1.8 KiB

instructions

project structure

├── .gitignore ├── pom.xml ├── src │ └── *** ├── gcube/ │ └── extra-resources/ │ └── WEB-INF/ │ ├── application.yaml │ └── web.xml

optional, for local develop in docker containers

├── docker/ │ ├── ontainer.ini │ └── logback.xml ├── docker-compose.yaml └── Dockerfile

file details

  • gitignore: gitignore file for java projects

  • pom.xml

    • : maven-parent configuration. currently 1.2.0 version
    • : path for web.xml
    • ???
    • gcube dependency manager
  • docker/container.ini: configurations for the docker container.

    • mode: [online/offline]: register the service on IS. use offline for local docker instances

EXCECUTION

start the docker container ./buildImageAndStart.sh

test urls (replace {{TOKEN}} with your token):

http://localhost:8081/helloworld/guest

http://localhost:8080/helloworld/details?gcube-token={{TOKEN}} http://localhost:8080/helloworld/hello/details?gcube-token={{TOKEN}}

http://localhost:8080/helloworld/auth?gcube-token={{TOKEN}} (checks for myRole role) http://localhost:8080/helloworld/auth/orm_member?gcube-token={{TOKEN}} (checks for OrganizationMember role)

GUBE state: http://localhost:8081/helloworld/gcube/resource/metrics http://localhost:8081/helloworld/gcube/resource/health

Authentication:

GCUBE-TOKEN param

obtain personal token at https://next.dev.d4science.org/group/gcube/home

add

DEBUG

start the docker container in debug Mode ./buildImageAndStartWithDebug.sh

connect the JAVA debugger to port 5005

  • VSCODE: press the green play button and start "Debug (Attach)