Skip to content

TMP: How to Update Knative for vHive

shyamjesal edited this page Jan 31, 2023 · 6 revisions

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.

Get Knative

  1. Install Knative requirements:
    1. 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 
    2. Install go (1.14 or later); already installed on CloudLab.
    3. Install git; already installed on CloudLab.
  2. Login to Docker Hub account that the Knative images will be pushed to.
    ko login index.docker.io -u <DOCKERHUB USERNAME> -p <DOCKERHUB PASSWORD>
  3. 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.
  4. Git clone your fork. We maintain our serving branch as a pull request here:
    git clone --branch=<FEATURE BRANCH> https://github.com/ease-lab/serving
    cd serving
  5. Generate new Knative YAMLs (by building the relevant Docker images and uploading them to Docker Hub too):
    ./hack/generate-yamls.sh . new-yamls.txt
  6. Copy the generated Knative YAMLs to a well-known location:
    mkdir -p ~/new-yamls
    cp $(cat new-yamls.txt) ~/new-yamls
  7. 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
  8. Commit and push/merge your changes to/at both repos!
Clone this wiki locally