avob / OpenADR

OpenADR protocol java implementation: https://www.openadr.org/
Apache License 2.0
50 stars 23 forks source link

install dependencies #19

Closed bbartling closed 3 years ago

bbartling commented 3 years ago

Hi, hello again : )

Any chance I could get a tip for installing this repo?

So on Ubuntu 20.04 I git cloned the repo and cd into this repo. The bash script works to generate the certs.

A real newbie question, do I need to install docker beforehand? Sorry not a docker expert. Is this tutorial a good one to install docker?

Thank you for anytime you have in response.

And then once docker is installed, then I can just run: docker-compose up --build

zanni commented 3 years ago

Hi,

Yes you have to install docker beforehand to run demo and possibly maven if you want to compile the project.

Your tutorial seems fine but I do not known about Ubuntu.

This demo has been tested on macOS but it is supposed to work seamlessly on ubuntu due to docker.

Le 3 sept. 2021 à 15:15, bbartling @.***> a écrit :

Hi,

Any chance I could get a tip for installing this repo?

So on Ubuntu 20.04 I git cloned the repo and cd into this repo. The bash script works to generate the certs.

A real newbie question, do I need to install docker beforehand? Sorry not a docker expert. Is this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04a good one to install docker?

Thank you for anytime you have in response.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/avob/OpenADR/issues/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLCPNXLDOSOBBMDOV63JTUADC7XANCNFSM5DLXRETQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bbartling commented 3 years ago

Crud, I think I have the wrong version of docker, like too new. Ill have to look into getting the correct version of docker.

ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

root@localhost:/home/bbartling/OpenADR# docker version
Client: Docker Engine - Community
 Version:           20.10.8
zanni commented 3 years ago

It is tested with Docker 19.03.13

Le 3 sept. 2021 à 15:28, bbartling @.***> a écrit :

Crud, I think I have the wrong version of docker, like too new. Ill have to look into getting the correct version of docker.

ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1. For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

@.***:/home/bbartling/OpenADR# docker version Client: Docker Engine - Community Version: 20.10.8 — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/avob/OpenADR/issues/19#issuecomment-912540597, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLCPOJPBJFVXZT5FCA44LUADEQJANCNFSM5DLXRETQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bbartling commented 3 years ago

Ok I have a new Ubuntu image provisioned. With docker 19.03.13, better tutorial for specific docker version install on Ubuntu.

root@localhost:~/OpenADR# docker version
Client: Docker Engine - Community
 Version:           19.03.13

The bash script works to generate certs but when I run root@localhost:~/OpenADR# docker-compose up --build from the cloned repo I get an error that docker-compose not installed. Is there a specific version this I should go after?

bbartling commented 3 years ago

This appears to be the versions of docker compose I can get. 1.29 is the latest but I think that may had something to do with the last error I had.

Going off of this tutorial.

zanni commented 3 years ago

I tested it with docker-compose version 1.28.5, build c4eb3a1f

Le 3 sept. 2021 à 15:58, bbartling @.***> a écrit :

This appears to be the versions of docker compose https://github.com/docker/compose/releases I can get. 1.29 is the latest but I think that may had something to do with the last error I had.

Going off of this tutorial. https://docs.docker.com/compose/install/#:~:text=on%20linux%2C%20you%20can%20download%20the%20docker%20compose%20binary%20from%20the — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/avob/OpenADR/issues/19#issuecomment-912560539, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLCPPSRPPLEO3AT7OAGNDUADH73ANCNFSM5DLXRETQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bbartling commented 3 years ago

It looks like the mvn clean verify is running OK. image

If I want to test simple HTTP open ADR from an external VEN application, would I use this below? mvn clean package -P external,frontend

zanni commented 3 years ago

mvn is used to compile the application. you can run it on your computer but then you have to install the middleware (db, broker …).

You should try to launch the docker demo, maybe downgrade your docker-compose or update docker-compose files (MR are welcome)

Le 3 sept. 2021 à 16:23, bbartling @.***> a écrit :

It looks like the mvn clean verify is running OK.

If I want to test simple HTTP open ADR from an external VEN application, would I use this below? mvn clean package -P external,frontend

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/avob/OpenADR/issues/19#issuecomment-912578243, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLCPPBZIKNOYQQONQQVJDUADK5NANCNFSM5DLXRETQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bbartling commented 3 years ago

Hi is there any chance you could give me some more tips? Sorry!

For the docker demo that you mentioned trying, would I want to run, if so any tips on doing so? :)

OpenADRServerVTNCommon

For Simple Http from an external VEN client?

zanni commented 3 years ago

Hi,

I committed a file containing the logs of a successful demo start on master branch: https://github.com/avob/OpenADR/blob/master/successfull_build.txt

Multiple things happenning:

build image run, compile app if it's not yet done. This image will be stopped when everything has been provided to further images middleware image starts: postgres_1, openfire_1, rabbitmq_1 vtn image starts: vtn20b_1 drprogram starts: dummy-drprogram_1 ven starts: ven20b_1 then VTN / DRP / VEN starts interacting as described in README file. This demo has been launched on macOS, with Docker version 20.10.5, build 55c4c88 and docker-compose version 1.28.5, build c4eb3a1f

