-
Notifications
You must be signed in to change notification settings - Fork 2
Testing and Debugging
patricia-patricia edited this page Jan 13, 2021
·
3 revisions
Debugging microservices can be done by investigating the container log file.
- Click Containers/Apps
- Choose the container that needs to be investigated
- Run the cli
- Open log folder (cd log)
- Open service.log.0 (cat service.log.0)
After making a modification to the services. The service needs to be rebuilt and uploaded to the docker container.
To update the service, use the following code:
docker container stop code-gen-service
docker container rm code-gen-service
docker build CAE-Code-Generation-Service -t test/cae-code-generation-service
docker run --name "code-gen-service"^
`--link jenkins:jenkins^
`-e WIDGET_HOME_BASE_URL=...
`-e HTTP_PORT
`-e ...
`-p 8080:8080 -p 8443:8443 -p 9011:9011^
`test/cae-code-generation-service
It takes time to do the same thing for the frontend, so instead of rebuilding everything entirely, we want to simply replace the some part of it using
-v c:/Users/<Path...>/CAE-Frontend/cae-app:/usr/src/app/cae-app
For example:
docker run --name cae-frontend^
-e GIT_ORGANIZATION="<GitOrgName>"^
-e GITHUB_OAUTH_CLIENTID="<GitHubOAuthClientID>"^
-e DEPLOYMENT_URL="http://localhost:8087"^
-e WEBHOST="http://localhost:8070"^
-e YJS="http://localhost:1234"^
-e CODEGEN="http://localhost:8080/CodeGen"^
-e CAE_BACKEND_URL="http://localhost:8081"^
-e CODE_EDITOR_BOWER="http://localhost:8070/cae-frontend/liveCodeEditorWidget/bower_components/"^
-e OIDC_CLIENT_ID="<OIDC_CLIENT_ID>"^
-p 8070:8070^
-v c:/Users/<Path...>/CAE-Frontend/cae-app:/usr/src/app/cae-app^
rwthacis/cae-frontend
The docker container contains a node_modules folder that will be replaced by the previous command. Hence before running it, run npm install inside the cae-app folder.