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

Docs: connecting a local WPS to the staging server UI #15

Open
agstephens opened this issue Jan 10, 2022 · 1 comment
Open

Docs: connecting a local WPS to the staging server UI #15

agstephens opened this issue Jan 10, 2022 · 1 comment
Assignees

Comments

@agstephens
Copy link
Member

flamingo start --hostname 192.168.50.70 --port 5001

Does run it on that port on that server, as does --hostname 0.0.0.0 but can't see it in main browser.

Might need a solution to run the server and the client on separate servers. Just need to create a new server:

ceda-wps-ui-staging.ceda.ac.uk

@agstephens agstephens self-assigned this Jan 17, 2022
@agstephens
Copy link
Member Author

agstephens commented Jan 17, 2022

How to test WPS with UI on staging server

Staging server: ceda-wps-staging.ceda.ac.uk

Install the CEDA WPS UI using Ansible

We install Phoenix using our playbook on breezy: ceda-wps/phoenix-playbook.git

This will install with:

ansible-playbook -i inventories/ceda-wps-staging.yml \
    --vault-password-file=vault-password-ceda-wps \
    playbook.yml

Install the WPS

WPSNAME=swallow
cd /usr/local/src/
git clone https://github.com/cedadev/${WPSNAME}
cd ${WPSNAME}/

export PATH=/usr/local/Miniconda3-py39_4.9.2-Linux-x86_64/bin:$PATH
conda env create -f environment.yml
source activate ${WPSNAME}

Then use make to install and run:

make install
make start

This will start the service on: http://localhost:5000/wps

Register the WPS with the WPS UI

Go to admin on CEDA WPS UI (on staging server):

https://ceda-wps-staging.ceda.ac.uk/admin

Login and add the WPS here:

https://ceda-wps-staging.ceda.ac.uk/services/register

Use info:

Link up the output path URL and directory

Create/connect Phoenix to expose output directories

NOTE: These instructions work for vulture - not swallow

We can tell the Phoenix installation to provide access to the output directories by doing:

  1. Create a new file:
$ cat /usr/local/birdhouse/etc/nginx/conf.d/outputs.conf
server {
        listen                 80;
        server_name            ceda-wps-staging.ceda.ac.uk;

    location /outputs
    {
        alias /gws/nopw/j04/ceda_wps/birds/test/outputs/vulture;
        autoindex off;
    }
}

  1. And restart the phoenix service
# Logout and login again
ssh root@ceda-wps-staging...
source ./setup-env.sh
make restart

Then, this should work:

http://ceda-wps-staging.ceda.ac.uk/outputs/test.txt

Modify where test version of service is writing outputs

You might need to add these lines in vulture/cli.py:

diff --git a/vulture/cli.py b/vulture/cli.py
index 5053c08..cc7478f 100644
--- a/vulture/cli.py
+++ b/vulture/cli.py
@@ -202,6 +202,8 @@ def start(
             wps_log_level=log_level,
             wps_log_file=log_file,
             wps_database=database,
+            wps_outputurl="http://ceda-wps-staging.ceda.ac.uk/outputs",
+            wps_outputpath="/gws/nopw/j04/ceda_wps/birds/test/outputs/vulture"
         )
     )

and do:

vulture start -d --outputurl=http://ceda-wps-staging.ceda.ac.uk/outputs \
                         --outputpath=/gws/nopw/j04/ceda_wps/birds/test/outputs/vulture

Otherwise, the WPS will be using /tmp as its default output directory.

Test it - look at the UI form

Visit: https://ceda-wps-staging.ceda.ac.uk/processes

Click on the link, it will render a form for the process (if the describeprocess endpoint is working).

@agstephens agstephens changed the title Work out how to connect local WPS to staging server UI (if possible) How to connect a local WPS to the staging server UI Mar 2, 2022
@agstephens agstephens changed the title How to connect a local WPS to the staging server UI Docs: connecting a local WPS to the staging server UI Jul 26, 2022
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

No branches or pull requests

1 participant