Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "support nginx check health config generator" #614

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
71 changes: 71 additions & 0 deletions .github/workflows/hera_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This is a basic workflow to help you get started with Actions

name: hera test

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
paths:
- 'hera-all/**'
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check-build:
name: hera test
runs-on: ubuntu-latest
steps:
- name: Setup Maven Action
uses: s4u/setup-maven-action@v1.7.0
with:
java-version: 8
#settings-properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'

- run: echo '<settings> <interactiveMode>false</interactiveMode> <profiles> <profile> <repositories> <repository> <snapshots /> <id>ossrh</id> <name>ossrh-snapshot</name> <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <snapshots /> <id>ossrh</id> <name>ossrh-snapshot</name> <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> </pluginRepository> </pluginRepositories> <id>artifactory</id> </profile> </profiles> <activeProfiles> <activeProfile>artifactory</activeProfile> </activeProfiles> <servers> <server> <id>github</id> <username>${env.GITHUB_ACTOR}</username> <password>${env.GITHUB_TOKEN}</password> </server> </servers> <mirrors/> <proxies/></settings>' > ~/.m2/settings.xml

- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
hera-app:
- 'hera-all/hera-app/**'
hera-operator:
- 'hera-all/hera-operator/**'
hera-tspandata:
- 'hera-all/hera-tspandata/**'
hera-log:
- 'hera-all/hera-log/**'
hera-monitor:
- 'hera-all/hera-monitor/**'
hera-prometheus-agent:
- 'hera-all/hera-prometheus-agent/**'
prometheus-starter-all:
- 'hera-all/prometheus-starter-all/**'
trace-etl:
- 'hera-all/trace-etl/**'
hera-demo-client:
- 'hera-all/hera-demo-client/**'
hera-webhook:
- 'hera-all/hera-webhook/**'
# run only if some file in 'src' folder was changed
- if: always() && steps.changes.outputs.hera-app == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-app; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-operator == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-operator; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-tspandata == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-tspandata; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-log == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-log; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-monitor == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-monitor; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..\
- if: always() && steps.changes.outputs.hera-prometheus-agent == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-prometheus-agent; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.prometheus-starter-all == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/prometheus-starter-all; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.trace-etl == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/trace-etl; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-demo-client == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-demo-client; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-webhook == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-webhook; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
27 changes: 27 additions & 0 deletions .github/workflows/jcommon_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This is a basic workflow to help you get started with Actions

name: Jcommon test

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
paths:
- 'jcommon/**'
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check-build:
name: Jcommon test
runs-on: ubuntu-latest
steps:
- name: Setup Maven Action
uses: s4u/setup-maven-action@v1.7.0
with:
java-version: 8
#settings-properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'

- run: echo '<settings> <interactiveMode>false</interactiveMode> <profiles> <profile> <repositories> <repository> <snapshots /> <id>ossrh</id> <name>ossrh-snapshot</name> <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <snapshots /> <id>ossrh</id> <name>ossrh-snapshot</name> <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> </pluginRepository> </pluginRepositories> <id>artifactory</id> </profile> </profiles> <activeProfiles> <activeProfile>artifactory</activeProfile> </activeProfiles> <servers> <server> <id>github</id> <username>${env.GITHUB_ACTOR}</username> <password>${env.GITHUB_TOKEN}</password> </server> </servers> <mirrors/> <proxies/></settings>' > ~/.m2/settings.xml
- run: cd jcommon; mvn -U clean package --fail-at-end -Dmaven.test.skip=true

21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
.idea
.idea
.java-version
*.bak
.classpath
*.diff
.DS_Store
.idea/
*.iml
logs/
.project
.settings/
.tags*
target/
schedule/target/
test-output/
nohup*
*.log
*.swp
*.pyc
*.class
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
## 🔨Contributing

