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

Cdotcv 30 #408

Merged
merged 10 commits into from
Feb 1, 2021
Merged

Cdotcv 30 #408

merged 10 commits into from
Feb 1, 2021

Conversation

payneBrandon
Copy link
Collaborator

PR Details

Description

This PR addresses the lack of a standard development environment for the ODE. It includes .devcontainer folder at root level which houses the tools necessary to generate a remote container used as a standard development environment. All tools needed to develop against the ODE are installed in the remote container. Documentation describing the development environment as well as how to run it can be found under docs/ODE_Development_SOP.docx

Related Issue

#407

Motivation and Context

#407

How Has This Been Tested?

This was tested locally on several machines following the associated instructions in the docs/ODE_Development_SOP.docx file. Because the changes will only affect development when using VS Code, the rest of the code base remains untouched.

Types of changes

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
    ODE Contributing Guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@dan-du-car
Copy link
Contributor

dan-du-car commented Jan 14, 2021

It looks good. Thank you! I will test it in local to verify the changes.

Copy link
Contributor

@dan-du-car dan-du-car left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am able to setup vscode, use reopen remote container and launch/debug ODE. Then open browser with url: localhost:8080, the ODE demo console website is up. Then testing the binary file upload, the vscode output console shows that the messages are published to topic "DEBUG MessageProducer - Completed publish to topic: topic.Asn1DecoderInput, offset: 271, partition: 0".This is working. However, when I use the following command to subscribe the messages from kafka topic: "/opt/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topic.Asn1DecoderInput --from-beginning --partition 0", I do not see any messages being published.

@payneBrandon
Copy link
Collaborator Author

I'm not seeing this same behavior. Are you running a separate Kafka instance on your host machine? If I POST a TIM to the /tim endpoint while debugging I see the following indicating messages were placed on a Kafka topics:
image

If I then open a terminal within the development environment (in VS Code), I can use either kafkacat or the installed Kafka utilities under ~/kafka/bin to stream from the topic.Asn1EncoderInput for instance:
image

@payneBrandon
Copy link
Collaborator Author

@dan-du-car I swapped the devcontainer.json to run on the host network rather than its own Docker container network. After adding in some advertised.listeners values this seems to be up and running with the ability to access the Kafka topics from the host machine. I can now spin up the ODE, send a message, and watch it deposit to a topic both within the container and with my local Kafka scripts.

Please note that you will need to have any locally running instance of Kafka and Zookeeper stopped prior to running this dev environment as it will be using the same ports your local instance would.

@dan-du-car
Copy link
Contributor

@dan-du-car I swapped the devcontainer.json to run on the host network rather than its own Docker container network. After adding in some advertised.listeners values this seems to be up and running with the ability to access the Kafka topics from the host machine. I can now spin up the ODE, send a message, and watch it deposit to a topic both within the container and with my local Kafka scripts.

Please note that you will need to have any locally running instance of Kafka and Zookeeper stopped prior to running this dev environment as it will be using the same ports your local instance would.

Thank you! I will do a quick check.

@dan-du-car
Copy link
Contributor

@dan-du-car I swapped the devcontainer.json to run on the host network rather than its own Docker container network. After adding in some advertised.listeners values this seems to be up and running with the ability to access the Kafka topics from the host machine. I can now spin up the ODE, send a message, and watch it deposit to a topic both within the container and with my local Kafka scripts.

Please note that you will need to have any locally running instance of Kafka and Zookeeper stopped prior to running this dev environment as it will be using the same ports your local instance would.

@payneBrandon
I can verify that there is message broadcasted to the decoder input topic.
image

How about the topic.Asn1DecoderOutput? How do we test the codec component capable of receiving this message and decode it and return back to ODE? I do not see any decoded output message:
image

@payneBrandon
Copy link
Collaborator Author

@dan-du-car
The encode/decode output topics are only written to by the asn1_codec submodule, which is a separate application not covered by this PR. I did look into adding a configuration to support this in the launch.json file but this is not straight forward as the asn1_codec module is written in C.

@snallamothu snallamothu merged commit ad951c8 into usdot-jpo-ode:dev Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants