Skip to content

Commit

Permalink
Ready to release 0.3.0 (#797)
Browse files Browse the repository at this point in the history
Modified version to 0.3.0; Adjust POM dependencies and use Dubbo's dependency version control; Add display of version on UI; Add 0.3.0 docker related scripts;
  • Loading branch information
KeRan213539 authored Aug 13, 2021
1 parent 14c368b commit 1bcac95
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 107 deletions.
31 changes: 31 additions & 0 deletions docker/0.3.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# 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.

FROM maven:3-openjdk-8
RUN mkdir -p /source/dubbo-admin-snapshot
ADD . /source/dubbo-admin-snapshot
WORKDIR /source/dubbo-admin-snapshot
RUN mvn --batch-mode -Prelease clean package -Dmaven.test.skip=true

FROM openjdk:8-jre
LABEL maintainer="[email protected]"
RUN apt-get update && apt-get install -y tini
COPY --from=0 /source/dubbo-admin-snapshot/dubbo-admin-distribution/target/dubbo-admin-0.3.0.jar /app.jar
COPY --from=0 /source/dubbo-admin-snapshot/docker/entrypoint.sh /usr/local/bin/entrypoint.sh

ENV JAVA_OPTS ""

ENTRYPOINT ["tini", "--", "/usr/local/bin/entrypoint.sh"]
EXPOSE 8080
1 change: 0 additions & 1 deletion docker/latest/entrypoint.sh → docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash
set -e

exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar
4 changes: 2 additions & 2 deletions docker/latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ FROM maven:3-openjdk-8
RUN mkdir -p /source/dubbo-admin-snapshot
ADD . /source/dubbo-admin-snapshot
WORKDIR /source/dubbo-admin-snapshot
RUN mvn --batch-mode clean package -Dmaven.test.skip=true
RUN mvn --batch-mode -Prelease clean package -Dmaven.test.skip=true

FROM openjdk:8-jre
LABEL maintainer="[email protected]"
RUN apt-get update && apt-get install -y tini
COPY --from=0 /source/dubbo-admin-snapshot/dubbo-admin-distribution/target/dubbo-admin-0.3.0-SNAPSHOT.jar /app.jar
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY --from=0 /source/dubbo-admin-snapshot/docker/entrypoint.sh /usr/local/bin/entrypoint.sh

ENV JAVA_OPTS ""

Expand Down
4 changes: 2 additions & 2 deletions docker/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ services:
ports:
- 2181:2181
admin:
image: apache/dubbo-admin
image: apache/dubbo-admin:0.3.0
depends_on:
- zookeeper
ports:
- 8080
- 8080:8080
environment:
- admin.registry.address=zookeeper://zookeeper:2181
- admin.config-center=zookeeper://zookeeper:2181
Expand Down
56 changes: 33 additions & 23 deletions dubbo-admin-distribution/src/bin/config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,43 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
server.port=8080
# centers in dubbo2.7
admin.registry.address=nacos://127.0.0.1:8848
admin.config-center=nacos://127.0.0.1:8848
admin.metadata-report.address=nacos://127.0.0.1:8848

#admin.registry.address=nacos://127.0.0.1:8848
#admin.config-center=nacos://127.0.0.1:8848
#admin.metadata-report.address=nacos://127.0.0.1:8848
# centers in dubbo2.7, if you want to add parameters, please add them to the url
admin.registry.address=zookeeper://127.0.0.1:2181
admin.config-center=zookeeper://127.0.0.1:2181
admin.metadata-report.address=zookeeper://127.0.0.1:2181

# nacos config, add parameters to url like username=nacos&password=nacos
#admin.registry.address=nacos://127.0.0.1:8848?group=DEFAULT_GROUP&namespace=public
#admin.config-center=nacos://127.0.0.1:8848?group=dubbo
#admin.metadata-report.address=nacos://127.0.0.1:8848?group=dubbo

#group (Deprecated it is recommended to use URL to add parameters,will be removed in the future)
#admin.registry.group=dubbo
#admin.config-center.group=dubbo
#admin.metadata-report.group=dubbo

#namespace used by nacos. (Deprecated it is recommended to use URL to add parameters,will be removed in the future)
#admin.registry.namespace=public
#admin.config-center.namespace=public
#admin.metadata-report.namespace=public

admin.root.user.name=root
admin.root.user.password=root
#group
admin.registry.group=DEFAULT_GROUP
admin.config-center.group=DEFAULT_GROUP
admin.metadata-report.group=DEFAULT_GROUP

#namespace used by nacos
admin.registry.namespace=public
admin.config-center.namespace=public
admin.metadata-report.namespace=public

admin.apollo.token=e16e5cd903fd0c97a116c873b448544b9d086de9
admin.apollo.appId=test
admin.apollo.env=dev
admin.apollo.cluster=default
admin.apollo.namespace=dubbo

#session timeout, default is one hour
admin.check.sessionTimeoutMilli=3600000


# apollo config
# admin.config-center = apollo://localhost:8070?token=e16e5cd903fd0c97a116c873b448544b9d086de9&app.id=test&env=dev&cluster=default&namespace=dubbo

# (Deprecated it is recommended to use URL to add parameters,will be removed in the future)
#admin.apollo.token=e16e5cd903fd0c97a116c873b448544b9d086de9
#admin.apollo.appId=test
#admin.apollo.env=dev
#admin.apollo.cluster=default
#admin.apollo.namespace=dubbo

#compress
server.compression.enabled=true
Expand Down
10 changes: 10 additions & 0 deletions dubbo-admin-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
Expand Down Expand Up @@ -179,6 +184,11 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</dependency>

</dependencies>

<build>
Expand Down
1 change: 0 additions & 1 deletion dubbo-admin-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>29.0-jre</version>
</dependency>

<dependency>
Expand Down
3 changes: 3 additions & 0 deletions dubbo-admin-ui/dubbo-admin-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "${revision}"
}
18 changes: 18 additions & 0 deletions dubbo-admin-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,23 @@
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>${basedir}</directory>
<targetPath>${basedir}/target/dist</targetPath>
<includes>
<include>dubbo-admin-info.json</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>${basedir}</directory>
<targetPath>${basedir}/public</targetPath>
<includes>
<include>dubbo-admin-info.json</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>
3 changes: 3 additions & 0 deletions dubbo-admin-ui/public/dubbo-admin-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "0.3.0"
}
2 changes: 1 addition & 1 deletion dubbo-admin-ui/src/components/governance/AccessControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<v-card-text>
<v-form>
<v-layout row wrap>
` <v-flex>
<v-flex>
<v-combobox
id="serviceSearch"
v-model="filter"
Expand Down
10 changes: 9 additions & 1 deletion dubbo-admin-ui/src/components/public/Drawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<img src="@/assets/logo.png" width="24" height="24"/>
<v-toolbar-title class="ml-0 pl-3">
<span class="hidden-sm-and-down white--text">{{ $store.state.appTitle }}</span>
<v-chip color="green" class="v-chip--x-small" disabled text-color="white" label>
{{ config.version }}
</v-chip>
</v-toolbar-title>
</v-toolbar>

Expand Down Expand Up @@ -68,18 +71,23 @@

<script>
import menu from '@/api/menu'
import axios from 'axios'
export default {
name: 'drawer',
data: () => ({
mini: false,
drawer: true,
menus: menu
menus: menu,
config:{}
}),
created () {
window.getApp.$on('DRAWER_TOGGLED', () => {
this.drawer = (!this.drawer)
})
axios.get('/dubbo-admin-info.json').then(response => {
this.config = response.data
})
},
computed: {
sideToolbarColor () {
Expand Down
86 changes: 10 additions & 76 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,15 @@
</repositories>

<properties>
<revision>0.3.0-SNAPSHOT</revision>
<revision>0.3.0</revision>
<main.basedir>${project.basedir}</main.basedir>
<commons-lang3-version>3.7</commons-lang3-version>
<dubbo-version>2.7.12</dubbo-version>
<curator-version>2.12.0</curator-version>
<curator-test-version>4.1.0</curator-test-version>
<fastjson-version>1.2.67</fastjson-version>
<springfox-swagger-version>2.9.2</springfox-swagger-version>
<netty-version>4.1.42.Final</netty-version>
<jacoco-version>0.8.2</jacoco-version>
<jedis-version>2.9.0</jedis-version>
<apollo-version>1.2.0</apollo-version>
<consul-version>1.4.2</consul-version>
<consul-embedded-version>2.0.0</consul-embedded-version>
<nacos-version>1.2.0</nacos-version>
<guava-version>20.0</guava-version>
<snakeyaml-version>1.24</snakeyaml-version>
<maven-checkstyle-plugin-version>3.0.0</maven-checkstyle-plugin-version>
<spring-boot-version>2.1.4.RELEASE</spring-boot-version>
<spring-boot-version>2.3.12.RELEASE</spring-boot-version>
<maven_compiler_version>3.6.0</maven_compiler_version>
<maven-flatten-version>1.1.0</maven-flatten-version>

Expand All @@ -84,27 +74,21 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml-version}</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>${spring-boot-version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>

<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis-version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3-version}</version>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-dependencies-bom</artifactId>
<version>${dubbo-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
Expand All @@ -113,12 +97,6 @@
<version>${apollo-version}</version>
</dependency>

<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<version>${nacos-version}</version>
</dependency>

<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
Expand All @@ -131,35 +109,6 @@
<version>${dubbo-version}</version>
</dependency>

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>${curator-version}</version>
</dependency>

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>${curator-test-version}</version>
</dependency>

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>${curator-version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson-version}</version>
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
Expand All @@ -170,22 +119,6 @@
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox-swagger-version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>${netty-version}</version>
</dependency>

<dependency>
<groupId>com.ecwid.consul</groupId>
<artifactId>consul-api</artifactId>
<version>${consul-version}</version>
</dependency>
<dependency>
<groupId>com.pszymczyk.consul</groupId>
<artifactId>embedded-consul</artifactId>
<version>${consul-embedded-version}</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
Expand Down Expand Up @@ -280,6 +213,7 @@
<exclude>**/assets/**</exclude>
<exclude>**/yarn.lock</exclude>
<exclude>**/node/**</exclude>
<exclude>**/dubbo-admin-info.json</exclude>
</excludes>
</configuration>
</execution>
Expand Down

0 comments on commit 1bcac95

Please sign in to comment.