-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
71 additions
and
110 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
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 |
---|---|---|
@@ -1,58 +1,20 @@ | ||
ARG PARENT_VERSION=latest | ||
FROM p4lang/pi:${PARENT_VERSION} | ||
LABEL maintainer="P4 Developers <[email protected]>" | ||
FROM debian:bullseye-slim | ||
|
||
ARG CC=gcc | ||
ARG CXX=g++ | ||
ARG GCOV= | ||
ARG sswitch_grpc=yes | ||
|
||
ENV BM_DEPS automake \ | ||
build-essential \ | ||
clang-8 \ | ||
clang-10 \ | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
git \ | ||
lcov \ | ||
libgmp-dev \ | ||
libpcap-dev \ | ||
libboost-dev \ | ||
libboost-program-options-dev \ | ||
libboost-system-dev \ | ||
libboost-filesystem-dev \ | ||
libboost-thread-dev \ | ||
libtool \ | ||
pkg-config \ | ||
ca-certificates | ||
|
||
ENV BM_RUNTIME_DEPS libboost-program-options1.71.0 \ | ||
libboost-system1.71.0 \ | ||
libboost-filesystem1.71.0 \ | ||
libboost-thread1.71.0 \ | ||
libgmp10 \ | ||
libpcap0.8 \ | ||
python3 \ | ||
python-is-python3 | ||
|
||
# Install dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends $BM_DEPS $BM_RUNTIME_DEPS | ||
|
||
# Clone the repository | ||
RUN git clone https://github.com/p4lang/behavioral-model.git /behavioral-model | ||
|
||
# Set working directory | ||
WORKDIR /behavioral-model/ | ||
gnupg2 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ./autogen.sh | ||
RUN echo "Acquire::ForceIPv4 \"true\";" > /etc/apt/apt.conf.d/99force-ipv4 | ||
|
||
RUN ./configure --with-thrift --with-pdfixed --with-pi | ||
RUN echo 'deb http://download.opensuse.org/repositories/home:/p4lang/Debian_11/ /' > /etc/apt/sources.list.d/home:p4lang.list \ | ||
&& curl -fsSL https://download.opensuse.org/repositories/home:p4lang/Debian_11/Release.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/home_p4lang.gpg | ||
|
||
RUN make -j2 | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
p4lang-bmv2 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN make install-strip && ldconfig | ||
ENTRYPOINT ["simple_switch_grpc"] | ||
|
||
RUN apt-get purge $BM_DEPS && \ | ||
apt-get autoremove -y --purge && \ | ||
rm -rf /behavioral-model /var/cache/apt/* /var/lib/apt/lists/* && \ | ||
echo 'Image done' | ||
CMD ["--help"] |
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,13 @@ | ||
sudo kubeadm reset -f | ||
sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --cri-socket=unix:///var/run/crio/crio.sock | ||
|
||
mkdir -p $HOME/.kube | ||
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config | ||
sudo chown $(id -u):$(id -g) $HOME/.kube/config | ||
|
||
kubectl taint nodes --all node-role.kubernetes.io/master- | ||
kubectl taint nodes --all node-role.kubernetes.io/control-plane- | ||
|
||
kubectl apply -f manifests/kube-router-daemonset.yaml | ||
|
||
kubectl get pods --all-namespaces |