Skip to content

Commit

Permalink
Add intel vsp
Browse files Browse the repository at this point in the history
Signed-off-by: Balazs Nemeth <bnemeth@redhat.com>
  • Loading branch information
bn222 committed Nov 16, 2024
1 parent 8a57de3 commit 2d860b3
Show file tree
Hide file tree
Showing 479 changed files with 112,085 additions and 166 deletions.
24 changes: 24 additions & 0 deletions Dockerfile.IntelVSP.rhel
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#/usr/local/lib/python3.9/site-packages/ SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Intel Corporation
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.18 AS builder
ARG TARGETOS
ARG TARGETARCH

COPY . /usr/src/ipu-opi-plugin
WORKDIR /usr/src/ipu-opi-plugin
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o bin/ipuplugin cmd/intelvsp/intelvsp.go

FROM registry.ci.openshift.org/ocp/4.18:base-rhel9

COPY --from=builder /usr/src/ipu-opi-plugin/bin/ipuplugin /usr/bin/
COPY cmd/intelvsp/fxp-net_linux-networking.pkg /
RUN mkdir -p /opt/p4/p4-cp-nws/bin/
COPY cmd/intelvsp/p4rt-ctl /opt/p4/p4-cp-nws/bin/
#TODO: Update to newer package, according to release.
COPY cmd/intelvsp/p4runtime-2023.11.0-py3-none-any.whl /opt/p4/p4-cp-nws/bin/
RUN dnf install -y python3-pip openssh NetworkManager openvswitch iproute
RUN python3 -m pip install --no-cache-dir /opt/p4/p4-cp-nws/bin/p4runtime-2023.11.0-py3-none-any.whl

WORKDIR /
LABEL io.k8s.display-name="IPU OPI Plugin"
ENV PYTHONUNBUFFERED=1
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ REGISTRY ?= $(shell hostname)
DPU_OPERATOR_IMAGE := $(REGISTRY):5000/dpu-operator:dev
DPU_DAEMON_IMAGE := $(REGISTRY):5000/dpu-daemon:dev
MARVELL_VSP_IMAGE := $(REGISTRY):5000/mrvl-vsp:dev
INTEL_VSP_IMAGE := $(REGISTRY):5000/intel-vsp:dev

.PHONY: local-deploy-prep
prep-local-deploy: tools
Expand All @@ -245,6 +246,7 @@ local-build: ## Build all container images necessary to run the whole operator
$(CONTAINER_TOOL) build -v $(GO_CONTAINER_CACHE):/go:z -f Dockerfile.rhel -t $(DPU_OPERATOR_IMAGE)
$(CONTAINER_TOOL) build -v $(GO_CONTAINER_CACHE):/go:z -f Dockerfile.daemon.rhel -t $(DPU_DAEMON_IMAGE)
$(CONTAINER_TOOL) build -v $(GO_CONTAINER_CACHE):/go:z -f Dockerfile.mrvlVSP.rhel -t $(MARVELL_VSP_IMAGE)
$(CONTAINER_TOOL) build -v $(GO_CONTAINER_CACHE):/go:z -f Dockerfile.IntelVSP.rhel -t $(INTEL_VSP_IMAGE)

.PHONY: local-buildx
local-buildx: ## Build all container images necessary to run the whole operator
Expand All @@ -258,18 +260,23 @@ local-buildx: ## Build all container images necessary to run the whole operator
buildah manifest rm $(MARVELL_VSP_IMAGE)-manifest || true
buildah manifest create $(MARVELL_VSP_IMAGE)-manifest
buildah build --authfile /root/config.json --manifest $(MARVELL_VSP_IMAGE)-manifest --platform linux/amd64,linux/arm64 -v $(GO_CONTAINER_CACHE):/go:z -f Dockerfile.mrvlVSP.rhel -t $(MARVELL_VSP_IMAGE)
buildah manifest rm $(INTEL_VSP_IMAGE)-manifest || true
buildah manifest create $(INTEL_VSP_IMAGE)-manifest
buildah build --authfile /root/config.json --manifest $(INTEL_VSP_IMAGE)-manifest --platform linux/amd64,linux/arm64 -v $(GO_CONTAINER_CACHE):/go:z -f Dockerfile.IntelVSP.rhel -t $(INTEL_VSP_IMAGE)

.PHONY: local-pushx
local-pushx: ## Push all container images necessary to run the whole operator
buildah manifest push --all $(DPU_OPERATOR_IMAGE)-manifest docker://$(DPU_OPERATOR_IMAGE)
buildah manifest push --all $(DPU_DAEMON_IMAGE)-manifest docker://$(DPU_DAEMON_IMAGE)
buildah manifest push --all $(MARVELL_VSP_IMAGE)-manifest docker://$(MARVELL_VSP_IMAGE)
buildah manifest push --all $(INTEL_VSP_IMAGE)-manifest docker://$(INTEL_VSP_IMAGE)

.PHONY: local-push
local-push: ## Push all container images necessary to run the whole operator
$(CONTAINER_TOOL) push $(DPU_OPERATOR_IMAGE)
$(CONTAINER_TOOL) push $(DPU_DAEMON_IMAGE)
$(CONTAINER_TOOL) push $(MARVELL_VSP_IMAGE)
$(CONTAINER_TOOL) push $(INTEL_VSP_IMAGE)
# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
Expand Down
Binary file added cmd/intelvsp/fxp-net_linux-networking.pkg
Binary file not shown.
9 changes: 9 additions & 0 deletions cmd/intelvsp/intelvsp.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package intelvsp

import (
"github.com/bn222/ipu-opi-plugins/ipu-plugin/ipuplugin/cmd"
)

func main() {
cmd.Execute()
}
Loading

0 comments on commit 2d860b3

Please sign in to comment.