Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Distributed Computing and Network Fusion System
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WirelessInformationCollaborate
Distributed Computing and Network Fusion System
Commits
582356dc
Commit
582356dc
authored
Jun 18, 2020
by
wutu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 缺少主函数的bug
parent
06f70474
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
226 deletions
+73
-226
apps/cnf-case-dis/pom.xml
apps/cnf-case-dis/pom.xml
+0
-20
apps/cnf-weixingsim/pom.xml
apps/cnf-weixingsim/pom.xml
+17
-0
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
apps/cnf-weixingsim/src/test/java/top/ninwoo/WxTests.java
+0
-0
cnf-client-starter/pom.xml
cnf-client-starter/pom.xml
+1
-0
cnf-cloud-center/pom.xml
cnf-cloud-center/pom.xml
+23
-0
cnf-edge-center/pom.xml
cnf-edge-center/pom.xml
+19
-2
cnf-test/pom.xml
cnf-test/pom.xml
+8
-6
cnf-test/src/test/java/top/ninwoo/BisheTests.java
cnf-test/src/test/java/top/ninwoo/BisheTests.java
+0
-189
pom.xml
pom.xml
+5
-9
No files found.
apps/cnf-case-dis/pom.xml
View file @
582356dc
...
@@ -34,26 +34,6 @@
...
@@ -34,26 +34,6 @@
<build>
<build>
<plugins>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-shade-plugin
</artifactId>
<version>
3.2.3
</version>
<executions>
<execution>
<phase>
package
</phase>
<goals>
<goal>
shade
</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation=
"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"
>
<mainClass>
top.ninwoo.BisheTestMain
</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
...
...
apps/cnf-weixingsim/pom.xml
View file @
582356dc
...
@@ -45,4 +45,21 @@
...
@@ -45,4 +45,21 @@
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
${springboot.version}
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
</project>
\ No newline at end of file
apps/cnf-weixingsim/src/test/top/ninwoo/WxTests.java
→
apps/cnf-weixingsim/src/test/
java/
top/ninwoo/WxTests.java
View file @
582356dc
File moved
cnf-client-starter/pom.xml
View file @
582356dc
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
jar
</packaging>
<artifactId>
cnf-client-starter
</artifactId>
<artifactId>
cnf-client-starter
</artifactId>
<properties>
<properties>
...
...
cnf-cloud-center/pom.xml
View file @
582356dc
...
@@ -50,6 +50,12 @@
...
@@ -50,6 +50,12 @@
<groupId>
top.ninwoo
</groupId>
<groupId>
top.ninwoo
</groupId>
<artifactId>
cnf-utils
</artifactId>
<artifactId>
cnf-utils
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
...
@@ -65,4 +71,21 @@
...
@@ -65,4 +71,21 @@
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
${springboot.version}
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
</project>
\ No newline at end of file
cnf-edge-center/pom.xml
View file @
582356dc
...
@@ -92,12 +92,12 @@
...
@@ -92,12 +92,12 @@
</dependencies>
</dependencies>
<build>
<!--
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!--这里写上main方法所在类的路径-->
<!–这里写上main方法所在类的路径–>
<configuration>
<configuration>
<mainClass>top.ninwoo.edgecenter.EdgeCenterApp</mainClass>
<mainClass>top.ninwoo.edgecenter.EdgeCenterApp</mainClass>
</configuration>
</configuration>
...
@@ -110,5 +110,22 @@
...
@@ -110,5 +110,22 @@
</executions>
</executions>
</plugin>
</plugin>
</plugins>
</plugins>
</build>-->
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
${springboot.version}
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</build>
</project>
</project>
\ No newline at end of file
cnf-test/pom.xml
View file @
582356dc
...
@@ -35,18 +35,20 @@
...
@@ -35,18 +35,20 @@
<artifactId>
influxdb-java
</artifactId>
<artifactId>
influxdb-java
</artifactId>
<version>
2.9
</version>
<version>
2.9
</version>
</dependency>
</dependency>
<dependency>
<groupId>
top.ninwoo
</groupId>
<artifactId>
cnf-weixingsim
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
${springboot.version}
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
...
...
cnf-test/src/test/java/top/ninwoo/BisheTests.java
View file @
582356dc
...
@@ -10,13 +10,8 @@ import top.ninwoo.bishe.starter.service.ClusterService;
...
@@ -10,13 +10,8 @@ import top.ninwoo.bishe.starter.service.ClusterService;
import
top.ninwoo.bishe.starter.service.NetworkService
;
import
top.ninwoo.bishe.starter.service.NetworkService
;
import
top.ninwoo.common.entity.*
;
import
top.ninwoo.common.entity.*
;
import
top.ninwoo.client.BisheTestMain
;
import
top.ninwoo.client.BisheTestMain
;
import
top.ninwoo.weixingsim.entity.SimData
;
import
top.ninwoo.weixingsim.entity.WeiXingData
;
import
top.ninwoo.weixingsim.service.impl.ToponetImpl
;
import
top.ninwoo.weixingsim.service.impl.WeixingImpl
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -204,190 +199,6 @@ public class BisheTests {
...
@@ -204,190 +199,6 @@ public class BisheTests {
}
}
// 测试初始化设置
@Test
public
void
test2
()
throws
IllegalAccessException
,
InterruptedException
{
//从文本中获取卫星的数据
WeixingImpl
wx
=
new
WeixingImpl
();
ToponetImpl
tp
=
new
ToponetImpl
();
SimData
sd
=
new
SimData
();
File
file
=
new
File
(
"C:\\WorkSpace\\test\\topusim_1.txt"
);
List
<
WeiXingData
>
wxData
=
wx
.
iniTopo
(
file
);
int
[][]
toponet
=
tp
.
getTopology
(
wxData
,
sd
);
ArrayList
<
SeparatedClusterConfig
>
clusterConfigs
=
new
ArrayList
<>();
SeparatedClusterConfig
separatedClusterConfig
=
new
SeparatedClusterConfig
();
List
<
ContainerDescription
>
cds
=
new
ArrayList
<>();
// TODO: 这个ID应该是从借口获取的
separatedClusterConfig
.
setEdgeNodeId
(
"192.168.190.135:8081"
);
ClusterConfig
clusterConfig
=
new
ClusterConfig
();
clusterConfig
.
setId
(
11111
l
);
clusterConfig
.
setOwner
(
"joliu"
);
//创建容器
for
(
int
k
=
0
;
k
<
wxData
.
size
();
k
++)
{
ContainerDescription
containerDescription
=
new
ContainerDescription
();
containerDescription
.
setMode
(
"normal"
);
containerDescription
.
setReplicas
(
1
);
DockerContainer
container
=
new
DockerContainer
();
container
.
setName
(
wxData
.
get
(
k
).
getName
());
container
.
setCommand
(
"sh"
);
container
.
setImage
(
"joliu/networktest"
);
containerDescription
.
setDockerContainer
(
container
);
cds
.
add
(
containerDescription
);
}
clusterConfig
.
setDockers
(
cds
);
NetworkTopology
topo
=
new
NetworkTopology
();
topo
.
setAppNames
(
tp
.
getAppNames
(
wxData
));
// 这个参数好像没啥用
topo
.
setTopologyId
(
11
);
topo
.
setTopology
(
toponet
);
clusterConfig
.
setTopology
(
topo
);
separatedClusterConfig
.
setClusterConfig
(
clusterConfig
);
clusterConfigs
.
add
(
separatedClusterConfig
);
clusterService
.
sendClusterConfigToEdgeNode
(
clusterConfigs
);
//下发逻辑拓扑
clusterService
.
sendLogicTopoToEdgeNode
(
clusterConfigs
);
}
//测试连续传输
@Test
public
void
test3
()
throws
IllegalAccessException
,
InterruptedException
{
ArrayList
<
SeparatedClusterConfig
>
clusterConfigs
=
new
ArrayList
<>();
SeparatedClusterConfig
separatedClusterConfig
=
new
SeparatedClusterConfig
();
List
<
ContainerDescription
>
cds
=
new
ArrayList
<>();
// TODO: 这个ID应该是从借口获取的
separatedClusterConfig
.
setEdgeNodeId
(
"192.168.190.135:8081"
);
ClusterConfig
clusterConfig
=
new
ClusterConfig
();
clusterConfig
.
setId
(
11111
l
);
clusterConfig
.
setOwner
(
"joliu"
);
//从文本中获取卫星的数据
WeixingImpl
wx
=
new
WeixingImpl
();
ToponetImpl
tp
=
new
ToponetImpl
();
SimData
sd
=
new
SimData
();
//tp.delHistory();
File
file
=
new
File
(
"C:\\WorkSpace\\test\\topusim_1.txt"
);
List
<
WeiXingData
>
wxData
=
wx
.
iniTopo
(
file
);
int
[][]
toponet
=
tp
.
getTopology
(
wxData
,
sd
);
//创建容器
for
(
int
k
=
0
;
k
<
wxData
.
size
();
k
++)
{
ContainerDescription
containerDescription
=
new
ContainerDescription
();
containerDescription
.
setMode
(
"normal"
);
containerDescription
.
setReplicas
(
1
);
DockerContainer
container
=
new
DockerContainer
();
container
.
setName
(
wxData
.
get
(
k
).
getName
());
container
.
setCommand
(
"sh"
);
container
.
setImage
(
"joliu/networktest"
);
containerDescription
.
setDockerContainer
(
container
);
cds
.
add
(
containerDescription
);
}
clusterConfig
.
setDockers
(
cds
);
NetworkTopology
topo
=
new
NetworkTopology
();
topo
.
setAppNames
(
tp
.
getAppNames
(
wxData
));
// 这个参数好像没啥用
topo
.
setTopologyId
(
11
);
topo
.
setTopology
(
toponet
);
clusterConfig
.
setTopology
(
topo
);
separatedClusterConfig
.
setClusterConfig
(
clusterConfig
);
clusterConfigs
.
add
(
separatedClusterConfig
);
clusterService
.
sendClusterConfigToEdgeNode
(
clusterConfigs
);
//下发逻辑拓扑
clusterService
.
sendLogicTopoToEdgeNode
(
clusterConfigs
);
for
(
int
i
=
1
;
;
i
++)
{
Thread
.
sleep
(
2000
);
int
time
=
i
*
sd
.
getJiange
();
List
<
WeiXingData
>
changetp
=
wx
.
changeTopo
(
wxData
,
time
);
topo
.
setTopology
(
tp
.
getTopology
(
changetp
,
sd
));
//下发修改后逻辑拓扑
clusterService
.
adjustLogicTopoToEdgeNode
(
clusterConfigs
);
}
}
//测试历史功能,需要提前定义好输出文本地址
@Test
public
void
test4
()
throws
IllegalAccessException
,
InterruptedException
{
ArrayList
<
SeparatedClusterConfig
>
clusterConfigs
=
new
ArrayList
<>();
SeparatedClusterConfig
separatedClusterConfig
=
new
SeparatedClusterConfig
();
List
<
ContainerDescription
>
cds
=
new
ArrayList
<>();
// TODO: 这个ID应该是从借口获取的
separatedClusterConfig
.
setEdgeNodeId
(
"192.168.190.135:8081"
);
ClusterConfig
clusterConfig
=
new
ClusterConfig
();
clusterConfig
.
setId
(
11111
l
);
clusterConfig
.
setOwner
(
"joliu"
);
//从文本中获取卫星的数据
WeixingImpl
wx
=
new
WeixingImpl
();
ToponetImpl
tp
=
new
ToponetImpl
();
SimData
sd
=
new
SimData
();
tp
.
delHistory
();
File
file
=
new
File
(
"C:\\WorkSpace\\test\\topusim_1.txt"
);
List
<
WeiXingData
>
wxData
=
wx
.
iniTopo
(
file
);
int
[][]
toponet
=
tp
.
getTopology
(
wxData
,
sd
);
//创建容器
for
(
int
k
=
0
;
k
<
wxData
.
size
();
k
++)
{
ContainerDescription
containerDescription
=
new
ContainerDescription
();
containerDescription
.
setMode
(
"normal"
);
containerDescription
.
setReplicas
(
1
);
DockerContainer
container
=
new
DockerContainer
();
container
.
setName
(
wxData
.
get
(
k
).
getName
());
container
.
setCommand
(
"sh"
);
container
.
setImage
(
"joliu/networktest"
);
containerDescription
.
setDockerContainer
(
container
);
cds
.
add
(
containerDescription
);
}
clusterConfig
.
setDockers
(
cds
);
NetworkTopology
topo
=
new
NetworkTopology
();
topo
.
setAppNames
(
tp
.
getAppNames
(
wxData
));
// 这个参数好像没啥用
topo
.
setTopologyId
(
11
);
topo
.
setTopology
(
toponet
);
clusterConfig
.
setTopology
(
topo
);
separatedClusterConfig
.
setClusterConfig
(
clusterConfig
);
clusterConfigs
.
add
(
separatedClusterConfig
);
clusterService
.
sendClusterConfigToEdgeNode
(
clusterConfigs
);
//下发逻辑拓扑
clusterService
.
sendLogicTopoToEdgeNode
(
clusterConfigs
);
for
(
int
i
=
1
;
;
i
++)
{
Thread
.
sleep
(
2000
);
int
time
=
i
*
sd
.
getJiange
();
List
<
WeiXingData
>
changetp
=
wx
.
changeTopo
(
wxData
,
time
);
topo
.
setTopology
(
tp
.
getTopology
(
changetp
,
sd
));
tp
.
history
(
topo
.
getAppNames
(),
topo
.
getTopology
());
//下发修改后逻辑拓扑
clusterService
.
adjustLogicTopoToEdgeNode
(
clusterConfigs
);
}
}
//测试容器运行程序
//测试容器运行程序
@Test
@Test
public
void
test5
()
{
public
void
test5
()
{
...
...
pom.xml
View file @
582356dc
...
@@ -17,14 +17,15 @@
...
@@ -17,14 +17,15 @@
<module>
cnf-test
</module>
<module>
cnf-test
</module>
<module>
cnf-edge-center
</module>
<module>
cnf-edge-center
</module>
<module>
cnf-client-starter
</module>
<module>
cnf-client-starter
</module>
<module>
apps/cnf-case-dis
</module>
<module>
apps/cnf-weixingsim
</module>
<module>
apps/cnf-weixingsim
</module>
<module>
apps/cnf-case-dis
</module>
<module>
apps/cnf-app-demo
</module>
<module>
apps/cnf-app-demo
</module>
</modules>
</modules>
<properties>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<springboot.version>
2.1.2.RELEASE
</springboot.version>
</properties>
</properties>
<dependencyManagement>
<dependencyManagement>
...
@@ -43,17 +44,17 @@
...
@@ -43,17 +44,17 @@
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
<version>
2.1.2.RELEASE
</version>
<version>
${springboot.version}
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<version>
2.1.2.RELEASE
</version>
<version>
${springboot.version}
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
<version>
2.1.2.RELEASE
</version>
<version>
${springboot.version}
</version>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<dependency>
<dependency>
...
@@ -77,11 +78,6 @@
...
@@ -77,11 +78,6 @@
<build>
<build>
<plugins>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
2.2.1.RELEASE
</version>
</plugin>
<plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<artifactId>
maven-compiler-plugin
</artifactId>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment