-
Notifications
You must be signed in to change notification settings - Fork 91
TMP: How to Update Knative for vHive
To be incorporated into the docs
folder
This wiki page describes how to make changes to Knative Serving and use the changed version of Knative in vHive.
-
Install Knative requirements:
- Install
ko
:wget -qO- https://github.com/google/ko/releases/download/v0.8.3/ko_0.8.3_Linux_x86_64.tar.gz | sudo tar -C /usr/bin/ -xz ko sudo chmod +x /usr/bin/ko
- Install
go
(1.14 or later); already installed on CloudLab. - Install
git
; already installed on CloudLab.
- Install
-
Login to Docker Hub account that the Knative images will be pushed to.
ko login index.docker.io -u <DOCKERHUB USERNAME> -p <DOCKERHUB PASSWORD>
-
Set up your environment for building:
cat << EOF >> ~/.bashrc export GOROOT=$(go env GOROOT) export GOPATH="$HOME/go" export PATH="${PATH}:${GOPATH}/bin" export KO_DOCKER_REPO='docker.io/<DOCKERHUB USERNAME>' EOF
-
<DOCKER HUB USERNAME>
must be the same username that you used to login in the previous step.
-
-
Git clone your fork.
git clone https://github.com/ease-lab/serving cd serving
-
Add knative/serving as an upstream and pull the version branch.
git remote add upstream https://github.com/knative/serving.git git pull upstream <FEATURE BRANCH>:<NEW LOCAL BRANCH> git checkout <NEW LOCAL BRANCH>
-
We maintain our serving branch as a pull request here. Take this as reference and make changes accordingly.
-
Generate new Knative YAMLs (by building the relevant Docker images and uploading them to Docker Hub too):
./hack/generate-yamls.sh . new-yamls.txt
-
Copy the generated Knative YAMLs to a well-known location:
mkdir -p ~/new-yamls cp $(cat new-yamls.txt) ~/new-yamls
-
Copy the generated Knative YAMLs to your local machine if you have used a remote server---execute the following on your local machine:
# Say, you are at the root of ease-lab/vhive repository... rsync -zr <HOSTNAME>:new-yamls/ configs/knative_yamls/ --progress=info2
-
Update the
vhive/configs/knative_yamls
with newly generated yamls. -
Commit and push/merge your changes to/at both repos!