{"id":26032208,"url":"https://github.com/apache/openwhisk-apigateway","last_synced_at":"2025-04-09T17:11:13.798Z","repository":{"id":46564513,"uuid":"72565867","full_name":"apache/openwhisk-apigateway","owner":"apache","description":"Apache OpenWhisk API Gateway service for exposing actions as REST interfaces.","archived":false,"fork":false,"pushed_at":"2024-09-24T15:30:16.000Z","size":721,"stargazers_count":64,"open_issues_count":35,"forks_count":45,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-04-09T17:11:09.317Z","etag":null,"topics":["apache","cloud","faas","functions-as-a-service","openwhisk","serverless","serverless-architectures","serverless-functions"],"latest_commit_sha":null,"homepage":"https://openwhisk.apache.org/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-01T18:45:43.000Z","updated_at":"2024-09-24T15:30:23.000Z","dependencies_parsed_at":"2023-01-30T05:01:00.103Z","dependency_job_id":null,"html_url":"https://github.com/apache/openwhisk-apigateway","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-apigateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-apigateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-apigateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-apigateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/openwhisk-apigateway/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074964,"owners_count":21043490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","cloud","faas","functions-as-a-service","openwhisk","serverless","serverless-architectures","serverless-functions"],"created_at":"2025-03-06T21:37:10.580Z","updated_at":"2025-04-09T17:11:13.772Z","avatar_url":"https://github.com/apache.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n--\u003e\n\nOpenWhisk API Gateway\n=============\n[![Build Status](https://travis-ci.com/apache/openwhisk-apigateway.svg?branch=master)](https://travis-ci.com/github/apache/openwhisk-apigateway)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\nA performant API Gateway based on Openresty and NGINX.\n\nProject status\n---------------\nThis project is currently considered beta stage, Large swaths of code or APIs may change.\n\n\n## Table of Contents\n\n* [Quick Start](#quick-start)\n* [API](#api)\n* [Developer Guide](#developer-guide)\n  * [Running locally](#running-locally)\n  * [Testing](#testing)\n\n\n## Quick Start\n\n```\ndocker run -p 80:80 -p \u003cmanagedurl_port\u003e:8080 -p 9000:9000 \\\n            -e PUBLIC_MANAGEDURL_HOST=\u003cmanagedurl_host\u003e \\\n            -e PUBLIC_MANAGEDURL_PORT=\u003cmanagedurl_port\u003e \\\n            -e REDIS_HOST=\u003credis_host\u003e \\\n            -e REDIS_PORT=\u003credis_port\u003e \\\n            -e REDIS_PASS=\u003credis_pass\u003e \\\n            openwhisk/apigateway:latest\n```\n\n(Optional) The redis password can be passed in encrypted using the `aes-256-cbc` encryption algorithm. To do so, pass in the following environment variables, in addition to the encrypted password:\n- `DECRYPT_REDIS_PASS=true`\n- `ENCRYPTION_KEY=\u003c32 Byte hex string that was used for encryption\u003e`\n- `ENCRYPTION_IV=\u003c16 Byte hex string that was used for encryption\u003e`\n\n## API\n- [v2 Management Interface](https://github.com/openwhisk/openwhisk-apigateway/blob/master/doc/v2/management_interface_v2.md)\n- [v1 Management Interface](https://github.com/openwhisk/openwhisk-apigateway/blob/master/doc/v1/management_interface_v1.md)\n\n## Syncing configuration from a remote source\n\nThe Gateway can sync its configuration with a remote folder in the cloud such as Amazon S3, Google Cloud Storage, IBM Cloud Object Storage, Dropbox, and [many others](https://rclone.org/). The configuration is monitored for changes, and when a file is changed, the Gateway is reloaded automatically. This is very useful to gracefully update the Gateway on the fly, without impacting the active traffic; if the new configuration is invalid, the Gateway doesn't break, running with the last known valid configuration.\n\nThis feature is enabled by configuring a few environment variables:\n* `REMOTE_CONFIG` - the location where the configuration should be synced from. I.e. `s3://api-gateway-config` . The remote location is synced into is `/etc/api-gateway`.\nThe default configuration is found in this project's root folder.\n* (optional) `REMOTE_CONFIG_SYNC_INTERVAL` - how often to check for changes in the remote location. The default value is `10s`\n* (optional) `REMOTE_CONFIG_RELOAD_CMD` - which command to execute in order to reload the Gateway. The default value is: `api-gateway -s reload`\n\nSyncing is done through [rclone sync](https://rclone.org/commands/rclone_sync/). `rclone` has a rich set of [options](https://rclone.org/commands/rclone_sync/) such as what to exclude when syncing, or what to include. An important configuration is `--config`, pointing to the config file in `/root/.config/rclone/rclone.conf`. The Gateway should be started with `/root/.config/rclone` folder mounted so that `rclone.conf` is present.  To generate a new `rclone` configuration simply execute:\n\n```\ndocker run -ti --rm --entrypoint=rclone -v `pwd`/rclone/:/root/.config/rclone/ openwhisk/apigateway config\n```\n\nThis runs an interactive `rclone config` command and stores the resulted configuration in `./rclone/rclone.conf` file.\n\nTo test this locally, _simulate_ a remote folder using a local location, by mounting it in `/tmp` folder as follows:\n\n```bash\ndocker run -ti --rm -p 80:80 \\\n    -v `pwd`:/tmp/api-gateway-local -e REMOTE_CONFIG=\"/tmp/api-gateway-local\" \\\n    -e REDIS_HOST=redis_host -e REDIS_PORT=redis_port openwhisk/apigateway\n```\nThen make changes to any configuration file ( i.e. `api-gateway.conf` ), save it, then watch as the Gateway reloads the updated configuration automatically.\n\n## Developer Guide\n\n### Running locally\n\n To build the docker image locally use:\n ```\n  make docker\n ```\n\n To Run the Docker image\n ```\n  make docker-run PUBLIC_MANAGEDURL_HOST=\u003cmangedurl_host\u003e PUBLIC_MANAGEDURL_PORT=\u003cmanagedurl_port\u003e \\\n    REDIS_HOST=\u003credis_host\u003e REDIS_PORT=\u003credis_port\u003e REDIS_PASS=\u003credis_pass\u003e\n ```\n\n\n### Testing\n\n To build the test image and run unit tests\n ```\n  make test\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fopenwhisk-apigateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fopenwhisk-apigateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fopenwhisk-apigateway/lists"}