Skip to content

Commit

Permalink
better setup
Browse files Browse the repository at this point in the history
  • Loading branch information
DanG100 committed Mar 14, 2023
1 parent ded7dd5 commit 54a8d41
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 61 deletions.
14 changes: 14 additions & 0 deletions cloudbuild/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM gcr.io/cloud-builders/docker
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
RUN apt-get update && apt-get install google-cloud-cli
RUN gcloud source repos clone kne-internal --project=gep-kne
RUN gcloud source repos clone keysight --project=gep-kne
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/v1.26.2/bin/linux/amd64/kubectl > /usr/local/bin/kubectl
RUN curl -Lo go.tar.gz https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go.tar.gz
ENV PATH $PATH:/usr/local/go/bin
ENV PATH $PATH:/root/go
RUN go install sigs.k8s.io/[email protected]
RUN git clone https://github.com/openconfig/kne.git
RUN cd kne && go install ./kne_cli && cp ~/go/bin/kne_cli ~/go/bin/kne
5 changes: 5 additions & 0 deletions cloudbuild/kne.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
steps:
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build','--network=cloudbuild', '-t', 'gcr.io/openconfig-lemming/kne-kind', '-f', 'cloudbuild/Dockerfile', './cloudbuild' ]
images:
- 'gcr.io/openconfig-lemming/kne-kind'
4 changes: 2 additions & 2 deletions cloudbuild/presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ set -xeE
printf "\n apiServerPort: 6443" >> /kne-internal/kind/kind-no-cni.yaml
sed -i "s/name: kne/name: kne\n recycle: true/g" /kne-internal/deploy/kne/kind-bridge.yaml

kne deploy /kne-internal/deploy/kne/kind-bridge.yaml || true
kne deploy ~/kne-internal/deploy/kne/kind-bridge.yaml || true
mkdir -p ~/.kube
kind get kubeconfig --internal --name kne > ~/.kube/config
docker network connect kind "$(cat /etc/hostname)"

kne deploy /kne-internal/deploy/kne/kind-bridge.yaml
kne deploy ~/kne-internal/deploy/kne/kind-bridge.yaml
make itest
24 changes: 0 additions & 24 deletions kne/deploy.sh

This file was deleted.

35 changes: 0 additions & 35 deletions kne/setup.sh

This file was deleted.

0 comments on commit 54a8d41

Please sign in to comment.