avob / OpenADR

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

Cannot build up vtn20b_postgres #4

Closed steven-smpct closed 3 years ago

steven-smpct commented 4 years ago

When I try to bring up the the vm I get: TASK [remyma.ansible-springboot : Download springboot application] ***** fatal: [vtn20b]: FAILED! => {"changed": false, "msg": "unknown url type: None", "status": -1, "url": "None"}

RUNNING HANDLER [geerlingguy.postgresql : restart postgresql] **

RUNNING HANDLER [../../roles/oadr-rabbitmq : restart rabbitmq] *****

RUNNING HANDLER [../../roles/oadr-openfire : restart openfire] *****

RUNNING HANDLER [remyma.ansible-springboot : Restart application] **

PLAY RECAP ***** vtn20b : ok=85 changed=56 unreachable=0 failed=1 skipped=14 rescued=0 ignored=0

Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.

I am running ubuntu 18.04 and I followed the instructions on the README. Am I meant to fork https://github.com/remyma/ansible-springboot.git and then fill in springboot_src_file, springboot_src_url, and springboot_application_name?

zanni commented 4 years ago

Hi,

assuming you correctly generate application jar using :

mvn clean package install -P external -DskipTests=true

and ansible copy jar step execute correctly:

TASK [remyma.ansible-springboot : Copy jar application] ************************
changed: [vtn20b]

my only guess is that you are on a Windows system and ansible-springboot path to jar file might need to be adapted to your system: go to file: OpenADR/devops/vtn20b_postgres/provisioning/vars

springboot_src_file: ../../../OpenADRServerVTN20b/target/OpenADRServerVTN20b-0.1.0-SNAPSHOT.jar

I hope it is helping you

zanni commented 4 years ago

My bad it was due to a weird incompatibility between new version of ansible and ansible-springboot plugin. I solved it by changing dependencies to a fork of the original plugin fixing the issue: https://github.com/Sjnahak/ansible-springboot

This issue should be solved with my commit

steven-smpct commented 4 years ago

Was able to build and bring up the VM. But after that, not all the URL that are provided work. They give me a connection refused.

ReddyAravindAru commented 4 years ago

Hello steven,

Even my build was successful and in the next step "vagrant up" below is the output.

Bringing machine 'vtn20b' up with 'virtualbox' provider... ==> vtn20b: Checking if box 'bento/ubuntu-16.04' version '202005.21.0' is up to date... ==> vtn20b: A newer version of the box 'bento/ubuntu-16.04' for provider 'virtualbox' is ==> vtn20b: available! You currently have version '202005.21.0'. The latest is version ==> vtn20b: '202007.17.0'. Run vagrant box update to update. ==> vtn20b: Machine already provisioned. Run vagrant provision or use the --provision ==> vtn20b: flag to force provisioning. Provisioners marked to run always will still run.

Does the above output mean that everything is ok and i can test the endpoints? If yes, None of my endpoints are working and i am yet to do " Install self-signed certificate authority in your browser: cert/oadr.com.crt".

I appreciate it if someone helps :)

ReddyAravindAru commented 4 years ago

Hello steven,

Even my build was successful and in the next step "vagrant up" below is the output.

Bringing machine 'vtn20b' up with 'virtualbox' provider... ==> vtn20b: Checking if box 'bento/ubuntu-16.04' version '202005.21.0' is up to date... ==> vtn20b: A newer version of the box 'bento/ubuntu-16.04' for provider 'virtualbox' is ==> vtn20b: available! You currently have version '202005.21.0'. The latest is version ==> vtn20b: '202007.17.0'. Run vagrant box update to update. ==> vtn20b: Machine already provisioned. Run vagrant provision or use the --provision ==> vtn20b: flag to force provisioning. Provisioners marked to run always will still run.

Does the above output mean that everything is ok and i can test the endpoints? If yes, None of my endpoints are working and i am yet to do " Install self-signed certificate authority in your browser: cert/oadr.com.crt".

I appreciate it if someone helps :)

I did not have ansible installed on my system so after i installed and ran vagrant provision, virtual machine got up and the above issue is resolved for me. Now i have connection refused for some end points.

please someone help

zanni commented 3 years ago

fix ansible recipe