[FEA]: Instructions to compile this without docker infra
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 12
- Forks
- 6
- Avg merge
- 1h 39m
- Merged PRs (30d)
- 3
Description
Is this a new feature, an improvement, or a change to existing functionality?
New Feature
How would you describe the priority of this feature request
Medium
Please provide a clear description of problem this feature solves
Based upon my reading of the build scripts inside the infra repo, they are heavily dependent upon docker based deployment. Our requirement is to build nvmesh-utils rpm, and we need:
- Build infra files in infra repo
- Copy them to rpm directory during rpm build triggered by nvmesh-management
- Build the RPM.
There is no involvement of docker in our build system while making rpm but infra build script as far as I could understand require docker envrionment for building infra. Currently as a workaround we are using the following type of shell script to compile infra from our fork of your nvmesh-management repo:
From nvmesh-management build script:
`INFRA_REPO="../nvmesh-infra"
if [ ! -d "$INFRA_REPO" ]; then
echo "Error: nvmesh-infra repo not found at $(cd .. && pwd)/nvmesh-infra"
echo "Clone it as a sister repo before building utils RPM."
exit 1
fi
export PATH="$HOME/.local/bin:/usr/local/bin:$PATH"
INFRA_WORKDIR=$(mktemp -d)
trap "rm -rf $INFRA_WORKDIR" EXIT
echo "Building infra CLI binary..."
( cd "$INFRA_REPO"
&& INFRA_DESCRIBE=$(git describe 2>/dev/null || echo "unknown")
&& sed -i "s#^(src_version:).*#\1 "${INFRA_DESCRIBE}"#" xlro/core/config/infra_config.yaml
&& echo "Stamping infra version: ${INFRA_DESCRIBE}"
&& poetry env use python${PYTHON_MAJOR_MINOR:-3.10}
&& poetry install --sync --no-interaction --no-root
&& export PYTHONDONTWRITEBYTECODE=1
&& rm -rf dist
&& poetry run pyinstaller netinfo.spec --log-level WARN --clean --workpath="$INFRA_WORKDIR" -y
) || { echo "Error: infra build failed"; exit 1; }
mkdir -p infrastructure/dist
# Copy the infra binaries we just built to destination folder for rpm packaging
cp -r "$INFRA_REPO"/dist/* infrastructure/dist/`
Longer term, we would like a simple script inside infra/ repo which we can call to compile all the files in $INFRA_REPO/dist/* without all the docker environment dependencies.
Feature Description
- As a developer trying to package infra/ files in nvmesh-utils rpm, I would like to be able to call a simple script or build command in infra/ repo to build all the files in $INFRA_REPO/dist/* folder.
- Once above functionality is there, we can remove extra code we added in our fork of nvmesh-management to compile infra. We can simply call the infra/ build script to make $INFRA_REPO/dist/* folder. Our build script can simply cp $INFRA_REPO/dist/* to rpm folder while packaging the rpm.
- RIght now since infra build is docker based and we are not using docker but just compiling rpms, we are having to duplicate infra build commands in nvmesh-management to compile infra dependency files.
Describe your ideal solution
- Call a build script in infra/ from normal linux shelll to compile the files in infra/dist/*.
Describe any alternatives you have considered
- For now we have a shell script in our nvmesh-management repo which builds infra for us.
- During code-review, its been stated to me that its not a great idea to duplicate build scripts from infra/ repo in our nvmesh-management code. If upstream can provide a way without docker dependency to compile infra/ binaries - that would avoid us the trouble of maintaining multiple build systems in the future.
Additional context
No response
Code of Conduct
- I agree to follow NVMesh's Code of Conduct
- I have searched the open feature requests and have found no duplicates for this feature request
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the infra repository's Docker-dependent build scripts and the nvmesh-management build script shown in the issue, including netinfo.spec and the Poetry commands. Determine the existing inputs and outputs for infra/dist and how the RPM build consumes them. Done means a normal Linux shell command in infra builds all required files in infra/dist without Docker.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python, shell
- Domain
- build-system, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100