forked from spring-petclinic/spring-petclinic-cloud
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request spring-petclinic#7 from odedia/master
Support for cloud-based platforms
- Loading branch information
Showing
92 changed files
with
5,281 additions
and
1,198 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 |
---|---|---|
|
@@ -16,3 +16,4 @@ target/ | |
|
||
# Branch switching | ||
generated/ | ||
.DS_Store |
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,2 +1,2 @@ | ||
language: java | ||
jdk: openjdk8 | ||
jdk: openjdk11 |
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,38 @@ | ||
resource_types: | ||
- name: cf-cli-resource | ||
type: docker-image | ||
source: | ||
repository: nulldriver/cf-cli-resource | ||
***REMOVED*** | ||
|
||
resources: | ||
- name: cf | ||
type: cf | ||
source: | ||
api: ((cf-api)) | ||
username: ((cf-username)) | ||
password: ((cf-password)) | ||
organization: ((cf-org)) | ||
space: ((cf-space)) | ||
- name: docker-image | ||
type: docker-image | ||
source: | ||
repository: spring-petclinic/api-gateway | ||
|
||
jobs: | ||
- name: deploy | ||
plan: | ||
- get: docker-image | ||
trigger: true | ||
params: | ||
globs: [ "((app)).jar", "manifest.yml" ] | ||
- put: cf | ||
params: | ||
manifest: github-prerelease/manifest.yml | ||
current_app_name: ((app)) | ||
- put: cf-add-network-policy | ||
resource: cf-env | ||
params: | ||
command: add-network-policy | ||
source_app: cloudnativepoll-webui | ||
destination_app: cloudnativepoll-backend |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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,54 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: api-gateway | ||
name: api-gateway | ||
namespace: spring-pet-clinic | ||
***REMOVED*** | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: api-gateway | ||
strategy: {***REMOVED*** | ||
template: | ||
metadata: | ||
labels: | ||
app: api-gateway | ||
***REMOVED*** | ||
containers: | ||
- image: ${REPOSITORY_PREFIX***REMOVED***/***REMOVED***latest | ||
name: api-gateway | ||
imagePullPolicy: Always | ||
livenessProbe: | ||
httpGet: | ||
port: 8080 | ||
path: /actuator/health/liveness | ||
initialDelaySeconds: 90 | ||
periodSeconds: 5 | ||
readinessProbe: | ||
httpGet: | ||
port: 8080 | ||
path: /actuator/health/readiness | ||
initialDelaySeconds: 15 | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: ["sh", "-c", "sleep 10"] | ||
resources: | ||
limits: | ||
memory: 1Gi | ||
requests: | ||
cpu: 2000m | ||
memory: 1Gi | ||
***REMOVED*** | ||
- name: SPRING_PROFILES_ACTIVE | ||
value: kubernetes | ||
- name: MANAGEMENT_METRICS_EXPORT_WAVEFRONT_URI | ||
value: proxy://wavefront-proxy.spring-pet-clinic.svc.cluster.local:2878 | ||
ports: | ||
- containerPort: 8080 | ||
resources: {***REMOVED*** | ||
restartPolicy: Always | ||
status: {***REMOVED*** |
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,64 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
labels: | ||
app: customers-service | ||
name: customers-service | ||
namespace: spring-pet-clinic | ||
***REMOVED*** | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: customers-service | ||
strategy: {***REMOVED*** | ||
template: | ||
metadata: | ||
labels: | ||
app: customers-service | ||
***REMOVED*** | ||
containers: | ||
- image: ${REPOSITORY_PREFIX***REMOVED***/customers-service:latest | ||
name: customers-service | ||
imagePullPolicy: Always | ||
livenessProbe: | ||
httpGet: | ||
port: 8080 | ||
path: /actuator/health/liveness | ||
initialDelaySeconds: 90 | ||
periodSeconds: 5 | ||
readinessProbe: | ||
httpGet: | ||
port: 8080 | ||
path: /actuator/health/readiness | ||
initialDelaySeconds: 15 | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: ["sh", "-c", "sleep 10"] | ||
resources: | ||
limits: | ||
memory: 1Gi | ||
requests: | ||
cpu: 2000m | ||
memory: 1Gi | ||
***REMOVED*** | ||
- name: SPRING_PROFILES_ACTIVE | ||
value: kubernetes | ||
- name: SPRING_DATASOURCE_URL | ||
value: jdbc:mysql://customers-db-mysql.spring-pet-clinic.svc.cluster.local:3306/my_database?queryInterceptors=brave.mysql8.TracingQueryInterceptor&exceptionInterceptors=brave.mysql8.TracingExceptionInterceptor&zipkinServiceName=customers-db | ||
***REMOVED*** | ||
value: root | ||
***REMOVED*** | ||
***REMOVED*** | ||
***REMOVED*** | ||
name: customers-db-mysql | ||
key: mysql-root-password | ||
- name: MANAGEMENT_METRICS_EXPORT_WAVEFRONT_URI | ||
value: proxy://wavefront-proxy.spring-pet-clinic.svc.cluster.local:2878 | ||
ports: | ||
- containerPort: 8080 | ||
resources: {***REMOVED*** | ||
restartPolicy: Always | ||
status: {***REMOVED*** |
Binary file not shown.
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,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: spring-pet-clinic |
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,118 @@ | ||
--- | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: pet-clinic-config | ||
namespace: spring-pet-clinic | ||
data: | ||
application.yaml: |- | ||
server: | ||
shutdown: graceful | ||
lifecycle: | ||
timeout-per-shutdown-phase: 15 | ||
port: 8080 | ||
compression: | ||
***REMOVED*** | ||
mime-types: application/json,text/css,application/javascript | ||
min-response-size: 2048 | ||
|
||
wavefront: | ||
application: | ||
name: spring-pet-clinic-k8s | ||
freemium-account: true | ||
|
||
# Logging | ||
logging.level.org.springframework: INFO | ||
|
||
# Metrics | ||
management: | ||
endpoint: | ||
health: | ||
probes: | ||
***REMOVED*** | ||
health: | ||
livenessState: | ||
***REMOVED*** | ||
readinessState: | ||
***REMOVED*** | ||
restart: | ||
***REMOVED*** | ||
metrics: | ||
***REMOVED*** | ||
prometheus: | ||
***REMOVED*** | ||
endpoints: | ||
web: | ||
exposure: | ||
include: '*' | ||
metrics: | ||
export: | ||
prometheus: | ||
***REMOVED*** | ||
wavefront: | ||
***REMOVED*** | ||
|
||
customers-service-id: http://customers-service.spring-pet-clinic.svc.cluster.local:8080 | ||
visits-service-id: http://vists-service.spring-pet-clinic.svc.cluster.local:8080 | ||
|
||
***REMOVED*** | ||
datasource: | ||
schema: classpath*:db/mysql/schema.sql | ||
data: classpath*:db/mysql/data.sql | ||
platform: mysql | ||
initialization-mode: always | ||
|
||
jpa: | ||
show-sql: true | ||
hibernate: | ||
ddl-auto: none | ||
generate-ddl: false | ||
sleuth: | ||
sampler: | ||
probability: 1.0 | ||
***REMOVED*** | ||
# Allow the microservices to override the remote properties with their own System properties or config file | ||
allow-override: true | ||
# Override configuration with any local property source | ||
override-none: true | ||
messages: | ||
basename: messages/messages | ||
***REMOVED*** | ||
***REMOVED*** | ||
discovery: | ||
***REMOVED*** | ||
loadbalancer: | ||
ribbon: | ||
***REMOVED*** | ||
gateway: | ||
x-forwarded: | ||
***REMOVED*** | ||
for-enabled: true | ||
proto-enabled: true | ||
host-append: false | ||
port-append: false | ||
proto-append: false | ||
routes: | ||
- id: vets-service | ||
uri: http://vets-service.spring-pet-clinic.svc.cluster.local:8080 | ||
predicates: | ||
- Path=/api/vet/** | ||
filters: | ||
- StripPrefix=2 | ||
- id: visits-service | ||
uri: http://visits-service.spring-pet-clinic.svc.cluster.local:8080 | ||
predicates: | ||
- Path=/api/visit/** | ||
filters: | ||
- StripPrefix=2 | ||
- id: customers-service | ||
uri: http://customers-service.spring-pet-clinic.svc.cluster.local:8080 | ||
predicates: | ||
- Path=/api/customer/** | ||
filters: | ||
- StripPrefix=2 | ||
***REMOVED*** | ||
cache: | ||
ttl: 60 | ||
heap-size: 101 | ||
|
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,25 @@ | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
namespace: spring-pet-clinic | ||
name: namespace-reader | ||
rules: | ||
- apiGroups: ["", "extensions", "apps"] | ||
resources: ["configmaps", "pods", "services", "endpoints", "secrets"] | ||
verbs: ["get", "list", "watch"] | ||
|
||
--- | ||
|
||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: namespace-reader-binding | ||
namespace: spring-pet-clinic | ||
subjects: | ||
- kind: ServiceAccount | ||
name: default | ||
apiGroup: "" | ||
roleRef: | ||
kind: Role | ||
name: namespace-reader | ||
apiGroup: "" |
Oops, something went wrong.