This process described in README has been followed i.e certificates are generated correctly, vtn.oadr.com has been added to DNS provider, admin certificates has been added to browser certificates provider (required to access VTN UI).

Hope it will help

bbartling commented 3 years ago

Hi,

Does this give an example how a VTN and VEN would interact passing the XML open ADR messages back and forth all on local host?

Could I ever test this with external VENs? And external access to the UI? For example from the readme, can these endpoints be hit from outside localhost?

Endpoints VTN Control Swagger UI: https://vtn.oadr.com:8181/testvtn/swagger-ui.html VTN Control UI: https://vtn.oadr.com:8181/testvtn/ VTN RabbitMQ Management UI: http://localhost:15672 VTN Openfire Management UI: http://localhost:9090

bbartling commented 3 years ago

I did try:

mvn clean verify which did compile successfully.

But running mvn clean package -P external,frontend some errors see screen shot below. Is this what I would want for externally experimenting with the software?

image

zanni commented 3 years ago

Hi,

This is an example of a demo start including openADR message exchange between VEN / VTN.

VTN can be connected to an external VEN.

All endpoints are only reachable from localhost as I assume only localhost DNS has been configured (/etc/hosts). However, this is a web app and as such, it can be deployed and reached from wherever you want.

Le 6 sept. 2021 à 19:15, bbartling @.***> a écrit :

Hi,

Does this give an example how a VTN and VEN would interact passing the XML open ADR messages back and forth all on local host?

Could I ever test this with external VENs? And external access to the UI? For example from the readme, can these endpoints be hit from outside localhost?

Endpoints VTN Control Swagger UI: https://vtn.oadr.com:8181/testvtn/swagger-ui.html https://vtn.oadr.com:8181/testvtn/swagger-ui.html VTN Control UI: https://vtn.oadr.com:8181/testvtn/ https://vtn.oadr.com:8181/testvtn/ VTN RabbitMQ Management UI: http://localhost:15672 http://localhost:15672/ VTN Openfire Management UI: http://localhost:9090 http://localhost:9090/ — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/avob/OpenADR/issues/19#issuecomment-913779374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLCPMLKVMB6MIM246LH4LUATZLDANCNFSM5DLXRETQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bbartling commented 3 years ago

Ok thanks for bearing with me, sorry for all the newbie questions. So if I do run from the docker container with docker-compose up --build like you have in the successful built text file. Can you give me a tip on how to access the endpoints externally?

I am experimenting on hosting this on Linode where my IP address is: 23.92.28.66

This is just a Linux box on the cloud for experimental purposes so its no big deal if I share this info publicly through a git issue. I delete my Linode accounts and start new ones with new IP addresses all the time for experimentation purposes.

For the endpoints in the readme, would it just be this instead of local host?

Endpoints from README: VTN Control Swagger UI: https://23.92.28.66:8181/testvtn/swagger-ui.html VTN Control UI: https://23.92.28.66:8181/testvtn/ VTN RabbitMQ Management UI: http://23.92.28.66:15672 VTN Openfire Management UI: http://23.92.28.66:9090

bbartling commented 3 years ago

The openfire and Rabbit MQ logins come up but the other pages I cannot access.

zanni commented 3 years ago

You have to configure your local DNS (/etc/hosts) to map vtn.oadr.com http://vtn.oadr.com/ to 127.0.0.1

Le 6 sept. 2021 à 19:53, bbartling @.***> a écrit :

The openfire and Rabbit MQ logins come up but the other pages I cannot access.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/avob/OpenADR/issues/19#issuecomment-913791538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLCPODFHGEZRMNULNFJMTUAT5ZZANCNFSM5DLXRETQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bbartling commented 3 years ago

Ok thank you Ill have to look into how to do that on Linode, I have never done this step before. Ill let you know what I find out, thanks again for all your time....

bbartling commented 3 years ago

Does this look right to you? /etc/hosts/ directory:

image

Sorry for the hassle still unable to open these URLs on http or https: https://23.92.28.66:8181/testvtn/

https://23.92.28.66:8181/testvtn/swagger-ui.html

zanni commented 3 years ago

Hi,

Deploying it manually on a linux server would not be trivial but you can look at docker scripts to see how middleware and app are installed.

Please keep in mind that this is just a demo, this has never been near a production release.

Le 6 sept. 2021 à 20:06, bbartling @.***> a écrit :

Ok thank you Ill have to look into how to do that on Linode, I have never done this step before. Ill let you know what I find out, thanks again for all your time....

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/avob/OpenADR/issues/19#issuecomment-913795921, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACLCPM3PCEJEETBB33NCP3UAT7KDANCNFSM5DLXRETQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bbartling commented 3 years ago

Ok thanks for all the help Ill keep an eye on this repo, looking forward to seeing more in the future.

bbartling commented 2 years ago

Hi, curious if this project has had any more development for production level testing? Thanks!