forked from kubeflow/pipelines
-
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.
Create a batch job to allow manual runs of auto-deploying the latest …
…code (kubeflow#320) * Create a batch job to allow manual runs of auto-deploying the latest cluster. * * Add a Makefile * Pass in zone. * Move to us-east1-b becasue of kubeflow#321 * Fix zones. * Make zone required.
- Loading branch information
1 parent
89bbe15
commit ae94239
Showing
6 changed files
with
114 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright 2017 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# Requirements: | ||
# https://github.com/mattrobenolt/jinja2-cli | ||
# pip install jinja2-clie | ||
IMG = gcr.io/kubeflow-ci/deploy-worker | ||
|
||
# Whether to use cached images with GCB | ||
USE_IMAGE_CACHE ?= true | ||
|
||
TAG := $(shell date +v%Y%m%d)-$(shell git describe --tags --always --dirty)-$(shell git diff | shasum -a256 | cut -c -6) | ||
DIR := ${CURDIR} | ||
|
||
all: build | ||
|
||
# To build without the cache set the environment variable | ||
# export DOCKER_BUILD_OPTS=--no-cache | ||
build: | ||
docker build ${DOCKER_BUILD_OPTS} -t $(IMG):$(TAG) . | ||
@echo Built $(IMG):$(TAG) | ||
|
||
# Build but don't attach the latest tag. This allows manual testing/inspection of the image | ||
# first. | ||
push: build | ||
gcloud docker -- push $(IMG):$(TAG) | ||
@echo Pushed $(IMG):$(TAG) | ||
# Add tag starting hitting problems so tag and push | ||
docker tag $(IMG):$(TAG) $(IMG):latest | ||
gcloud docker -- push $(IMG):$(TAG) | ||
|
||
build-gcb: | ||
gcloud builds submit --machine-type=n1-highcpu-32 --project=kubeflow-ci \ | ||
--tag=$(IMG):$(TAG) \ | ||
--timeout=3600 |
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,56 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
generateName: deploy-master- | ||
namespace: kubeflow-test-infra | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: deploy-worker | ||
image: gcr.io/kubeflow-ci/deploy-worker:v20190228-e625074-dirty-decd62 | ||
env: | ||
- name: GOOGLE_APPLICATION_CREDENTIALS | ||
value: /secret/gcp-credentials/key.json | ||
command: | ||
- /usr/local/bin/init.sh | ||
- --src_dir=/src | ||
- --repo_owner=kubeflow | ||
- --repo_branches=kubeflow/master,testing/master | ||
- --project=kubeflow-ci | ||
- --worker_cluster=kubeflow-testing | ||
- --job_labels=/etc/pod-info/labels | ||
- --nfs_mnt=/mnt/test-data-volume | ||
- --base_name=kf-vmaster | ||
- --max_num_cluster=5 | ||
- --zone=us-east1-b | ||
volumeMounts: | ||
- name: gcp-credentials | ||
mountPath: "/secret/gcp-credentials" | ||
readOnly: true | ||
- name: pod-info | ||
mountPath: "/etc/pod-info" | ||
readOnly: true | ||
- name: github-token | ||
mountPath: "/secret/github-token" | ||
readOnly: true | ||
- name: test-data-volume | ||
mountPath: "/mnt/test-data-volume" | ||
readOnly: false | ||
restartPolicy: Never | ||
volumes: | ||
- name: gcp-credentials | ||
secret: | ||
secretName: gcp-credentials | ||
- name: github-token | ||
secret: | ||
secretName: github-token | ||
- name: test-data-volume | ||
persistentVolumeClaim: | ||
claimName: nfs-external | ||
- name: pod-info | ||
downwardAPI: | ||
items: | ||
- path: "labels" | ||
fieldRef: | ||
fieldPath: metadata.labels |
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