在 GCE/RHEL7 上安装可扩展服务代理

Install Extensible Service Proxy on GCE/RHEL7

Quickstart for Endpoints on Compute Engine says

you need to run the Extensible Service Proxy before sending requests to the API

但是also says

This quickstart works only on Debian. Make sure you create a VM that runs Debian.

我有一个现有的 GCE VM 实例 运行 我要将此端点添加到的 Red Hat EL 7。安装和 运行 可扩展服务代理的说明在哪里?

FWIW 我检查了 Debian 软件包的内容。它似乎只是带有自定义配置和一些额外脚本的 nginx。如果在RHEL7 上没有RPM 或其他安装ESP 的方法,我可以手动安装从.deb 包中提取的内容吗?

是的,它应该可以工作(未测试)。 .deb 包中的 nginx 是一个静态编译的二进制文件,带有一个可以独立运行的自定义模块。请确保将其余文件(配置模板、根 CA 证书、start-up 脚本)放在与 .deb 包相同的目录中。

安装 ESP 的说明隐含在 the instructions for installing the Cloud SDK on Red Hat and CentOS 中,因为 endpoints-runtime RPM 可从与 SDK 相同的 repo 获得。

$ sudo tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM
[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOM
$ 
$ sudo yum install google-cloud-sdk

请注意,ESP 安装为 nginx,带有支持脚本和配置文件,这将替换任何现有的 nginx 和任何具有相同名称的文件,这将覆盖任何现有的 nginx 功能(如代理、缓存等)。最好先存档任何 host-specific nginx 配置,然后安装 ESP,然后将旧配置合并到 yum 安装的新配置中。