一、kong
1、使用kong来做服务网关,目前kong使用的是0.13版本现在地址:https://docs.konghq.com/install,kong的社区版没有dashboard,可以使用kong-dashboard,项目地址:https://github.com/PGBI/kong-dashboard。方便使用和管理。目前kong还不支持直接代理grpc,nginx-1.13.10以后版本开始支持代理grpc。kong0.13使用的是1.13.6,以后会支持grpc代理。
2、简单安装使用
使用yum安装,设置repo:
# cat kong.repo
[kong]
name=kong
baseurl=https://kong.bintray.com/kong-community-edition-rpm/centos/7
gpgcheck=0
enabled=1
@配置kong:
PostgreSQL 9.5+Cassandra 3.x.x
本次使用的是postgresql9.5.需要提前安装,使用yum安装,配置repo:
#cat pgdg-95-redhat.repo
[pgdg95]
name=PostgreSQL 9.5 $releasever - $basearch
baseurl=https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-$releasever-$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95
[pgdg95-source]
name=PostgreSQL 9.5 $releasever - $basearch - Source
failovermethod=priority
baseurl=https://download.postgresql.org/pub/repos/yum/srpms/9.5/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95
#yum install postgresql95-server postgresql95-contrib
#ipv4 local connections
proxy_access_log = /data/kong/logs/access.log
proxy_error_log = /data/kong/logs/error.log
admin_access_log = /data/kong/logs/admin_access.log
admin_error_log = /data/kong/logs/admin_error.log
proxy_listen = 10.10.29.43:8000, 10.10.29.43:8443 ssl
admin_listen = 10.10.29.43:8001, 10.10.29.43:8444 ssl
database = postgres
pg_host = 10.10.29.43
pg_port = 5432
pg_user = kong
pg_password = kong
pg_database = kong
dns_resolver = 10.42.11.101,10.42.12.247,10.42.5.28,10.42.3.96
dns_order = LAST,SRV,A,CNAME
cat /usr/sbin/kong-dashboard
#!/bin/bash
nohup docker run -p 8081:8080 pgbi/kong-dashboard start --kong-url http://10.10.29.43:8001 --basic-auth huoqiu=hqkong &
二、consul
http://www.cnblogs.com/cuishuai/p/8194345.html
原文:https://www.cnblogs.com/cuishuai/p/9219195.html