File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Licensed to the Apache Software Foundation (ASF) under one or more
2+ # contributor license agreements. See the NOTICE file distributed with
3+ # this work for additional information regarding copyright ownership.
4+ # The ASF licenses this file to You under the Apache License, Version 2.0
5+ # (the "License"); you may not use this file except in compliance with
6+ # the License. You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ FROM maven:3-openjdk-8
17+ RUN mkdir /source && wget https://github.com/apache/dubbo-admin/archive/0.4.0.zip && unzip -q 0.4.0.zip -d /source
18+ WORKDIR /source/dubbo-admin-0.4.0
19+ RUN mvn --batch-mode clean package -Dmaven.test.skip=true
20+
21+ FROM openjdk:8-jre
22+ LABEL maintainer="dev@dubbo.apache.org"
23+ RUN apt-get update && apt-get install -y tini
24+ COPY --from=0 /source/dubbo-admin-0.4.0/dubbo-admin-distribution/target/dubbo-admin-0.4.0.jar /app.jar
25+ COPY --from=0 /source/dubbo-admin-0.4.0/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
26+
27+ ENV JAVA_OPTS ""
28+
29+ ENTRYPOINT ["tini" , "--" , "/usr/local/bin/entrypoint.sh" ]
30+ EXPOSE 8080
Original file line number Diff line number Diff line change 1+ # Licensed to the Apache Software Foundation (ASF) under one or more
2+ # contributor license agreements. See the NOTICE file distributed with
3+ # this work for additional information regarding copyright ownership.
4+ # The ASF licenses this file to You under the Apache License, Version 2.0
5+ # (the "License"); you may not use this file except in compliance with
6+ # the License. You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ FROM ubuntu:trusty
17+ RUN apt-get update && apt-get install -yq curl && apt-get clean
18+
19+ WORKDIR /app
20+
21+ ADD test.sh /app/test.sh
22+
23+ CMD ["bash", "test.sh"]
Original file line number Diff line number Diff line change 1+ # Licensed to the Apache Software Foundation (ASF) under one or more
2+ # contributor license agreements. See the NOTICE file distributed with
3+ # this work for additional information regarding copyright ownership.
4+ # The ASF licenses this file to You under the Apache License, Version 2.0
5+ # (the "License"); you may not use this file except in compliance with
6+ # the License. You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ zookeeper :
17+ image : zookeeper:3.5
18+ admin :
19+ build : .
20+ dockerfile : Dockerfile
21+ links :
22+ - zookeeper
23+ environment :
24+ - admin.registry.address=zookeeper://zookeeper:2181
25+ - admin.config-center=zookeeper://zookeeper:2181
26+ - admin.metadata-report.address=zookeeper://zookeeper:2181
27+ ports :
28+ - 8080
29+ sut :
30+ build : .
31+ dockerfile : Dockerfile.test
32+ links :
33+ - admin
Original file line number Diff line number Diff line change 1+ # Licensed to the Apache Software Foundation (ASF) under one or more
2+ # contributor license agreements. See the NOTICE file distributed with
3+ # this work for additional information regarding copyright ownership.
4+ # The ASF licenses this file to You under the Apache License, Version 2.0
5+ # (the "License"); you may not use this file except in compliance with
6+ # the License. You may obtain a copy of the License at
7+
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ LOOP_SIZE=60
17+ i=0
18+
19+ while [[ $i -lt LOOP_SIZE ]]; do
20+ status_code=$( curl --write-out %{http_code} --silent --output /dev/null http://admin:8080)
21+
22+ if [[ " $status_code " -eq 200 ]] ; then
23+ echo " Tests passed!"
24+ exit 0
25+ else
26+ curl -v http://admin:8080
27+ echo " status is incorrect, waiting for next turn"
28+ fi
29+ sleep 5
30+ i=$i +1
31+ done
32+
33+ echo " Tests failed!"
34+ exit 1
Original file line number Diff line number Diff line change 5353 <tasks >
5454 <copy file =" ../dubbo-admin-server/target/dubbo-admin-server-${project.version}.jar"
5555 tofile =" target/dubbo-admin-${project.version}.jar" />
56+ <copy file =" ../dubbo-admin-server/target/classes/application.properties"
57+ tofile =" src/bin/config/application.properties" />
5658 </tasks >
5759 </configuration >
5860 <goals >
Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ server.compression.enabled=true
5757server.compression.mime-types =text/css,text/javascript,application/javascript
5858server.compression.min-response-size =10240
5959
60+ # token timeout, default is one hour
61+ admin.check.tokenTimeoutMilli =3600000
62+ # Jwt signingKey
63+ admin.check.signSecret =86295dd0c4ef69a1036b0b0c15158d77
64+
6065# dubbo config
6166dubbo.application.name =dubbo-admin
6267dubbo.registry.address =${admin.registry.address}
Original file line number Diff line number Diff line change 11{
2- "version" : " 0.3 .0"
2+ "version" : " 0.4 .0"
33}
Original file line number Diff line number Diff line change 5353 </repositories >
5454
5555 <properties >
56- <revision >0.3 .0</revision >
56+ <revision >0.4 .0</revision >
5757 <main .basedir>${project.basedir} </main .basedir>
5858 <commons-lang3-version >3.7</commons-lang3-version >
5959 <dubbo-version >3.0.2.1</dubbo-version >
You can’t perform that action at this time.
0 commit comments