**owners:**
- 邢鑫岩
- 邢鑫岩
- 欧金良
- 张志勇
- 单文榜
- 任清福
Expand Down Expand Up @@ -136,4 +137,11 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
```
## User List

If you are using [XiaoMi/mone](https://github.com/w1zirn/mone) and think that it helps you or want to contribute code for mone, please add your company to the user list to let us know your needs.

|![xiao mi](https://s02.mifile.cn/assets/static/image/logo-mi2.png)|![auchosaur games](readme/image/auchosaur_games.png)|![lingdong](readme/image/lingdong.png)|
| :---: | :---: | :---: |

Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void init() {

// rpcServer = new RpcServer(nacosAddrs, "zzy");

//注册处理器
//register processor
rpcServer.setProcessorList(Lists.newArrayList(
new Pair<>(RpcCmd.pingReq, new GwPingProcessor(this.machineManagementService, this.projectDeploymentService)),
new Pair<>(AgentCmd.shellRes, new ShellProcessor()),
Expand All @@ -92,7 +92,7 @@ public void init() {
new Pair<>(AgentCmd.notifyMsgReq, new NotifyMsgProcessor(dataHubService))
));

//注册周期任务
//register task
Task task = new GetClientInfoTask(rpcServer);

rpcServer.setTasks(Lists.newArrayList(
Expand All @@ -104,7 +104,7 @@ public void init() {
}

/**
* 发给所有客户端
* send to all clients
*
* @param code
* @param body
Expand All @@ -117,7 +117,7 @@ public void send(int code, String body) {


/**
* 发给指定客户端
* Sent to the specified client
*
* @param address
* @param code
Expand All @@ -135,7 +135,7 @@ public void send(String address, int code, String body, long timeout, InvokeCall
}

/**
* 发给指定客户端
* Sent to the specified client
*
* @param address
* @param code
Expand All @@ -154,7 +154,7 @@ public List<String> clientList() {
}

/**
* 获取带端口号的地址
* Gets the address with the port number
*
* @param ip
* @return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

/**
* @author goodjava@qq.com
* 处理客户端发送过来的通知信息
* Handles notification information sent by the client
*/
@Slf4j
public class NotifyMsgProcessor implements NettyRequestProcessor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class CodeCheckData implements Serializable {
private long id;

/**
* 耗时
* Time consuming
*/
private long time;

Expand Down
35 changes: 35 additions & 0 deletions hera-all/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# HERA说明文档
## 命名解释
Hera是希腊神话中的女神,也是宙斯的妻子和天后。她是家庭、婚姻、生育和女性的守护神。她通常被描绘为一位美丽、高大、威严的女性,头戴皇冠,手持权杖和皇家权力的象征。她的神庙和祭坛遍布希腊和罗马帝国的领土,是古代希腊文化中最重要的女神之一。

---

## HERA是什么?
HERA是由中国区研发效能团队开源的一款应用性能观测平台(APM)。以应用为核心,集指标监控、链路追踪、日志、报警于一身,并实现了metrics->tracing->logging的串联和联动,hera还提供应用健康状态列表、应用指标看板、接口大盘、应用大盘、网关大盘等内容丰富的监测看板,以及简洁明了的可视化明文报警,让用户准确、高效定位故障。

---

## Architecture
![hera](readme/images/architecture.png)

---

## Features
- 准:基于业务错误码提取可用性指标
- 快:metrics-tracing-logging联动
- 经济:<5%存储成本,满足99.9%的tracing诉求
- 拥抱云原生:遵循Opentracing标准、深度适配K8S、集成集成Opentelemetry、Grafana、Prometheus、ES等多个开源明星产品
- 企业级可观测产品

---

## Getting started
### 部署
[operator使用文档.md](readme%2Fdeploy%2Fhera-deploy-document.md)

---

### 应用接入
[应用接入文档.md](readme/application-integeration/application-integration-document.md)

---
14 changes: 11 additions & 3 deletions hera-all/hera-app/app-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
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">

<parent>
<groupId>run.mone</groupId>
<artifactId>hera-app</artifactId>
<version>1.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>run.mone</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>app-api</artifactId>
<version>${hera-app.release.version}</version>

<properties>
<maven.compiler.source>8</maven.compiler.source>
Expand All @@ -17,7 +21,11 @@
<dependency>
<groupId>run.mone</groupId>
<artifactId>app-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
package com.xiaomi.mone.app.api.message;

import com.google.gson.JsonObject;
import com.xiaomi.mone.app.api.model.HeraAppBaseInfoModel;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
* @author gaoxihui
* @date 2023/4/26 3:29 下午
*/
@Data
@ToString
public class HeraAppInfoModifyMessage implements Serializable {

private Integer id;

private Integer appId;

private Integer iamTreeId;

private Integer iamTreeType;

private String appName;

private String appCname;

private String owner;

private Integer platformType;

private Integer bindType;

private String appLanguage;

private Integer appType;

private JsonObject envMapping;

private List<String> joinedMembers;

private Boolean isNameChange;

private Boolean isPlatChange;

private Boolean isIamTreeIdChange;

private Boolean isIamTreeTypeChange;

private HeraAppModifyType modifyType;

public HeraAppBaseInfoModel baseInfoModel(){
HeraAppBaseInfoModel model = new HeraAppBaseInfoModel();
model.setId(this.getId());
model.setBindId(String.valueOf(this.getAppId()));
model.setBindType(this.getBindType());
model.setAppName(this.getAppName());
model.setAppCname(this.getAppCname());
model.setAppType(this.getAppType());
model.setAppLanguage(this.getAppLanguage());
model.setPlatformType(this.getPlatformType());
model.setIamTreeId(this.getIamTreeId());
model.setIamTreeType(this.getIamTreeType());
model.setEnvsMap(this.getEnvMapping() != null ? this.getEnvMapping().toString() : null);
return model;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.xiaomi.mone.app.api.message;

import java.io.Serializable;

/**
* @author gaoxihui
* @date 2023/4/26 3:30 下午
*/
public enum HeraAppModifyType implements Serializable {
create,
update,
delete;
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class HeraAppBaseInfoModel implements Serializable {

private Integer iamTreeId;

private Integer iamTreeType;

private Integer status;

private Date createTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class HeraAppBaseInfoParticipant implements Serializable {

private Integer iamTreeId;

private Integer iamTreeType;

private Integer bindType;

private Integer platformType;
Expand Down
Loading
Loading