Compare commits
8 Commits
fix-travis
...
k8
Author | SHA1 | Date | |
---|---|---|---|
e99286a4e0 | |||
8eb101ee41 | |||
e1c3c36057 | |||
fe6d0a1b7f | |||
cca8aecb0e | |||
76069a7c36 | |||
67278756c4 | |||
f011a2bcc8 |
57
.travis.yml
57
.travis.yml
@@ -1,38 +1,41 @@
|
||||
### # https://docs.travis-ci.com/user/languages/python/
|
||||
### language: python
|
||||
### python:
|
||||
### - "3.5"
|
||||
### - "3.6"
|
||||
### #- "3.7-dev" # fails due to datrie build failure (snakemake dependency)
|
||||
### # command to install dependencies
|
||||
### install:
|
||||
### - pip install -r requirements.txt
|
||||
### - python setup.py build install
|
||||
### # command to run tests
|
||||
### script:
|
||||
### - pytest
|
||||
###
|
||||
######################
|
||||
#
|
||||
|
||||
# https://github.com/LiliC/travis-minikube/blob/master/.travis.yml
|
||||
# https://raw.githubusercontent.com/LiliC/travis-minikube/master/.travis.yml
|
||||
language: python
|
||||
python:
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
|
||||
sudo: required
|
||||
|
||||
# This moves Kubernetes specific config files.
|
||||
env:
|
||||
- CHANGE_MINIKUBE_NONE_USER=true
|
||||
|
||||
# command to install dependencies
|
||||
install:
|
||||
# Install byok8s requirements (snakemake, python-kubernetes)
|
||||
- pip install -r requirements.txt
|
||||
# Install byok8s cli tool
|
||||
- python setup.py build install
|
||||
|
||||
before_script:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install -y coreutils
|
||||
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.7.0/bin/linux/amd64/kubectl && \
|
||||
chmod +x kubectl && sudo mv kubectl /usr/local/bin/
|
||||
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && \
|
||||
chmod +x minikube && sudo mv minikube /usr/local/bin/
|
||||
- sudo minikube start --vm-driver=none --kubernetes-version=v1.7.0
|
||||
# Do everything from test/
|
||||
- cd test
|
||||
# Download kubectl, which is a requirement for using minikube.
|
||||
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.9.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
|
||||
# Download minikube.
|
||||
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.25.2/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
|
||||
- sudo minikube start --vm-driver=none --kubernetes-version=v1.9.0
|
||||
# Fix the kubectl context, as it's often stale.
|
||||
- minikube update-context
|
||||
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; \
|
||||
until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done
|
||||
# Wait for Kubernetes to be up and ready.
|
||||
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done
|
||||
|
||||
script:
|
||||
- kubectl cluster-info
|
||||
# Verify kube-addon-manager.
|
||||
# kube-addon-manager is responsible for managing other kubernetes components, such as kube-dns, dashboard, storage-provisioner..
|
||||
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl -n kube-system get pods -lcomponent=kube-addon-manager -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1;echo "waiting for kube-addon-manager to be available"; kubectl get pods --all-namespaces; done
|
||||
# Wait for kube-dns to be ready.
|
||||
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl -n kube-system get pods -lk8s-app=kube-dns -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1;echo "waiting for kube-dns to be available"; kubectl get pods --all-namespaces; done
|
||||
# Create example Redis deployment on Kubernetes.
|
||||
- byok8s workflow-alpha params-blue
|
||||
|
14
README.md
14
README.md
@@ -147,24 +147,22 @@ won't be able to find the kubernetes cluster.)
|
||||
for workflow config and param files,
|
||||
or have a built-in set of params and configs.)
|
||||
|
||||
Run the blue workflow with alpha params:
|
||||
Run the alpha workflow with blue params:
|
||||
|
||||
```
|
||||
byok8s -w workflow-blue -p params-alpha
|
||||
byok8s -w workflow-alpha -p params-blue
|
||||
```
|
||||
|
||||
Run the blue workflow with gamma params, and
|
||||
kubernetes configuration details in kube-deets
|
||||
(all json files):
|
||||
Run the alpha workflow with red params:
|
||||
|
||||
```
|
||||
byok8s -w workflow-blue -p params-gamma
|
||||
byok8s -w workflow-alpha -p params-red
|
||||
```
|
||||
|
||||
Run the red workflow with gamma params, &c:
|
||||
Run the gamma workflow with red params, &c:
|
||||
|
||||
```
|
||||
byok8s -w workflow-red -p params-gamma
|
||||
byok8s -w workflow-gamma -p params-red
|
||||
```
|
||||
|
||||
(NOTE: May want to let the user specify
|
||||
|
Reference in New Issue
Block a user