Skip to content

Commit

Permalink
prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Aug 31, 2023
1 parent 778e00c commit c9bf378
Show file tree
Hide file tree
Showing 10 changed files with 416 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docker/0.6.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 /source && wget https://github.com/apache/dubbo-admin/archive/0.6.0.zip && unzip -q 0.6.0.zip -d /source
WORKDIR /source/dubbo-admin-0.6.0
COPY application.properties dubbo-admin-server/src/main/resources/application.properties
RUN mvn --batch-mode clean package -Dmaven.test.skip=true

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

ENV JAVA_OPTS ""

ENTRYPOINT ["tini", "--", "/usr/local/bin/entrypoint.sh"]
EXPOSE 8080
23 changes: 23 additions & 0 deletions docker/0.6.0/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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 ubuntu:trusty
RUN apt-get update && apt-get install -yq curl && apt-get clean

WORKDIR /app

ADD test.sh /app/test.sh

CMD ["bash", "test.sh"]
87 changes: 87 additions & 0 deletions docker/0.6.0/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#
# 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.
#

server.port=38080
dubbo.protocol.port=30880
dubbo.application.qos-port=32222

# centers in dubbo2.7, if you want to add parameters, please add them to the url
admin.registry.address=zookeeper://172.17.0.2:2181
admin.config-center=zookeeper://172.17.0.2:2181
admin.metadata-report.address=zookeeper://172.17.0.2: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

#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
server.compression.mime-types=text/css,text/javascript,application/javascript
server.compression.min-response-size=10240

#token timeout, default is one hour
admin.check.tokenTimeoutMilli=3600000
#Jwt signingKey
admin.check.signSecret=86295dd0c4ef69a1036b0b0c15158d77

#dubbo config
dubbo.application.name=dubbo-admin
dubbo.registry.address=${admin.registry.address}

# mysql
#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#spring.datasource.url=jdbc:mysql://localhost:3306/dubbo-admin?characterEncoding=utf8&connectTimeout=1000&socketTimeout=10000&autoReconnect=true
#spring.datasource.username=root
#spring.datasource.password=mysql

# h2
spring.datasource.url=jdbc:h2:mem:~/dubbo-admin;MODE=MYSQL;
spring.datasource.username=sa
spring.datasource.password=

# id generate type
mybatis-plus.global-config.db-config.id-type=none

dubbo.application.logger=slf4j
33 changes: 33 additions & 0 deletions docker/0.6.0/docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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.

zookeeper:
image: zookeeper:3.5
admin:
build: .
dockerfile: Dockerfile
links:
- zookeeper
environment:
- admin.registry.address=zookeeper://zookeeper:2181
- admin.config-center=zookeeper://zookeeper:2181
- admin.metadata-report.address=zookeeper://zookeeper:2181
ports:
- 8080
sut:
build: .
dockerfile: Dockerfile.test
links:
- admin
34 changes: 34 additions & 0 deletions docker/0.6.0/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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.

LOOP_SIZE=60
i=0

while [[ $i -lt LOOP_SIZE ]]; do
status_code=$(curl --write-out %{http_code} --silent --output /dev/null http://admin:8080)

if [[ "$status_code" -eq 200 ]] ; then
echo "Tests passed!"
exit 0
else
curl -v http://admin:8080
echo "status is incorrect, waiting for next turn"
fi
sleep 5
i=$i+1
done

echo "Tests failed!"
exit 1
31 changes: 31 additions & 0 deletions docker/latest/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 /source && wget https://github.com/apache/dubbo-admin/archive/0.6.0.zip && unzip -q 0.6.0.zip -d /source
WORKDIR /source/dubbo-admin-0.6.0
COPY application.properties dubbo-admin-server/src/main/resources/application.properties
RUN mvn --batch-mode clean package -Dmaven.test.skip=true

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

ENV JAVA_OPTS ""

ENTRYPOINT ["tini", "--", "/usr/local/bin/entrypoint.sh"]
EXPOSE 8080
23 changes: 23 additions & 0 deletions docker/latest/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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 ubuntu:trusty
RUN apt-get update && apt-get install -yq curl && apt-get clean

WORKDIR /app

ADD test.sh /app/test.sh

CMD ["bash", "test.sh"]
87 changes: 87 additions & 0 deletions docker/latest/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#
# 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.
#

server.port=38080
dubbo.protocol.port=30880
dubbo.application.qos-port=32222

# centers in dubbo2.7, if you want to add parameters, please add them to the url
admin.registry.address=zookeeper://172.17.0.2:2181
admin.config-center=zookeeper://172.17.0.2:2181
admin.metadata-report.address=zookeeper://172.17.0.2: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

#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
server.compression.mime-types=text/css,text/javascript,application/javascript
server.compression.min-response-size=10240

#token timeout, default is one hour
admin.check.tokenTimeoutMilli=3600000
#Jwt signingKey
admin.check.signSecret=86295dd0c4ef69a1036b0b0c15158d77

#dubbo config
dubbo.application.name=dubbo-admin
dubbo.registry.address=${admin.registry.address}

# mysql
#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#spring.datasource.url=jdbc:mysql://localhost:3306/dubbo-admin?characterEncoding=utf8&connectTimeout=1000&socketTimeout=10000&autoReconnect=true
#spring.datasource.username=root
#spring.datasource.password=mysql

# h2
spring.datasource.url=jdbc:h2:mem:~/dubbo-admin;MODE=MYSQL;
spring.datasource.username=sa
spring.datasource.password=

# id generate type
mybatis-plus.global-config.db-config.id-type=none

dubbo.application.logger=slf4j
33 changes: 33 additions & 0 deletions docker/latest/docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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.

zookeeper:
image: zookeeper:3.5
admin:
build: .
dockerfile: Dockerfile
links:
- zookeeper
environment:
- admin.registry.address=zookeeper://zookeeper:2181
- admin.config-center=zookeeper://zookeeper:2181
- admin.metadata-report.address=zookeeper://zookeeper:2181
ports:
- 8080
sut:
build: .
dockerfile: Dockerfile.test
links:
- admin
Loading

0 comments on commit c9bf378

Please sign in to comment.