Skip to content

Commit

Permalink
Merge pull request #53 from lijiahangmax/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
lijiahangmax authored Sep 9, 2024
2 parents 8f601d1 + b00ebc0 commit 3da6a9d
Show file tree
Hide file tree
Showing 36 changed files with 106 additions and 36 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

## 演示环境

* 🔗 演示地址: http://101.43.254.243:1080/#/
* 🔗 演示地址: https://do.orionsec.cn/#/
* 🔏 演示账号: orionadmin/orionadmin
* ⭐ 体验后可以点一下 `star` 这对我很重要! [github](https://github.com/lijiahangmax/orion-ops) [gitee](https://gitee.com/lijiahangmax/orion-ops)
* 🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目!
Expand All @@ -68,17 +68,17 @@

## 快速开始

* [文档地址](https://lijiahangmax.github.io/open-orion/orion-ops)
* [安装文档](https://lijiahangmax.github.io/open-orion/orion-ops/quickstart/docker.html)
* [本地调试](https://lijiahangmax.github.io/open-orion/orion-ops/quickstart/dev.html)
* [操作手册](https://lijiahangmax.github.io/open-orion/orion-ops/operator/machine.html)
* [常见问题](https://lijiahangmax.github.io/open-orion/orion-ops/support/faq.html)
* [通用模板](https://lijiahangmax.github.io/open-orion/orion-ops/template/java-springboot-template.html)
* [文档地址](https://ops.orionsec.cn)
* [安装文档](https://ops.orionsec.cn/quickstart/docker.html)
* [本地调试](https://ops.orionsec.cn/quickstart/dev.html)
* [操作手册](https://ops.orionsec.cn/operator/machine.html)
* [常见问题](https://ops.orionsec.cn/support/faq.html)
* [通用模板](https://ops.orionsec.cn/template/java-springboot-template.html)

## 重构版 orion-visor

`orion-visor``orion-ops` 的重构版本, 优化了交互逻辑以及UI风格、操作更友好、系统更快速&安全!
[项目地址](https://lijiahangmax.github.io/open-orion/orion-visor)
[项目地址](https://visor.orionsec.cn)

## 技术栈

Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.3'
services:
orion-ops:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops:1.2.7
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops:1.2.8
ports:
- 1022:22
- 1080:80
Expand All @@ -19,7 +19,7 @@ services:
- orion-ops-db
- orion-ops-redis
orion-ops-db:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-mysql:1.2.7
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-mysql:1.2.8
privileged: true
environment:
- MYSQL_DATABASE=orion-ops
Expand All @@ -33,7 +33,7 @@ services:
- /data/orion-ops-space/docker-volumes/mysql/var-lib-mysql-files:/var/lib/mysql-files
- /data/orion-ops-space/docker-volumes/mysql/etc-mysql:/etc/mysql
orion-ops-redis:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-redis:1.2.7
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-redis:1.2.8
privileged: true
ports:
- 16379:6379
Expand All @@ -43,7 +43,7 @@ services:
- /data/orion-ops-space/docker-volumes/orion-ops-redis/data:/data
command: sh -c "redis-server /usr/local/redis.conf --requirepass $${REDIS_PASSWORD}"
orion-ops-adminer:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-adminer:1.2.7
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-adminer:1.2.8
restart: always
ports:
- 18080:8080
3 changes: 1 addition & 2 deletions docker/adminer/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#/bin/bash
version=1.2.7
version=1.2.8
docker build -t orion-ops-adminer:${version} .
docker tag orion-ops-adminer:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-adminer:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-adminer:${version}
3 changes: 1 addition & 2 deletions docker/mysql/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#/bin/bash
version=1.2.7
version=1.2.8
cp -r ../../sql ./sql
docker build -t orion-ops-mysql:${version} .
rm -rf ./sql
docker tag orion-ops-mysql:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-mysql:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-mysql:${version}
4 changes: 4 additions & 0 deletions docker/push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-adminer:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-mysql:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-redis:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops:${version}
3 changes: 1 addition & 2 deletions docker/redis/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#/bin/bash
version=1.2.7
version=1.2.8
docker build -t orion-ops-redis:${version} .
docker tag orion-ops-redis:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-redis:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops-redis:${version}
3 changes: 1 addition & 2 deletions docker/service/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#/bin/bash
version=1.2.7
version=1.2.8
mv ../../orion-ops-api/orion-ops-web/target/orion-ops-web.jar ./
mv ../../orion-ops-vue/dist ./
cp $HOME/orion-ops/lib/machine-monitor-agent-latest.jar ./
Expand All @@ -8,4 +8,3 @@ rm -rf ./dist
rm -rf ./orion-ops-web.jar
rm -rf ./machine-monitor-agent-latest.jar
docker tag orion-ops:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops:${version}
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-ops:${version}
12 changes: 8 additions & 4 deletions docker/service/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,27 @@ server {
location / {
root /usr/share/nginx/html;
index index.html index.htm;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /orion/api {
proxy_pass http://localhost:9119/orion/api;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /orion/keep-alive {
proxy_pass http://localhost:9119/orion/keep-alive;
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
}
Expand Down
2 changes: 1 addition & 1 deletion orion-ops-api/orion-ops-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-api</artifactId>
<version>1.2.7</version>
<version>1.2.8</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion orion-ops-api/orion-ops-dao/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-api</artifactId>
<version>1.2.7</version>
<version>1.2.8</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion orion-ops-api/orion-ops-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-api</artifactId>
<version>1.2.7</version>
<version>1.2.8</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion orion-ops-api/orion-ops-mapping/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-api</artifactId>
<version>1.2.7</version>
<version>1.2.8</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion orion-ops-api/orion-ops-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-api</artifactId>
<version>1.2.7</version>
<version>1.2.8</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion orion-ops-api/orion-ops-runner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>orion-ops-api</artifactId>
<groupId>com.orion.ops</groupId>
<version>1.2.7</version>
<version>1.2.8</version>
</parent>

<name>orion-ops-runner</name>
Expand Down
2 changes: 1 addition & 1 deletion orion-ops-api/orion-ops-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-api</artifactId>
<version>1.2.7</version>
<version>1.2.8</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion orion-ops-api/orion-ops-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.orion.ops</groupId>
<artifactId>orion-ops-api</artifactId>
<version>1.2.7</version>
<version>1.2.8</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.orion.lang.define.wrapper.HttpWrapper;
import com.orion.lang.utils.Exceptions;
import com.orion.lang.utils.collect.Maps;
import com.orion.ops.annotation.DemoDisableApi;
import com.orion.ops.annotation.EventLog;
import com.orion.ops.annotation.RestWrapper;
import com.orion.ops.constant.Const;
Expand Down Expand Up @@ -42,6 +43,7 @@ public class ApplicationEnvController {
@Resource
private ApplicationEnvService applicationEnvService;

@DemoDisableApi
@PostMapping("/add")
@ApiOperation(value = "添加环境变量")
public Long addAppEnv(@RequestBody ApplicationEnvRequest request) {
Expand All @@ -52,6 +54,7 @@ public Long addAppEnv(@RequestBody ApplicationEnvRequest request) {
return applicationEnvService.addAppEnv(request);
}

@DemoDisableApi
@PostMapping("/delete")
@ApiOperation(value = "删除环境变量")
@EventLog(EventType.DELETE_APP_ENV)
Expand All @@ -60,6 +63,7 @@ public Integer deleteAppEnv(@RequestBody ApplicationEnvRequest request) {
return applicationEnvService.deleteAppEnv(idList);
}

@DemoDisableApi
@PostMapping("/update")
@ApiOperation(value = "更新环境变量")
public Integer updateAppEnv(@RequestBody ApplicationEnvRequest request) {
Expand All @@ -82,6 +86,7 @@ public ApplicationEnvVO appEnvDetail(@RequestBody ApplicationEnvRequest request)
return applicationEnvService.getAppEnvDetail(id);
}

@DemoDisableApi
@PostMapping("/sync")
@ApiOperation(value = "同步环境变量到其他环境")
@EventLog(EventType.SYNC_APP_ENV)
Expand All @@ -107,6 +112,7 @@ public String view(@RequestBody ApplicationEnvRequest request) {
return viewType.toValue(env);
}

@DemoDisableApi
@PostMapping("/view-save")
@ApiOperation(value = "保存环境变量视图")
public Integer viewSave(@RequestBody ApplicationEnvRequest request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.orion.lang.define.wrapper.DataGrid;
import com.orion.lang.define.wrapper.HttpWrapper;
import com.orion.lang.utils.Exceptions;
import com.orion.ops.annotation.DemoDisableApi;
import com.orion.ops.annotation.EventLog;
import com.orion.ops.annotation.RestWrapper;
import com.orion.ops.constant.Const;
Expand Down Expand Up @@ -47,6 +48,7 @@ public class ApplicationInfoController {
@Resource
private ApplicationMachineService applicationMachineService;

@DemoDisableApi
@PostMapping("/add")
@ApiOperation(value = "添加应用")
@EventLog(EventType.ADD_APP)
Expand All @@ -55,6 +57,7 @@ public Long insertApp(@RequestBody ApplicationInfoRequest request) {
return applicationService.insertApp(request);
}

@DemoDisableApi
@PostMapping("/update")
@ApiOperation(value = "更新应用")
@EventLog(EventType.UPDATE_APP)
Expand All @@ -71,6 +74,7 @@ public Integer updateAppSort(@RequestBody ApplicationInfoRequest request) {
return applicationService.updateAppSort(id, Const.INCREMENT.equals(adjust));
}

@DemoDisableApi
@PostMapping("/delete")
@ApiOperation(value = "删除应用")
@EventLog(EventType.DELETE_APP)
Expand Down Expand Up @@ -122,6 +126,7 @@ public HttpWrapper<?> syncAppConfig(@RequestBody ApplicationSyncConfigRequest re
return HttpWrapper.ok();
}

@DemoDisableApi
@PostMapping("/copy")
@ApiOperation(value = "复制应用")
@EventLog(EventType.COPY_APP)
Expand All @@ -131,6 +136,7 @@ public HttpWrapper<?> copyApplication(@RequestBody ApplicationInfoRequest reques
return HttpWrapper.ok();
}

@DemoDisableApi
@PostMapping("/delete-machine")
@ApiOperation(value = "删除发布机器")
public Integer deleteAppMachine(@RequestBody ApplicationInfoRequest request) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.orion.ops.controller;

import com.orion.lang.define.wrapper.DataGrid;
import com.orion.ops.annotation.DemoDisableApi;
import com.orion.ops.annotation.EventLog;
import com.orion.ops.annotation.RestWrapper;
import com.orion.ops.constant.app.StageType;
Expand Down Expand Up @@ -36,6 +37,7 @@ public class ApplicationPipelineController {
@Resource
private ApplicationPipelineService applicationPipelineService;

@DemoDisableApi
@PostMapping("/add")
@ApiOperation(value = "新增应用流水线")
@EventLog(EventType.ADD_PIPELINE)
Expand All @@ -44,6 +46,7 @@ public Long addPipeline(@RequestBody ApplicationPipelineRequest request) {
return applicationPipelineService.addPipeline(request);
}

@DemoDisableApi
@PostMapping("/update")
@ApiOperation(value = "修改应用流水线")
@EventLog(EventType.UPDATE_PIPELINE)
Expand All @@ -67,6 +70,7 @@ public ApplicationPipelineVO getPipeline(@RequestBody ApplicationPipelineRequest
return applicationPipelineService.getPipeline(id);
}

@DemoDisableApi
@PostMapping("/delete")
@ApiOperation(value = "删除应用流水线")
@EventLog(EventType.DELETE_PIPELINE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.orion.ops.controller;

import com.orion.lang.define.wrapper.DataGrid;
import com.orion.ops.annotation.DemoDisableApi;
import com.orion.ops.annotation.EventLog;
import com.orion.ops.annotation.RequireRole;
import com.orion.ops.annotation.RestWrapper;
Expand Down Expand Up @@ -35,6 +36,7 @@ public class ApplicationProfileController {
@Resource
private ApplicationProfileService applicationProfileService;

@DemoDisableApi
@PostMapping("/add")
@ApiOperation(value = "添加应用环境")
@RequireRole(RoleType.ADMINISTRATOR)
Expand All @@ -46,6 +48,7 @@ public Long addProfile(@RequestBody ApplicationProfileRequest request) {
return applicationProfileService.addProfile(request);
}

@DemoDisableApi
@PostMapping("/update")
@ApiOperation(value = "更新应用环境")
@RequireRole(RoleType.ADMINISTRATOR)
Expand All @@ -58,6 +61,7 @@ public Integer updateProfile(@RequestBody ApplicationProfileRequest request) {
return applicationProfileService.updateProfile(request);
}

@DemoDisableApi
@PostMapping("/delete")
@ApiOperation(value = "删除应用环境")
@RequireRole(RoleType.ADMINISTRATOR)
Expand Down
Loading

0 comments on commit 3da6a9d

Please sign in to comment.