-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init helm chart for configservice, adminservice and portal
- Loading branch information
Showing
34 changed files
with
1,295 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
# Dockerfile for apollo-adminservice | ||
# 1. Copy apollo-adminservice-${VERSION}-github.zip to current directory | ||
# 2. Build with: docker build -t apollo-adminservice . | ||
# 3. Run with: docker run -p 8090:8090 -e DS_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8" -e DS_USERNAME=FillInCorrectUser -e DS_PASSWORD=FillInCorrectPassword -d -v /tmp/logs:/opt/logs --name apollo-adminservice apollo-adminservice | ||
# 1. ./scripts/build.sh | ||
# 2. Build with: mvn docker:build -pl apollo-adminservice | ||
# 3. Run with: docker run -p 8090:8090 -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8" -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword -d -v /tmp/logs:/opt/logs --name apollo-adminservice apolloconfig/apollo-adminservice | ||
|
||
FROM openjdk:8-jre-alpine | ||
MAINTAINER ameizi <[email protected]> | ||
|
||
ENV APOLLO_RUN_MODE "Docker" | ||
ENV VERSION 1.7.0-SNAPSHOT | ||
ENV SERVER_PORT 8090 | ||
# DataSource Info | ||
ENV DS_URL "" | ||
ENV DS_USERNAME "" | ||
ENV DS_PASSWORD "" | ||
|
||
RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories \ | ||
&& echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories \ | ||
|
@@ -24,9 +21,7 @@ ADD apollo-adminservice-${VERSION}-github.zip /apollo-adminservice/apollo-admins | |
|
||
RUN unzip /apollo-adminservice/apollo-adminservice-${VERSION}-github.zip -d /apollo-adminservice \ | ||
&& rm -rf /apollo-adminservice/apollo-adminservice-${VERSION}-github.zip \ | ||
&& sed -i '$d' /apollo-adminservice/scripts/startup.sh \ | ||
&& chmod +x /apollo-adminservice/scripts/startup.sh \ | ||
&& echo "tail -f /dev/null" >> /apollo-adminservice/scripts/startup.sh | ||
&& chmod +x /apollo-adminservice/scripts/startup.sh | ||
|
||
EXPOSE $SERVER_PORT | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
# Dockerfile for apollo-configservice | ||
# 1. Copy apollo-configservice-${VERSION}-github.zip to current directory | ||
# 2. Build with: docker build -t apollo-configservice . | ||
# 3. Run with: docker run -p 8080:8080 -e DS_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8" -e DS_USERNAME=FillInCorrectUser -e DS_PASSWORD=FillInCorrectPassword -d -v /tmp/logs:/opt/logs --name apollo-configservice apollo-configservice | ||
# 1. ./scripts/build.sh | ||
# 2. Build with: mvn docker:build -pl apollo-configservice | ||
# 3. Run with: docker run -p 8080:8080 -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8" -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword -d -v /tmp/logs:/opt/logs --name apollo-configservice apolloconfig/apollo-configservice | ||
|
||
FROM openjdk:8-jre-alpine | ||
MAINTAINER ameizi <[email protected]> | ||
|
||
ENV APOLLO_RUN_MODE "Docker" | ||
ENV VERSION 1.7.0-SNAPSHOT | ||
ENV SERVER_PORT 8080 | ||
# DataSource Info | ||
ENV DS_URL "" | ||
ENV DS_USERNAME "" | ||
ENV DS_PASSWORD "" | ||
|
||
RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories \ | ||
&& echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories \ | ||
|
@@ -24,9 +21,7 @@ ADD apollo-configservice-${VERSION}-github.zip /apollo-configservice/apollo-conf | |
|
||
RUN unzip /apollo-configservice/apollo-configservice-${VERSION}-github.zip -d /apollo-configservice \ | ||
&& rm -rf /apollo-configservice/apollo-configservice-${VERSION}-github.zip \ | ||
&& sed -i '$d' /apollo-configservice/scripts/startup.sh \ | ||
&& chmod +x /apollo-configservice/scripts/startup.sh \ | ||
&& echo "tail -f /dev/null" >> /apollo-configservice/scripts/startup.sh | ||
&& chmod +x /apollo-configservice/scripts/startup.sh | ||
|
||
EXPOSE $SERVER_PORT | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
.../java/com/ctrip/framework/apollo/metaservice/controller/KubernetesHomePageController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.ctrip.framework.apollo.metaservice.controller; | ||
|
||
import com.ctrip.framework.apollo.core.ServiceNameConsts; | ||
import com.ctrip.framework.apollo.core.dto.ServiceDTO; | ||
import com.ctrip.framework.apollo.metaservice.service.DiscoveryService; | ||
import com.google.common.collect.Lists; | ||
import java.util.List; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
|
||
/** | ||
* For kubernetes discovery service, there is no eureka home page, so we need to add a default one | ||
*/ | ||
@Profile({"kubernetes"}) | ||
@RestController | ||
public class KubernetesHomePageController { | ||
private final DiscoveryService discoveryService; | ||
|
||
public KubernetesHomePageController(DiscoveryService discoveryService) { | ||
this.discoveryService = discoveryService; | ||
} | ||
|
||
@GetMapping("/") | ||
public List<ServiceDTO> listAllServices() { | ||
List<ServiceDTO> allServices = Lists.newLinkedList(); | ||
allServices | ||
.addAll(discoveryService.getServiceInstances(ServiceNameConsts.APOLLO_CONFIGSERVICE)); | ||
allServices.addAll(discoveryService.getServiceInstances(ServiceNameConsts.APOLLO_ADMINSERVICE)); | ||
|
||
return allServices; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.