Skip to content

Commit

Permalink
upload sofa-dashboard-client
Browse files Browse the repository at this point in the history
  • Loading branch information
卫恒 committed Apr 24, 2019
0 parents commit c51ed85
Show file tree
Hide file tree
Showing 27 changed files with 2,055 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/target/*
target
bak
.pmd
.project
.settings
.classpath
.idea.xml
.idea
*.class
*.bak
*.iml
*.ipr
*.iws
bak
null/
tree.log
tmp/
*.log
*.DS_Store
logs/
node_modules
coverage-report
.vscode
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: java
sudo: false

jdk:
- oraclejdk8

install:
- mvn clean install -DskipTests -B -V
- mvn test

script:
- sh ./tools/check_format.sh

after_success:
- bash <(curl -s https://codecov.io/bash)
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## SOFADashboard client

[![Build Status](https://travis-ci.org/alipay/sofa-dashboard-client.svg?branch=master)](https://travis-ci.org/alipay/sofa-dashboard-client)
[![Coverage Status](https://coveralls.io/repos/github/alipay/sofa-dashboard-client/badge.svg?branch=master)](https://coveralls.io/github/alipay/sofa-dashboard-client?branch=master)
![license](https://img.shields.io/badge/license-Apache--2.0-green.svg)
[![Maven](https://img.shields.io/github/release/alipay/sofa-dashboard-client.svg)](https://github.com/alipay/sofa-dashboard-client/releases)

SOFADashboard client 用于向 SOFADashboard 服务端注册 IP、端口、健康检查状态等应用基本信息。

## 功能简介

SOFADashboard client 并非是直接通过 API 调用的方式将自身应用信息直接注册到 SOFADashboard 服务端 ,而是借助于 Zookeeper 来完成。

![image.png](https://gw.alipayobjects.com/mdn/sofastack/afts/img/A*n7ntQ7-iWMkAAAAAAAAAAABjARQnAQ)

客户端向 Zookeeper 中如上图所示的节点中写入数据,每一个 ip:port 节点代表一个应用实例,应用本身信息将写入当前节点的 data 中。

## 快速开始

* 通过 [SOFABoot 快速开始](https://www.sofastack.tech/sofa-boot/docs/QuickStart) 新建一个 SOFABoot 工程,然后引入 zookeeper 客户端依赖 和 sofa-dashboard -client 依赖

```xml
<dependency>
<groupId>com.alipay.sofa</groupId>
<artifactId>sofa-dashboard-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
```

* 配置
```properties
# 配置应用名
spring.application.name=samples-app
# 端口
server.port=8081
# 指定 zk 地址
com.alipay.sofa.admin.zookeeper.address=localhost:2181
```
* 在 SOFADashboard 管控端查看应用注册信息

> 参考 [SOFADashboard Server 快速开始](https://www.sofastack.tech/sofa-dashboard/docs/QuickStart) 部署 SOFADashboard 服务端
![client-dashboard](https://gw.alipayobjects.com/mdn/sofastack/afts/img/A*fEkBTJtcMzsAAAAAAAAAAABjARQnAQ)


## 示例

SOFADashboard client 的编译环境的要求为 JDK8,需要采用 Apache Maven 3.2.5 或者更高的版本进行编译。

## 文档

请参考 [SOFADashboard 官方文档](https://www.sofastack.tech/sofa-dashboard/docs/Home)
Loading

0 comments on commit c51ed85

Please sign in to comment.