-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cloud sql and gcs connection for pipeline-lite deployment (#1910)
* restructure * working example * working example * move mysql * moving minio and mysql out * add gcp * add files * fix test
- Loading branch information
Showing
32 changed files
with
179 additions
and
20 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
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
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 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
bases: | ||
- ../../namespaced | ||
- minio | ||
- mysql | ||
|
||
# Replace with your namespace | ||
namespace: kubeflow | ||
|
||
images: | ||
- name: mysql | ||
newTag: "5.6" | ||
- name: minio/minio | ||
newTag: RELEASE.2018-02-09T22-40-05Z |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,2 @@ | ||
# Ignore the GCP service account ADC file | ||
application_default_credentials.json |
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,26 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
bases: | ||
- ../../namespaced | ||
- minio | ||
- mysql | ||
|
||
# Replace with your namespace | ||
namespace: kubeflow | ||
|
||
patchesStrategicMerge: | ||
- ml-pipeline-apiserver-deployment-patch.yaml | ||
|
||
images: | ||
- name: gcr.io/cloudsql-docker/gce-proxy | ||
newTag: "1.14" | ||
- name: minio/minio | ||
newTag: RELEASE.2019-08-14T20-37-41Z | ||
|
||
secretGenerator: | ||
- name: user-gcp-sa | ||
files: | ||
# Create a service account key and stored as application_default_credentials.json in the same folder. | ||
# https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys | ||
- application_default_credentials.json |
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,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- minio-gcs-gateway-deployment.yaml | ||
- minio-gcs-gateway-service.yaml |
37 changes: 37 additions & 0 deletions
37
manifests/kustomize/env/gcp/minio/minio-gcs-gateway-deployment.yaml
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,37 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: minio-deployment | ||
spec: | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
app: minio | ||
spec: | ||
containers: | ||
- name: minio | ||
image: minio/minio:RELEASE.2019-08-14T20-37-41Z | ||
args: | ||
- gateway | ||
- gcs | ||
# Replace this with your own GCP project | ||
- yang-experiment-6 | ||
env: | ||
- name: MINIO_ACCESS_KEY | ||
value: "minio" | ||
- name: MINIO_SECRET_KEY | ||
value: "minio123" | ||
- name: GOOGLE_APPLICATION_CREDENTIALS | ||
value: "/etc/credentials/application_default_credentials.json" | ||
ports: | ||
- containerPort: 9000 | ||
volumeMounts: | ||
- name: gcp-sa-token | ||
mountPath: "/etc/credentials" | ||
readOnly: true | ||
volumes: | ||
- name: gcp-sa-token | ||
secret: | ||
secretName: user-gcp-sa |
11 changes: 11 additions & 0 deletions
11
manifests/kustomize/env/gcp/minio/minio-gcs-gateway-service.yaml
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,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: minio-service | ||
spec: | ||
ports: | ||
- port: 9000 | ||
targetPort: 9000 | ||
protocol: TCP | ||
selector: | ||
app: minio |
16 changes: 16 additions & 0 deletions
16
manifests/kustomize/env/gcp/ml-pipeline-apiserver-deployment-patch.yaml
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 @@ | ||
apiVersion: apps/v1beta2 | ||
kind: Deployment | ||
metadata: | ||
name: ml-pipeline | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: ml-pipeline-api-server | ||
env: | ||
- name: OBJECTSTORECONFIG_BUCKETNAME | ||
# Replace with your own bucket name | ||
value: 'yang-experiment-6-mlpipeline' | ||
- name: DBCONFIG_PASSWORD | ||
# Replace with your own CloudSQL password | ||
value: '123' |
42 changes: 42 additions & 0 deletions
42
manifests/kustomize/env/gcp/mysql/cloudsql-proxy-deployment.yaml
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,42 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: cloudsqlproxy | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: cloudsqlproxy | ||
spec: | ||
containers: | ||
- image: gcr.io/cloudsql-docker/gce-proxy:1.14 | ||
name: cloudsqlproxy | ||
command: ["/cloud_sql_proxy", | ||
"-dir=/cloudsql", | ||
# Replace with your own CloudSQL instance ID | ||
"-instances=yang-experiment-6:us-central1:kfp-test=tcp:0.0.0.0:3306", | ||
"-credential_file=/credentials/application_default_credentials.json", | ||
"term_timeout=10s"] | ||
# set term_timeout if require graceful handling of shutdown | ||
# NOTE: proxy will stop accepting new connections; only wait on existing connections | ||
lifecycle: | ||
preStop: | ||
exec: | ||
# (optional) add a preStop hook so that termination is delayed | ||
# this is required if your server still require new connections (e.g., connection pools) | ||
command: ['sleep', '10'] | ||
ports: | ||
- name: port-database1 | ||
containerPort: 3306 | ||
volumeMounts: | ||
- mountPath: /cloudsql | ||
name: cloudsql | ||
- mountPath: /credentials | ||
name: gcp-sa-token | ||
volumes: | ||
- name: cloudsql | ||
emptyDir: | ||
- name: gcp-sa-token | ||
secret: | ||
secretName: user-gcp-sa |
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,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- cloudsql-proxy-deployment.yaml | ||
- mysql-service.yaml |
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,10 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: mysql | ||
spec: | ||
ports: | ||
- port: 3306 | ||
targetPort: port-database1 | ||
selector: | ||
app: cloudsqlproxy |
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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