Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benmizrahi/service-extention-template
A template repository to implement service extensions with Python
https://github.com/benmizrahi/service-extention-template
Last synced: about 3 hours ago
JSON representation
A template repository to implement service extensions with Python
- Host: GitHub
- URL: https://github.com/benmizrahi/service-extention-template
- Owner: benmizrahi
- Created: 2024-11-11T19:29:00.000Z (4 days ago)
- Default Branch: main
- Last Pushed: 2024-11-13T08:43:13.000Z (3 days ago)
- Last Synced: 2024-11-13T09:31:03.284Z (3 days ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Building Callout Service for GCP Load Balancer
Service Extensions enables the users of Google Cloud products, such as Cloud Load Balancing and Media CDN, to insert programmability directly into the data path. This helps you customize the behavior of these proxies to meet your business needs. This page provides a high-level overview about Service Extensions.
Original GCP implementation: https://github.com/GoogleCloudPlatform/service-extensions.git
Callout Service Extensions docs: https://cloud.google.com/service-extensions/docs/overview
---
## Instructions
```
python3 -m venv .venvsource .venv/bin/activate
pip install -r requirements.txt
npm install @bufbuild/buf -g
```Using buf to generate proto to python files and use them as a package:
```
buf -v generate https://github.com/envoyproxy/envoy.git#subdir=api --path envoy/service/ext_proc/v3/external_processor.proto --include-imports`# Install the package via setup.py
pip install protodef/
```Download the SSL Certificate:
```
git clone https://github.com/GoogleCloudPlatform/service-extensions.git extensions
cp -R extensions/callouts/python/extproc/ssl_creds ./extproc/
sudo rm -R extensions
```Running the service locally:
```
python3 -m callout.callout_server
```Ports & Endpoints:
- health checks: http://localhost:81/
- gRPC endpoint: http://localhost:80/
- gRPC endpoint (TLS): http://localhost:443/---
Local Testing with envoy server
`docker compose up`
Run the local service via VSCode debugger - to check local server (depends on the logic you should see headers/body outputs):
`curl -I -v http://localhost:8888`