{"id":13448983,"url":"https://github.com/refunc/refunc","last_synced_at":"2025-03-22T18:32:18.169Z","repository":{"id":36505239,"uuid":"134830674","full_name":"refunc/refunc","owner":"refunc","description":"Cloud Native Function-as-a-Service Platform On Kubernetes.","archived":false,"fork":false,"pushed_at":"2025-02-08T08:32:25.000Z","size":648,"stargazers_count":171,"open_issues_count":4,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-08T09:30:00.434Z","etag":null,"topics":["aws","faas","golang","lambda","refunc","serverless"],"latest_commit_sha":null,"homepage":"https://refunc.io","language":"Go","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/refunc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-25T08:54:31.000Z","updated_at":"2025-02-08T08:32:29.000Z","dependencies_parsed_at":"2023-01-17T02:08:32.704Z","dependency_job_id":"a559139b-6370-402a-ba3e-6eb81041b147","html_url":"https://github.com/refunc/refunc","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refunc%2Frefunc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refunc%2Frefunc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refunc%2Frefunc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refunc%2Frefunc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refunc","download_url":"https://codeload.github.com/refunc/refunc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245002950,"owners_count":20545521,"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":["aws","faas","golang","lambda","refunc","serverless"],"created_at":"2024-07-31T06:00:27.011Z","updated_at":"2025-03-22T18:32:13.152Z","avatar_url":"https://github.com/refunc.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Refunc\n\nRefunc is a [Kubernetes](https://kubernetes.io) native serverless platform.\n\n![Refunc Architecture](https://user-images.githubusercontent.com/354668/50409374-188daf80-082d-11e9-9a9b-77407cd196ed.png)\n\n## Features\n\n* Easy of use - Embrace the serverless ecosystem with an AWS Lambda compatible API and runtimes\n* Portable - Run everywhere that has Kubernetes\n* Scale from zero - Autoscale from zero-to-many and vice versa\n* Extensible - Runtime compatibility layer (lambda and other clouds' function), transport layer ([NATS](https://nats.io) based for now)\n\n## Quick Start\n\nBefore starting, you need a Kubernetes cluster. You can use [minikube](https://github.com/kubernetes/minikube) to run a minimal Kubernetes cluster locally.\n\nIf you'd like to run on macOS, [Docker for Mac](https://docs.docker.com/docker-for-mac/kubernetes/) with Kubernetes enabled is recommended.\n\n### Install Refunc\n\nInstall `refunc-play`, a minimal setup of Refunc, using the following commands:\n\n```shell\n# This will create namespace `refunc-play` and deploy components in it\ndocker run --rm -it refunc/refunc refunc play gen -n refunc-play | kubectl apply -f -\n# create runtime python3.7\nkubectl create -n refunc-play -f \\\nhttps://github.com/refunc/lambda-python3.7-example/releases/download/v0.0.2/xenv.yaml\n```\n\nHere we use the python3.7 runtime as an example. Currently Refunc supports all [AWS provided runtimes](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html) as well as some converted runtimes, check [refunc/lambda-runtimes](https://github.com/refunc/lambda-runtimes) to learn more.\n\n### The AWS Way\n\nRefunc uses an AWS API compatible [gateway](https://github.com/refunc/aws-api-gw) to provide Lambda and S3 services,\nwhich makes it possible to use the AWS CLI to manage functions locally.\n\nBefore starting, we need to forward the gateway to your localhost:\n\n```shell\nkubectl port-forward deployment/aws-api-gw 9000:80 -n refunc-play\n```\n\nDownload the pre-built [function](https://github.com/refunc/lambda-python3.7-example) for convenience:\n\n```shell\ncd /tmp\nwget https://github.com/refunc/lambda-python3.7-example/releases/download/v0.0.1/lambda.zip\n```\n\n#### Create Function\n\n```shell\naws --endpoint-url=http://127.0.0.1:9000 \\\nlambda create-function --function-name localtest \\\n--handler lambda_function.lambda_handler \\\n--zip-file fileb:///tmp/lambda.zip \\\n--runtime python3.7 \\\n--role arn:aws:iam::XXXXXXXXXXXXX:role/your_lambda_execution_role\n```\n\n#### Invoke Function\n\n```shell\naws --endpoint-url=http://127.0.0.1:9000 \\\nlambda invoke --function-name localtest /tmp/output.json \u0026\u0026 cat /tmp/output.json\n```\n\n### The Refunc Way\n\nLet's create a Lambda function using the python3.7 runtime with an HTTP endpoint:\n\n```shell\nkubectl create -n refunc-play -f https://github.com/refunc/lambda-python3.7-example/releases/download/v0.0.2/inone.yaml\n```\n\nForward the Refunc HTTP gateway to your localhost:\n\n```shell\nkubectl port-forward deployment/refunc-play 7788:7788 -n refunc-play\n```\n\nNow, it's OK to send a request to your function:\n\n```shell\ncurl -v  http://127.0.0.1:7788/refunc-play/python37-function\n```\n\n## User Interface\n\nInternally we use [Rancher](https://rancher.com) to build our PaaS and other internal services. Currently there is a simple management [UI](https://github.com/refunc/refunc-ui) forked from [rancher/ui](https://github.com/rancher/ui) which is backed by our [Rancher API](https://github.com/rancher/api-spec) compatible [server](https://github.com/refunc/refunc-rancher).\n\n![functions.png](https://user-images.githubusercontent.com/354668/44694551-b13f3900-aaa0-11e8-8a9a-a19d562ec8d1.png \"Functions page\")\n\n## License\n\nCopyright (c) 2018 [refunc.io](http://refunc.io)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefunc%2Frefunc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefunc%2Frefunc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefunc%2Frefunc/lists"}