Skip to content

Commit

Permalink
fix: fix build issue
Browse files Browse the repository at this point in the history
    Co-authored-by: Dimitrios Markou <[email protected]>
    Co-authored-by: Saikumar Banoth <[email protected]>
    Co-authored-by: Patel Atul <[email protected]>
    Co-authored-by: Vemula Venkatesh <[email protected]>
    Co-authored-by: Jambekar Vishakha <[email protected]>

Signed-off-by: atulpatel261194 <[email protected]>
  • Loading branch information
atulpatel261194 committed Aug 30, 2024
1 parent ec55853 commit 5a711ad
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 1,772 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ ENV CGO_ENABLED=0
# build an app
COPY cmd/ cmd/
COPY pkg/ pkg/
RUN go build -v -o /opi-intel-bridge-storage ./cmd/main_storage.go
RUN go build -v -o /opi-intel-bridge-evpn ./cmd/main_evpn.go

RUN go build -v -o /opi-intel-bridge-storage ./cmd/storage && \
go build -v -o /opi-intel-bridge-evpn ./cmd/evpn
# second stage to reduce image size
FROM alpine:3.19@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48
RUN apk add --no-cache --no-check-certificate hwdata && rm -rf /var/cache/apk/*
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ compile: get build
build: build-evpn build-storage
build-evpn:
@echo " > Building binaries..."
@CGO_ENABLED=0 go build -o ${PROJECTNAME}-evpn ./cmd/main_evpn.go
@CGO_ENABLED=0 go build -o ${PROJECTNAME}-evpn ./cmd/evpn

build-storage:
@echo " > Building binaries..."
@CGO_ENABLED=0 go build -o ${PROJECTNAME}-storage ./cmd/main_storage.go
@CGO_ENABLED=0 go build -o ${PROJECTNAME}-storage ./cmd/storage

get:
@echo " > Checking if there are any missing dependencies..."
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ The following variables are used throughout this document:
To build the solution execute

```bash
go build -v -o /opi-intel-bridge ./cmd/...
go build -v -o /opi-intel-bridge-storage ./cmd/storage
```

To import the bridge within another go package or module use

```go
import "github.com/opiproject/opi-intel-bridge/pkg/frontend"
import "github.com/opiproject/opi-intel-bridge-storage/pkg/frontend"
```

### Usage
Expand All @@ -86,7 +86,7 @@ Make sure `/var/tmp/spdk.sock` is created.
On xPU run

```bash
$ docker run --rm -it -v /var/tmp/:/var/tmp/ -p $BRIDGE_PORT:$BRIDGE_PORT -p $BRIDGE_HTTP_PORT:$BRIDGE_HTTP_PORT ghcr.io/opiproject/opi-intel-bridge:main /opi-intel-bridge -grpc_port=$BRIDGE_PORT -http_port=$BRIDGE_HTTP_PORT
$ docker run --rm -it -v /var/tmp/:/var/tmp/ -p $BRIDGE_PORT:$BRIDGE_PORT -p $BRIDGE_HTTP_PORT:$BRIDGE_HTTP_PORT ghcr.io/opiproject/opi-intel-bridge:main /opi-intel-bridge-storage -grpc_port=$BRIDGE_PORT -http_port=$BRIDGE_HTTP_PORT

2023/09/12 20:29:05 TLS files are not specified. Use insecure connection.
2023/09/12 20:29:05 Connection to SPDK will be via: unix detected from /var/tmp/spdk.sock
Expand Down Expand Up @@ -345,7 +345,7 @@ make sure to follow the principle of least privilege for access permissions and
Run bridge binary specifying TLS-related server key/certificate and CA cert

```bash
./opi-intel-bridge -grpc_port=$BRIDGE_PORT -http_port=$BRIDGE_HTTP_PORT -tls $SERVER_CERT:$SERVER_KEY:$CA_CERT
./opi-intel-bridge-storage -grpc_port=$BRIDGE_PORT -http_port=$BRIDGE_HTTP_PORT -tls $SERVER_CERT:$SERVER_KEY:$CA_CERT
```

for container
Expand Down
1 change: 1 addition & 0 deletions cmd/main_evpn.go → cmd/evpn/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Copyright (C) 2023 Nordix Foundation.

// Package main is the main package of the application
//nolint:all
package main

import (
Expand Down
File renamed without changes.
91 changes: 46 additions & 45 deletions config-intel-e2000.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
grpcport: 50151
httpport: 8082
tlsfiles:
Expand All @@ -6,53 +7,53 @@ dbaddress: 127.0.0.1:6379
buildenv: intel_e2000
tracer: false
subscribers:
- name: "lvm"
priority: 2
events: ["vrf", "bridge-port"]
- name: "lgm"
priority: 1
events: ["vrf", "svi", "logical-bridge"]
- name: "frr"
priority: 3
events: ["vrf", "svi"]
- name: "intel_e2000"
priority: 4
events: ["vrf", "logical-bridge", "bridge-port", "svi"]
- name: "lvm"
priority: 2
events: ["vrf", "bridge-port"]
- name: "lgm"
priority: 1
events: ["vrf", "svi", "logical-bridge"]
- name: "frr"
priority: 3
events: ["vrf", "svi"]
- name: "intel_e2000"
priority: 4
events: ["vrf", "logical-bridge", "bridge-port", "svi"]
grpc:
server_addresses:
- 0.0.0.0
server_port: 51703
num_threads: 10
static_external_macs: []
server_addresses:
- 0.0.0.0
server_port: 51703
num_threads: 10
static_external_macs: []
p4:
enabled: true
representors:
port_mux: "port-mux"
vrf_mux: "vrf-mux"
grpc_acc: "host"
grpc_host: "00:20:00:00:14:48"
phy0_rep: "port0"
phy1_rep: "port1"
config:
p4infofile: /root/p4files/opi_ln.p4info.txt
binfile: /root/p4files/opi_ln.pb.bin
enabled: true
representors:
port_mux: "port-mux"
vrf_mux: "vrf-mux"
grpc_acc: "host"
grpc_host: "00:20:00:00:14:48"
phy0_rep: "port0"
phy1_rep: "port1"
config:
p4infofile: /root/p4files/opi_ln.p4info.txt
binfile: /root/p4files/opi_ln.pb.bin
linuxfrr:
enabled: true
defaultvtep: "vxlan-vtep"
portmux: "enp0s1f0d5"
vrfmux: "enp0s1f0d4"
ipmtu: 2962
enabled: true
defaultvtep: "vxlan-vtep"
portmux: "enp0s1f0d5"
vrfmux: "enp0s1f0d4"
ipmtu: 2962
netlink:
enabled: true
pollinterval: 1
phyports:
- name: "enp0s1f0d1"
vsi: 0
- name: "enp0s1f0d2"
vsi: 1
enabled: true
pollinterval: 1
phyports:
- name: "enp0s1f0d1"
vsi: 0
- name: "enp0s1f0d2"
vsi: 1
loglevel:
db: INFO
grpc: INFO
linux: INFO
netlink: INFO
p4: DEBUG
db: INFO
grpc: INFO
linux: INFO
netlink: INFO
p4: DEBUG
65 changes: 0 additions & 65 deletions pkg/frontend/blk.go

This file was deleted.

126 changes: 0 additions & 126 deletions pkg/frontend/blk_test.go

This file was deleted.

Loading

0 comments on commit 5a711ad

Please sign in to comment.