You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local deployment, native ubuntu, Mac OS, Kubernetes, ...
Local deployment using ansible with apigateway
version of docker, ubuntu, ...
Docker version 24.0.7, build afdd53b
Ubuntu 22.04.3 LTS
Steps to reproduce the issue:
Deploy openwhisk using ansible
export ENVIRONMENT=local
# Export Keys
ansible-playbook -i environments/$ENVIRONMENT prereq.yml
ansible-playbook -i environments/$ENVIRONMENT setup.yml
# couchdb is still needed to store subjects and actions
ansible-playbook -i environments/$ENVIRONMENT couchdb.yml
ansible-playbook -i environments/$ENVIRONMENT initdb.yml
ansible-playbook -i environments/$ENVIRONMENT wipe.yml
ansible-playbook -i environments/$ENVIRONMENT openwhisk.yml \
-e skip_pull_runtimes=True \
-e limit_action_memory_max=4294967296 \
-e limit_action_memory_std=2147483648 \
-e limit_invocations_per_minute=999999 \
-e limit_invocations_concurrent=9999999 \
-e limit_fires_per_minute=9999999 \
-e limit_sequence_max_length=1000 \
-e namespace_default_limit_action_memory_max=8192 \
-e lean=true \
-e invoker_user_memory="16384m" # Too much here is an issue when it creates too many concurrent processes!
# to use the API gateway
ansible-playbook -i environments/$ENVIRONMENT apigateway.yml
ansible-playbook -i environments/$ENVIRONMENT routemgmt.yml
ansible-playbook -i environments/$ENVIRONMENT edge.yml \
-e cli_installation_mode=remote \
-e openwhisk_cli_home="$OPENWHISK_HOME/../openwhisk-cli"
# installs a catalog of public packages and actions
ansible-playbook -i environments/$ENVIRONMENT postdeploy.yml
Create an action wsk -i action create test test.py
Create an API route wsk -i api create /test get /guest/test
Curl the action -> Error 502
Provide the expected results and outputs:
A working response (not 502)
Provide the actual results and outputs:
{"code":502, "message":"Oops. Something went wrong. Check your URI and try again."}
Additional information you deem important:
I've found this issue (apache/openwhisk-apigateway#370) for the apigateway already. However, I think the bug is with the deployment script, not the gateway itself. Adding "BACKEND_HOST" in the apigateway task deploy role file fixes this issue, but I'm not sure if this is correct for other deployments as well. Note that using "http" as a scheme (as seems to be used by the standalone version) does not work because the proxy does forward the 308 redirect to https instead of handling it in-line.
- name: (re)start apigateway
docker_container:
name: apigateway
image: "{{ apigateway.docker_image | default('openwhisk/apigateway:' ~ apigateway.version) }}"
state: started
recreate: true
restart_policy: "{{ docker.restart.policy }}"
hostname: apigateway
env:
"REDIS_HOST": "{{ groups['redis'] | first }}"
"REDIS_PORT": "{{ redis.port }}"
"REDIS_PASS": "{{ redis.password }}"
"PUBLIC_MANAGEDURL_HOST": "{{ ansible_host }}"
"BACKEND_HOST": "https://{{ groups['controllers'] | map('extract', hostvars, 'ansible_host') | first }}" # Added to avoid gateway issues
"PUBLIC_MANAGEDURL_PORT": "{{ apigateway.port.mgmt }}"
"TZ": "{{ docker.timezone }}"
ports:
- "{{ apigateway.port.mgmt }}:8080"
- "{{ apigateway.port.api }}:9000"
pull: "{{ apigateway_local_build is undefined }}"
- name: wait until the API Gateway in this host is up and running
uri:
url: "http://{{ groups['apigateway'] | first }}:{{ apigateway.port.api }}/v1/apis"
register: result
until: result.status == 200
retries: 12
delay: 5
The text was updated successfully, but these errors were encountered:
Environment details:
Local deployment using ansible with apigateway
Docker version 24.0.7, build afdd53b
Ubuntu 22.04.3 LTS
Steps to reproduce the issue:
wsk -i action create test test.py
wsk -i api create /test get /guest/test
Provide the expected results and outputs:
A working response (not 502)
Provide the actual results and outputs:
Additional information you deem important:
I've found this issue (apache/openwhisk-apigateway#370) for the apigateway already. However, I think the bug is with the deployment script, not the gateway itself. Adding "BACKEND_HOST" in the apigateway task deploy role file fixes this issue, but I'm not sure if this is correct for other deployments as well. Note that using "http" as a scheme (as seems to be used by the standalone version) does not work because the proxy does forward the 308 redirect to https instead of handling it in-line.
The text was updated successfully, but these errors were encountered: