Skip to content

Commit

Permalink
OpenSergo Dashboard release 0.0.1 (#1)
Browse files Browse the repository at this point in the history
OpenSergo Dashboard 0.0.1 version
  • Loading branch information
robberphex authored Mar 31, 2022
1 parent a07cc82 commit f311790
Show file tree
Hide file tree
Showing 272 changed files with 49,660 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target/
*.versionsBackup

*.iml
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# OpenSergo Dashboard

You can view and modify your service information and service governance configuration on the OpenSergo dashboard.

## Quick Start

1. Download code: `git clone https://github.com/opensergo/opensergo-dashboard.git`
2. Modify `opensergo-dashboard-server/src/main/resources/application.yaml`, specify the mysql server address
* Table struct: [opensergo-dashboard-server/src/main/resources/schema.sql](./opensergo-dashboard-server/src/main/resources/schema.sql)
3. Build
* `mvn clean package -Dmaven.test.skip=true`
4. Launch
* `cd opensergo-dashboard-server/target/; java -jar opensergo-dashboard.jar`
5. Visit `http://localhost:8080/`

## Package and Release

1. Download code, and execute `mvn clean package -Dmaven.test.skip=true -Prelease`
2. `opensergo-dashboard-distribution/target/opensergo-dashboard-${version}.zip` is the release package
3. Extract the package, and execute `opensergo-dashboard-${version}/bin/startup.sh`
20 changes: 20 additions & 0 deletions README.zh-Hans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# OpenSergo 控制台

您可以在 OpenSergo 的控制台上查看、修改您的服务信息、服务治理配置。

## 快速开始

1. 下载代码:`git clone https://github.com/opensergo/opensergo-dashboard.git`
2.`opensergo-dashboard-server/src/main/resources/application.yaml`中指定mysql的地址
* mysql的表结构见 [opensergo-dashboard-server/src/main/resources/schema.sql](./opensergo-dashboard-server/src/main/resources/schema.sql)
3. 构建
* `mvn clean package -Dmaven.test.skip=true`
4. 启动
* `cd opensergo-dashboard-server/target/; java -jar opensergo-dashboard.jar`
5. 访问 `http://localhost:8080/`

## 打包发布

1. 下载代码后,执行`mvn clean package -Dmaven.test.skip=true -Prelease`
2. `opensergo-dashboard-distribution/target/opensergo-dashboard-${version}.zip`即为打包好的文件
3. 解压后执行其中的`opensergo-dashboard-${version}/bin/startup.sh`即可启动
71 changes: 71 additions & 0 deletions opensergo-dashboard-distribution/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?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">
<parent>
<groupId>io.opensergo</groupId>
<artifactId>opensergo-dashboard</artifactId>
<version>0.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>opensergo-dashboard-distribution</artifactId>

<dependencies>
<dependency>
<groupId>io.opensergo</groupId>
<artifactId>opensergo-dashboard-ui</artifactId>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>io.opensergo</groupId>
<artifactId>opensergo-dashboard-server</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<profiles>
<profile>
<id>release</id>
<build>
<finalName>opensergo-dashboard-${project.version}</finalName>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>bin-release</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/assembly/assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
37 changes: 37 additions & 0 deletions opensergo-dashboard-distribution/src/assembly/assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>bin-release</id>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>${project.build.finalName}</baseDirectory>
<fileSets>
<fileSet>
<directory>src/licenses</directory>
<outputDirectory>licenses</outputDirectory>
</fileSet>
<fileSet>
<directory>src</directory>
<includes>
<include>LICENSE</include>
<include>NOTICE</include>
</includes>
<outputDirectory></outputDirectory>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/resources</directory>
<outputDirectory></outputDirectory>
</fileSet>
</fileSets>
<files>
<file>
<source>../opensergo-dashboard-server/target/opensergo-dashboard.jar</source>
<outputDirectory>lib</outputDirectory>
<destName>opensergo-dashboard.jar</destName>
</file>
</files>

</assembly>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

cd `dirname $0`/../lib
target_dir=`pwd`

pid=`ps ax | grep -i 'opensergo-dashboard' | grep ${target_dir} | grep java | grep -v grep | awk '{print $1}'`
if [ -z "$pid" ] ; then
echo "No opensergo-dashboard server running."
exit -1;
fi

echo "The opensergo-dashboard server(${pid}) is running..."

kill ${pid}

echo "Send shutdown request to opensergo-dashboard server(${pid}) OK!"
53 changes: 53 additions & 0 deletions opensergo-dashboard-distribution/src/main/resources/bin/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/bash

cygwin=false
darwin=false
os400=false
case "`uname`" in
CYGWIN*) cygwin=true;;
Darwin*) darwin=true;;
OS400*) os400=true;;
esac
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/opt/taobao/java
[ ! -e "$JAVA_HOME/bin/java" ] && unset JAVA_HOME

if [ -z "$JAVA_HOME" ]; then
if $darwin; then

if [ -x '/usr/libexec/java_home' ] ; then
export JAVA_HOME=`/usr/libexec/java_home`

elif [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
fi
else
JAVA_PATH=`dirname $(readlink -f $(which javac))`
if [ "x$JAVA_PATH" != "x" ]; then
export JAVA_HOME=`dirname $JAVA_PATH 2>/dev/null`
fi
fi
if [ -z "$JAVA_HOME" ]; then
error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)! jdk8 or later is better!"
fi
fi

export SERVER="opensergo-dashboard"
export JAVA_HOME
export JAVA="$JAVA_HOME/bin/java"
export BASE_DIR=`cd $(dirname $0)/..; pwd`

if [ ! -d "${BASE_DIR}/logs" ]; then
mkdir ${BASE_DIR}/logs
fi

# check the start.out log output file
if [ ! -f "${BASE_DIR}/logs/start.out" ]; then
touch "${BASE_DIR}/logs/start.out"
fi

JAVA_OPT="${JAVA_OPT} -Xms512m -Xmx512m -Xmn256m"
JAVA_OPT="${JAVA_OPT} -Dloader.path=${BASE_DIR}/opt-libs -jar ${BASE_DIR}/lib/${SERVER}.jar"
nohup "$JAVA" ${JAVA_OPT} dubbo.admin >> ${BASE_DIR}/logs/catlog.out 2>&1 &
echo "${SERVER} is starting,you can check the ${BASE_DIR}/logs/catlog.out"
Loading

0 comments on commit f311790

Please sign in to comment.