spring-cloud

consul first bootstrap with spring cloud config

随声附和 提交于 2019-12-04 17:28:23
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 client application - I provide the consul config like : spring.cloud.consul.host=localhost , spring

Eureka Renews threshold & Renews (last min)

亡梦爱人 提交于 2019-12-04 17:01:33
I have one Eureka Server A and two client instances of B(Client3) and C(Client4) I got logs from Eureka Server, which are as follows : 2018-01-25 12:56:27.828 INFO 7145 --- [nio-8765-exec-2] c.n.e.registry.AbstractInstanceRegistry : Registered instance CLIENT3/client3:bb488bb73fd313321e393915f746bfe5 with status UP (replication=false) 2018-01-25 12:56:28.417 INFO 7145 --- [nio-8765-exec-3] c.n.e.registry.AbstractInstanceRegistry : Registered instance CLIENT3/client3:bb488bb73fd313321e393915f746bfe5 with status UP (replication=true) 2018-01-25 12:56:33.028 INFO 7145 --- [nio-8765-exec-3] c.n.e

XACML for Spring Cloud

最后都变了- 提交于 2019-12-04 16:53:40
I'm going to secure my Spring Cloud Application with OAuth2 and XACML (using AuthZForce, Balana, AT&T XACML or something similar). I want to use the microservices from Spring-Cloud(-Netflix). To make XACML available I think that I need this: PEP for each existing API-service PDP's as new services, that are used by PEP's. Because Spring-Cloud(-Netflix) has load-balancing functions (Eureka) I need to register this services on Eureka and implement a REST-API. Because all PDP's should use the same policies, they need to be stored centrally (Policy Provider) Which framework is most suitable for

Jenkins集群下的pipeline实战

醉酒当歌 提交于 2019-12-04 16:38:33
关于Jenkins集群 在 《快速搭建Jenkins集群》 一文中,我们借助docker快速搭建了Jenkins集群,今天就在这个集群环境中创建pipeline任务,体验Jenkins集群下的并行任务; 环境信息 整个集群环境一共有三台电脑,信息如下: | 主机名 | IP地址 | 作用 | |--|--|--| | master | 192.168.133.131 | Jenkins集群的master节点,提供web服务 | | agent1 | 192.168.133.132 | Jenkins集群的一号工作接节点,标签是 maven | | agent2 | 192.168.133.133 | Jenkins集群的二号工作接节点,标签是 gradle | 实战内容 本次实战要体验Jenkins集群同时执行两个任务,都是编译构建GitHub上的热门开源项目: 在agent1上编译和构建spring-cloud-alibaba,再通过scp命令将构建结果传输到master电脑的 /usr/local/build_result 目录下; 在agent2编译和构建spring-framework,再通过scp命令将构建结果传输到master电脑的 /usr/local/build_result 目录下; 准备工作 要做以下准备工作才能顺利执行后续的任务:

No suitable cloud connector found while trying to use local spring cloud connector/local_configuration_connector

僤鯓⒐⒋嵵緔 提交于 2019-12-04 16:38:17
I am trying to use the local cloud spring connector to test my application in local environment before it can be deployed to CF based cloud environment. From the Spring link http://cloud.spring.io/spring-cloud-connectors/spring-cloud-connectors.html#_local_configuration_connector I followed the process and created properties file with the name spring-cloud-bootstrap.properties in project resource directory. It has the following content spring.cloud.propertiesFile: C:\Users\IBM_ADMIN\git\ServiceXchange5\ServiceXchange\spring-cloud.properties I do have the file spring-cloud.properties in the

NetflixOSS Zuul Filter for rejecting requests

南笙酒味 提交于 2019-12-04 16:16:43
问题 I am trying to use a ZuulFilter in a simple spring-cloud-Netflix Api gateway (reverse proxy) in order to authenticate requests against a custom authentication provider (via Rest call). The Filter should reject unauthorized requests with a 401 and don't pass those requests further down to the proxied services. Is that even possible for a ZuulFilter? I did not find documentation, example or something in Zuuls api. Any suggestions? 回答1: I got this to work, took some digging. Make sure your

spring cloud: 使用consul来替换eureka

大憨熊 提交于 2019-12-04 14:06:44
eureka官方已经正式宣布:自2.0起不再维护该项目,并在 github 项目wiki 上放出了一段吓唬人的话: 大意就是:从2.x起,官方不会继续开发了,如果需要使用2.x,风险自负。但其实我觉得问题并不大,eureka目前的功能已经非常稳定,就算不升级,服务注册/发现这些功能已经够用。 如果想寻找替代方案的话,建议采用功能更为丰富的consul,除了服务注册、发现,consul还提供了k-v存储等其它功能,consul的官网针对其它同类软件也做了详细比较,详见 consul vs other software ,有兴趣的可以看看,特别是有一句话,翻译成大白话就是:我不是针对在座的各位,我想说除我之外其它的都是渣渣(足见其相当的自信!) 进入正题,先来看consul的部署安装: 一、集群规划 consul借助agent来运行,类似elk的logstash agent 或 zabbix监控系统的agent ,每个需要被发现的服务上,通过consul agent client 来收集服务本身的信息,然后向consul agent server汇报, consul server 可以集群部署。 规划一下: 序号  节点ip 节点名称 角色 1 10.0.xx.55 server1 server 2 10.0.xx.203 server2 server 3 10.0.xx.204

Not able to read configuration from Consul in spring-boot application

℡╲_俬逩灬. 提交于 2019-12-04 13:41:17
问题 I am creating a Spring Boot application, which will read configuration like DB properties from Consul . But I am not able to read the key value from Consul using my application. Following is, what I am trying to do. **pom.xml** <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0<

Feign: Retry depending on response status

给你一囗甜甜゛ 提交于 2019-12-04 12:51:22
问题 I am currently using Spring Cloud and Feign to consume a Microservice in my application. Since it can happen, that a database connection or the like fails in a single service instance, making it return 500 HTTP status code, I want to make sure, that the next server is retried by the service's clients. Currently, Ribbon's retry mechanism works like a charm when the service is not running at all, however it still returns instantly an error when it receives a 500 status code, without any retry.

Is it possible to use Spring API Gateway for threat protection?

大城市里の小女人 提交于 2019-12-04 11:23:27
I'm going to implement API Gateway using Netflix Zuul. Is it possible to setup any rules for protection against: SQL Injection, XML Threat Protection JSON Threat Protection I found only external solution (API Gateways) supporting it :( 来源: https://stackoverflow.com/questions/52422198/is-it-possible-to-use-spring-api-gateway-for-threat-protection