-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Dockerfile for orb-agent * configuration updates for env variable config * CI for orb-agent
- Loading branch information
Showing
9 changed files
with
157 additions
and
85 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
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
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,46 @@ | ||
ARG PKTVISOR_TAG=develop | ||
FROM debian:bullseye-slim AS builder | ||
|
||
ENV BUILD_DEPS "g++ cmake make git pkgconf jq python3-pip python3-setuptools ca-certificates golang" | ||
|
||
RUN \ | ||
apt-get update && \ | ||
apt-get upgrade --yes --force-yes && \ | ||
apt-get install --yes --force-yes --no-install-recommends ${BUILD_DEPS} && \ | ||
pip3 install conan | ||
|
||
WORKDIR / | ||
RUN \ | ||
git clone https://github.com/ns1labs/pktvisor.git /pktvisor-src && \ | ||
cd /pktvisor-src && git checkout ${PKTVISOR_TAG} | ||
|
||
WORKDIR /tmp/build | ||
RUN \ | ||
conan profile new --detect default && \ | ||
conan profile update settings.compiler.libcxx=libstdc++11 default && \ | ||
conan config set general.revisions_enabled=1 | ||
|
||
RUN \ | ||
PKG_CONFIG_PATH=/local/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=Release /pktvisor-src && \ | ||
make all test -j 4 | ||
|
||
WORKDIR /go/src/github.com/ns1labs/orb | ||
COPY . . | ||
|
||
RUN CGO_ENABLED=1 make agent_bin && mv build/orb-agent /tmp/build/orb-agent | ||
|
||
FROM debian:bullseye-slim AS runtime | ||
|
||
ENV RUNTIME_DEPS "curl ca-certificates" | ||
|
||
RUN \ | ||
apt-get update && \ | ||
apt-get upgrade --yes --force-yes && \ | ||
apt-get install --yes --force-yes --no-install-recommends ${RUNTIME_DEPS} && \ | ||
rm -rf /var/lib/apt | ||
|
||
COPY --from=builder /tmp/build/bin/pktvisord /usr/local/sbin/pktvisord | ||
COPY --from=builder /tmp/build/orb-agent /usr/local/bin/orb-agent | ||
COPY --from=builder /go/src/github.com/ns1labs/orb/agent/docker/agent.yaml /etc/orb/agent.yaml | ||
|
||
ENTRYPOINT [ "/usr/local/bin/orb-agent" ] |
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,10 @@ | ||
version: "1.0" | ||
|
||
visor: | ||
taps: | ||
|
||
orb: | ||
backends: | ||
pktvisor: | ||
binary: "/usr/local/sbin/pktvisord" | ||
config_file: "/etc/orb/agent.yaml" |
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,28 +1,33 @@ | ||
version: "1.0" | ||
|
||
pktvisor: | ||
binary: "/bin/pktvisord" | ||
visor: | ||
taps: | ||
anycast: | ||
type: pcap | ||
mydefault: | ||
input_type: pcap | ||
config: | ||
iface: eth0 | ||
sinks: | ||
iface: "eth0" | ||
|
||
orb: | ||
vitals: | ||
backends: | ||
pktvisor: | ||
binary: "/usr/local/sbin/pktvisord" | ||
config_file: "/etc/orb/agent.yaml" | ||
tags: | ||
region: EU | ||
pop: ams02 | ||
node_type: dns | ||
mqtt: | ||
# MQTT address | ||
address: tls://127.0.0.1:8883 | ||
# agent id | ||
id: "e342be9c-e70e-45e0-a1b1-31fe6e5954e1" | ||
# agent key | ||
key: "2b5f5f6f-dab8-4239-915e-77262b7b2da2" | ||
# agent RPC channel ID | ||
channel_id: "35a416a4-dc5f-4dca-b319-a6f1cc87bca7" | ||
cloud: | ||
config: | ||
#agent_name: auto-provisioned | ||
auto_provision: true | ||
api: | ||
address: https://api.orb.live | ||
token: TOKEN | ||
mqtt: | ||
address: tls://127.0.0.1:8883 | ||
# id: "f420a133-7651-412d-852a-6141fafeaea5" | ||
# key: "14ae65ae-092f-4fdc-be6a-0cfb378119dc" | ||
# channel_id: "9610b0a4-b05f-46e5-a32d-000d8a2ec1fd" | ||
# optional TLS config | ||
tls: | ||
verify: false | ||
verify: true |
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