sonata-nfv / son-gkeeper

SONATA's Service Platform Gatekeeper
http://www.sonata-nfv.eu
Apache License 2.0
2 stars 18 forks source link

ENV Variable USER_MANAGEMENT_URL in gtkapi is not changing #535

Open felipevicens opened 7 years ago

felipevicens commented 7 years ago

I've set a different variable for USER_MANAGEMENT_URL but always get:

D, [2017-04-18T16:38:19.966550 #10] DEBUG -- GtkApi::User#config(url=http://son-gtkusr:5600): entered D, [2017-04-18T16:38:19.966604 #10] DEBUG -- GtkApi::MicroService#config(url=http://son-gtkusr:5600): entered with url http://son-gtkusr:5600

Also, here is duplicated https://github.com/sonata-nfv/son-gkeeper/blob/master/son-gtkapi/config/services.yml#L61 and https://github.com/sonata-nfv/son-gkeeper/blob/master/son-gtkapi/config/services.yml#L65 and use the port of gtkvim 5700.

jbonnet commented 7 years ago

@felipevicens Repetition is due to the fact that we're using one micro-service (son-gtkusr) to address both User and MicroService authentication/authorization (note the different models).

The 5700 port is just a default: the master is the ENV variable, only if you do not define this ENV variable that this url:port is considered (see this line).

I have no explanation for the momento about the persistence of USER_MANAGEMENT_URL: I use it in my local development/tests like in $ USER_MANAGEMENT_URL=http://sp.int3.sonata-nfv.eu:5600 bundle exec rspec spec/models/package_manager_service_spec.rb

I'm investigating.

dang03 commented 7 years ago

@felipevicens Can this line in son-gkeeper/son-gtkusr/Dockerfile be the guilty one? ENV USER_MANAGEMENT_URL http://son-gtkusr:5600

felipevicens commented 7 years ago

@dang03 no because this ENV is Overwriting when you start the container