Skip to content

Commit

Permalink
feat: add script to extract client binary from docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Oct 17, 2023
1 parent 6cbe216 commit 635e4ec
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/extract_agent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2022 Dell Inc, or its subsidiaries.

set -euxo pipefail

# docker compose plugin
command -v docker-compose || { shopt -s expand_aliases && alias docker-compose='docker compose'; }

# let everything start
sleep 5

# print for debug
docker-compose ps

# run image and copy binary
docker run --rm -it --platform=linux/arm64 -v /tmp:/tmp ghcr.io/opiproject/opi-sztp-client:main cp /opi-sztp-agent /tmp/

# test file architecture is indeed ARM
file /tmp/opi-sztp-agent

# you can scp it into DPU now...
echo ==================================
echo You can now SCP pem files to the real DPU
echo sshpass -p dpupass ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=3 /tmp/opi-sztp-agent dpuser@[dpu-ip]:~
echo ==================================

echo "DONE"
File renamed without changes.

0 comments on commit 635e4ec

Please sign in to comment.