consul

Consul: SD architecture. What is the right way to access microservices from a front-end side?

旧时模样 提交于 2019-12-24 07:56:31
问题 I have a few back-end microservices managed by consul, and to get some data from one service for the other one, I use service discovery feature of consul - like get all healthy servers, then get server address and port from the retrieved entry etc. But how should I do it from a front-end side? Just call needed microserver using it's actual ip or call it using namespace of docker container? It will be very helpful to get any response from someone who knows how to do it or even better, who did

Prometheus: how to drop a target based on Consul tags

烈酒焚心 提交于 2019-12-24 05:47:11
问题 My Prometheus server gets its list of targets (or "services", in Consul's lingo) from Consul. I only want to monitor a subset of these targets. This should be possible via Prometheus's regex mechanism, but the correct configuration eludes me. How is this done? 回答1: I've scoured the web and there is not a single example showing how its done, so for posterity - the following configuration will drop all consul services marked with the 'ignore-at-prometheus' tag # ignore consul services with

windows下安装服务注册Consul

两盒软妹~` 提交于 2019-12-22 19:59:40
windows下安装服务注册Consul consul也可以作为服务的注册中心,可以替代Eureka 去官网下载 consul : https://www.consul.io/downloads.html 找到对应的操作系统下载。 下载完成之后解压 配置环境变量 启动consul consul agent -dev 访问:http://localhost:8500 来源: CSDN 作者: 名字好起吗 链接: https://blog.csdn.net/TreeShu321/article/details/103654580

Zuul and Consul integration issue

只谈情不闲聊 提交于 2019-12-22 01:29:55
问题 I have problem setting up Spring Cloud application with Zuul and Consul service discovery. I have Consul server agent installed and running locally: ./src/main/bash/local_run_consul.sh When I run Spring Boot application with @EnableZuulProxy annotation I get the following error: Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.netflix.zuul.filters.RouteLocator]: Factory method 'routeLocator' threw exception; nested exception is

consul first bootstrap with spring cloud config

若如初见. 提交于 2019-12-21 21:33:26
问题 Iam using spring-cloud-config for centralized configuration and consul for service discovery. Like eureka first bootstrap - does spring support consul first bootstrap i.e on booting up a client service - I should look up the config server through consul. The otherway round works perfectly fine i.e - in config client bootstrap.properties - I provide the spring.cloud.config.uri =http://localhost:8888 which located the config server and pulls config from it. And in the config repository for my

Can (or should) 2 docker containers interact with each other via localhost?

若如初见. 提交于 2019-12-21 08:24:03
问题 We're dockerizing our micro services app, and I ran into some discovery issues. The app is configured as follows: When the a service is started in 'non-local' mode, it uses Consul as its Discovery registry. When a service is started in 'local' mode, it automatically binds an address per service (For example, tcp://localhost:61001, tcp://localhost:61002 and so on. Hard coded addresses) After dockerizing the app (for local mode only, for now) each service is a container (Docker images

Can (or should) 2 docker containers interact with each other via localhost?

自作多情 提交于 2019-12-21 08:23:54
问题 We're dockerizing our micro services app, and I ran into some discovery issues. The app is configured as follows: When the a service is started in 'non-local' mode, it uses Consul as its Discovery registry. When a service is started in 'local' mode, it automatically binds an address per service (For example, tcp://localhost:61001, tcp://localhost:61002 and so on. Hard coded addresses) After dockerizing the app (for local mode only, for now) each service is a container (Docker images

Consul健康检查报错Get http://node-3:8002/actuator/health: dial tcp 172.28.158.98:8002: connect: connect

好久不见. 提交于 2019-12-21 06:55:38
最近用consul集群服务docker安装方式进行了服务的注册,但是通过注册后发现健康检查总是报错。具体如下: 上面的错误主要是两类错误 1)server不可达,服务器有问题 2) 服务器没问题,但是服务有问题 解决方案: 服务器问题: 通过报错信息可以发现node-3这个地址是不能访问的,这个是宿主机的地址,登录容器ping了下地址是可以的,但是ping主机名是不行的,这个时候就知道问题所在了,容器也类似一个虚拟机,所以登录容器在/etc/hosts中配置地址即可: docker exec 容器id sh(或者bash/bin) 重新启动服务发现可以正常检测了 服务问题: 重启就行了,检查服务是够正常运行 来源: CSDN 作者: qq_35008624 链接: https://blog.csdn.net/qq_35008624/article/details/103627981

consul怎么在windows下安装

好久不见. 提交于 2019-12-21 04:34:26
转载请标明出处: http://blog.csdn.net/forezp/article/details/70188595 本文出自 方志朋的博客 去官网下载: https://www.consul.io/downloads.html 解压: 设置环境变量: 计算机 右键 属性 高级属性设置环境变量设置 在path下加上:E:\programfiles\consul; cmd启动: consul agent -dev 可以看到启动成功。 打开网址: http://localhost:8500 ,可以看到界面,相关服务发现的界面。 来源: https://www.cnblogs.com/jpfss/p/9925954.html

跨主机通信

≡放荡痞女 提交于 2019-12-20 23:26:22
JOIN容器:container(共享网络协议栈) 容器和容器之间。 [root@localhost ~]# docker pull busybox [root@localhost ~]# docker run -itd --name web5 busybox:latest 把网卡指定web5: [root@localhost ~]# docker run -itd --name web6 --network container:web5 busybox:latest Web6: [root@localhost ~]# docker exec -it web6 /bin/sh / # echo 123456 > /tmp/index.html / # httpd -h /tmp/ Web5: [root@localhost ~]# docker exec -it web5 /bin/sh / # wget -O - -q 127.0.0.1 这时会发现,两个容器的ip地址一样。 PS:这种方法的使用场景:由于这种网络的特殊性,一般在运行同一个服务,并且合格服务需要做监控,以及日志收集,或者网络监控的时候,可以选择这种网络。 docker的跨主机网络解决方案 Overlay的解决方案(覆盖型解决方案) 实验环境: Docker01:1.10 Docker02:1.20