parameterspace-ie / eo4a-service-trials

EO4Atlantic platform service trials
GNU General Public License v3.0
0 stars 0 forks source link

Setting env variables to local dev repository doesn't seem to have an effect #1

Closed jarekdobrzanski closed 6 years ago

jarekdobrzanski commented 6 years ago

After running a build of service development container as per docs:

~/eo4a/eo4a-service-development$ sudo -E bin/eo4adev

The output acknowledges my env vars:

The following directories will be used (and created if necessary):
     Services directory: /root/twm/services (export EO4A_SERVICES_DIR to override)
     Data volume: /root/twm/data (export EO4A_DATA_DIR to override)
     Notebooks directory: /root/twm/services/notebooks (export EO4A_NOTEBOOKS_DIR to override)

... but it:

  1. Doesn't create those directories
  2. Notebook server doesn't pull the notebooks from the location set by EO4A_NOTEBOOKS_DIR

The full output of eo4adev below:


------------------------------------------------------------
EO4Atlantic Service Development
------------------------------------------------------------

------------------------------------------------------------
Checking Docker installation
------------------------------------------------------------
Docker is available

------------------------------------------------------------
Checking local service development domain has been set in HOSTS
------------------------------------------------------------
eo4a.local resolves

------------------------------------------------------------
Checking Development directories
------------------------------------------------------------
The following directories will be used (and created if necessary):
     Services directory: /root/twm/services (export EO4A_SERVICES_DIR to override)
     Data volume: /root/twm/data (export EO4A_DATA_DIR to override)
     Notebooks directory: /root/twm/services/notebooks (export EO4A_NOTEBOOKS_DIR to override)
Press any key to continue
------------------------------------------------------------
Retrieving the EO4A Service container image
------------------------------------------------------------
WARNING: make sure you have already run 'docker login repositories.eo4a.science -u guest -p <password>'
Pulling the container image: repositories.eo4a.science/eo4a-service-framework-standalone:develop

------------------------------------------------------------
Checking/starting the service container
------------------------------------------------------------
c3062be009e9cb04b4e27b75321787afbbf36d44834b6cca08f4d690db648a85

------------------------------------------------------------
Waiting for service container to respond...
------------------------------------------------------------
....It's up

------------------------------------------------------------
Reloading the available WPS services
------------------------------------------------------------
Processes reloaded successfully:

Errors:

------------------------------------------------------------
FINISHED
------------------------------------------------------------
Jupyter notebooks are used to execute services, and are available at:
     http://eo4a.local:18888/tree

If required, WPS access to the services (as used by the notebooks) is also available at:
     http://eo4a.local:18880/wps

Now follow the Service Development section in the EO4Atlantic user guide:
     http://docs.eo4a.science
derekocallaghan commented 6 years ago

Hi Jarek,

I suspect there may be a bug in the script around the creation. In the meantime, can you manually create the three directories referenced by the environment variables, prior to running eo4adev?

Derek

jarekdobrzanski commented 6 years ago

Hi Derek,

I can't seem to be able to rerun eo4adev on existing container (or should I say it runs but doesn't seem to be applying any changes like updated env vars:

It looks like a EO4A service container already exists (status=exited).
It won't be replaced at this time. You can:
    Start it (if not running) by running 'docker start eo4a-standalone'
    Stop it by running 'docker stop eo4a-standalone'
    Remove it by running 'docker rm eo4a-standalone'
    Rerun ./bin/eo4adev
Attempting to start container...
eo4a-standalone

So it seems the only way to rerun effectively isdocker rm and start over. But if that's the case how do I create a directories within a container before running eo4eadev if the container itself is built by this command?

Jarek

derekocallaghan commented 6 years ago

Hi Jarek,

The three directories mentioned in your original post are created on the host, e.g. your desktop/laptop, and are then mounted into the container at EO4A locations when eo4adev is run:

The following directories will be used (and created if necessary):
     Services directory: /root/twm/services (export EO4A_SERVICES_DIR to override)
     Data volume: /root/twm/data (export EO4A_DATA_DIR to override)
     Notebooks directory: /root/twm/services/notebooks (export EO4A_NOTEBOOKS_DIR to override)

These directories are not created in the container itself, instead, it has internal directories which mount these host directories. The steps are then as follows:

jarekdobrzanski commented 6 years ago

Hi Derek,

Thanks, that was it! I didn't really get that those locations are mounted into the container. Might be helpful for other users to include a note on that in the docs. That solves both issues, so I'm closing them