forked from futurewei-cloud/alcor-control-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Microservices] Route manager (futurewei-cloud#144)
The Route Manager could store routing tables/rules for vpc, subnet, and gateway. It will interact with vpc manager, subnet manager, and gateway manager. * New APIs: Add get/create apis on route manager and interaction with vpc manager * Schema update: Add web route schema and update vpc schema * Service codes: new route manager server codes * Code structure: package path update for common lib, vpc manager * Deployment: Update docker and pom files * Deployment: Remove lib jar and add dependency on pom for route manager * Deployment: Update dynamically load configuration file in kubernetes Co-authored-by: Kevin <[email protected]>
- Loading branch information
1 parent
13efc56
commit 0e92f99
Showing
66 changed files
with
2,093 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,3 +72,7 @@ fabric.properties | |
# Vpcmanager files | ||
vpcmanager/target/ | ||
lib/target/ | ||
|
||
### Logs ### | ||
*.log | ||
*.gz |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: redis-route-sr | ||
labels: | ||
name: redis-route | ||
spec: | ||
ports: | ||
- port: 6380 | ||
targetPort: 6379 | ||
selector: | ||
app: redis-route | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: redis-route | ||
name: redis-route | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: redis-route | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: redis-route | ||
spec: | ||
containers: | ||
#- image: redis | ||
- image: fwnetworking/controller:redis | ||
name: redis-route | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 6379 |
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: vpc-configmap | ||
data: | ||
application.properties: | | ||
spring.redis.host=10.109.127.248 | ||
spring.redis.port=6379 | ||
logging.level.root=info | ||
logging.level.org.springframework.web=info | ||
logging.file.path=. | ||
logging.type=file | ||
apache.kafka.address=172.17.0.1:9092 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: vpcmanager | ||
name: vpcmanager | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: vpcmanager | ||
replicas: 2 | ||
#replicas: 3 | ||
template: | ||
metadata: | ||
labels: | ||
app: vpcmanager | ||
spec: | ||
volumes: | ||
- name: vpc-volume | ||
configMap: | ||
name: vpc-configmap | ||
items: | ||
- key: application.properties | ||
path: application.properties | ||
containers: | ||
#- image: zhonghaolyu/repo:vpcKube4 | ||
- image: fwnetworking/controller:vpc_manager-v0.3.0 | ||
name: vpcmanager-web | ||
imagePullPolicy: IfNotPresent | ||
command: ["java", "-jar", "/app/AlcorVpcManager-0.1.0.jar", "--spring.config.location=/etc/app/application.properties"] | ||
ports: | ||
- containerPort: 8080 | ||
volumeMounts: | ||
- name: vpc-volume | ||
mountPath: /etc/app | ||
envFrom: | ||
- configMapRef: | ||
name: vpc-configmap | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: vpcmanager-service | ||
labels: | ||
name: vpcmanager-service | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 8001 | ||
targetPort: 8080 | ||
nodePort: 30001 | ||
selector: | ||
app: vpcmanager | ||
|
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
HELP.md | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/** | ||
!**/src/test/** | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Logs ### | ||
*.log | ||
*.gz |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,16 @@ | ||
# Dockerfile for VPC Manager | ||
|
||
FROM openjdk:8 | ||
|
||
MAINTAINER Zhonghao Lyu <[email protected]> | ||
|
||
# Route Manager process | ||
EXPOSE 8080 | ||
# ROute Manager admin process | ||
|
||
# Generate container image and run container | ||
COPY ./target/AlcorRouteManager-0.1.0-SNAPSHOT.jar /app/AlcorRouteManager-0.1.0.jar | ||
#COPY ./config/machine.json /app/config/machine.json | ||
|
||
CMD ["java", "-jar", "/app/AlcorRouteManager-0.1.0.jar"] | ||
|
File renamed without changes.
File renamed without changes.
Oops, something went wrong.