Skip to content

Commit

Permalink
Trying to fix jobbergate install command
Browse files Browse the repository at this point in the history
  • Loading branch information
dusktreader committed May 3, 2024
1 parent 7c54f1b commit b3cb953
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build-and-publish-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ on:
branches:
- main
workflow_dispatch:
inputs:
jobbergate_version:
description: The Jobbergate agent version
required: false
type: string
default: 4.3.1

jobs:
build-image-in-lxd:
Expand All @@ -26,8 +20,6 @@ jobs:
poetry install
- name: Build democluster
env:
JG_VERSION: ${{ github.event.inputs.jobbergate_version }}
run: |
poetry run image-factory build democluster
Expand Down
3 changes: 0 additions & 3 deletions democluster/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ check-deps: ## Check deps needed to build the image

.PHONY: init
init: ## Run packer init .
@if [ ! -z "$JG_VERSION" ]; then\
sed -i "s/jobbergate-agent==[0-9]\+\.[0-9]\+\.[0-9]\+/jobbergate-agent==${JG_VERSION}/" user-data;\
fi
${PACKER} init .

.PHONY: stage0
Expand Down
2 changes: 1 addition & 1 deletion democluster/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ runcmd:
# create jobbergate agent venv
- /usr/bin/python3 -m venv /srv/jobbergate-agent-venv
- /srv/jobbergate-agent-venv/bin/pip install -U pip
- /srv/jobbergate-agent-venv/bin/pip install jobbergate-agent==
- /srv/jobbergate-agent-venv/bin/pip install jobbergate-agent
- |
cat <<EOF > /srv/jobbergate-agent-venv/.env
JOBBERGATE_AGENT_X_SLURM_USER_NAME=root
Expand Down
6 changes: 1 addition & 5 deletions image_factory/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,12 @@ def democluster(
typer.Exit(124)

print("Kicking off packer build in LXD container.")
kwargs = dict(
lxc.exec(
command=["make", stage.value],
cwd="/srv/image-factory/democluster",
instance_name=instance_name,
project=ctx.obj.project_name,
)
if jg_version := os.getenv("JG_VERSION"):
print(f"Passing along env var JG_VERSION={jg_version}")
kwargs["env"] = dict(JG_VERSION=jg_version)
lxc.exec(**kwargs)

print("[bold green]Build complete, destroying LXD container.[/bold green]")
lxc.delete(instance_name=instance_name, project=ctx.obj.project_name, force=True)

0 comments on commit b3cb953

Please sign in to comment.