-
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.
[feat] add agent full (#2315)
- Loading branch information
Showing
3 changed files
with
128 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
ARG PKTVISOR_TAG=develop | ||
ARG DIODE_TAG=develop | ||
ARG ORB_TAG=develop | ||
FROM orbcommunity/orb-agent:${ORB_TAG} AS orb | ||
|
||
FROM orbcommunity/diode-agent:${DIODE_TAG} AS diode | ||
RUN SQPATH=$(pip show suzieq | sed -n 's/Location: \(.*\)/\1/p') \ | ||
&& cp -rf "$SQPATH/suzieq" "/tmp/suzieq-patched" | ||
|
||
FROM orbcommunity/pktvisor:${PKTVISOR_TAG} | ||
# adding orb-agent | ||
RUN mkdir /opt/orb | ||
COPY --from=orb /usr/local/bin/orb-agent /usr/local/bin/orb-agent | ||
COPY --from=orb /opt/orb/agent_default.yaml /opt/orb/agent_default.yaml | ||
COPY --from=orb /usr/local/bin/orb-agent-entry.sh /usr/local/bin/orb-agent-entry.sh | ||
COPY --from=orb /run-agent.sh /run-agent.sh | ||
|
||
# adding diode-agent | ||
COPY --from=diode /usr/local/bin/diode-agent /usr/local/bin/diode-agent | ||
|
||
# adding suzieq | ||
RUN apt-get update && apt-get install -y python3 python3-pip | ||
RUN python3 -m pip install --upgrade pip && pip install suzieq==0.20.1 | ||
|
||
# adding suzieq patched | ||
COPY --from=diode /root/.suzieq /root/.suzieq | ||
COPY --from=diode /tmp/suzieq-patched /tmp/suzieq-patched | ||
RUN SQPATH=$(pip show suzieq | sed -n 's/Location: \(.*\)/\1/p') \ | ||
&& cp -rf /tmp/suzieq-patched/* "$SQPATH/suzieq/" \ | ||
&& rm -rf /tmp/suzieq-patched | ||
|
||
RUN chmod a+x /run-agent.sh | ||
|
||
ENTRYPOINT [ "/usr/local/bin/orb-agent-entry.sh" ] |