Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bdx fixes #33

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions democluster/democluster.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ locals {

variable "ubuntu_series" {
type = string
default = "jammy"
default = "noble"
description = "The codename of the Ubuntu series to build."
}

Expand Down Expand Up @@ -69,8 +69,8 @@ source "qemu" "stage0" {
["-cpu", "${lookup(local.qemu_cpu, var.architecture, "")}"],
["-serial", "stdio"],
["-device", "virtio-gpu-pci"],
["-drive", "if=pflash,format=raw,id=ovmf_code,readonly=on,file=/usr/share/${lookup(local.uefi_imp, var.architecture, "")}/${lookup(local.uefi_imp, var.architecture, "")}_CODE.fd"],
["-drive", "if=pflash,format=raw,id=ovmf_vars,file=${lookup(local.uefi_imp, var.architecture, "")}_VARS.fd"],
["-drive", "if=pflash,format=raw,id=ovmf_code,readonly=on,file=/usr/share/OVMF/OVMF_CODE_4M.fd"],
["-drive", "if=pflash,format=raw,id=ovmf_vars,file=/usr/share/OVMF/OVMF_VARS_4M.fd"],
["-drive", "file=seeds-cloudimg.iso,format=raw"],
["-drive", "file=output-stage0/packer-stage0,format=qcow2"]
]
Expand All @@ -86,7 +86,7 @@ build {

provisioner "shell-local" {
inline = [
"cp /usr/share/${lookup(local.uefi_imp, var.architecture, "")}/${lookup(local.uefi_imp, var.architecture, "")}_VARS.fd ${lookup(local.uefi_imp, var.architecture, "")}_VARS.fd",
"cp /usr/share/OVMF/OVMF_VARS_4M.fd OVMF_VARS_4M.fd",
"cloud-localds seeds-cloudimg.iso user-data meta-data"
]
inline_shebang = "/bin/bash -e"
Expand Down
23 changes: 19 additions & 4 deletions democluster/helpers/deploy_local_democluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

CLIENT_ID=$1
CLIENT_SECRET=$2
BASE_API_URL="https://apis.vantagecompute.ai"
OIDC_DOMAIN="auth.vantagecompute.ai/realms/vantage"

cat <<EOF > /tmp/cloud-init.yaml
#cloud-config
Expand Down Expand Up @@ -30,20 +32,33 @@ runcmd:
sed -i "s|@CLIENT_ID@|$CLIENT_ID|g" /srv/jobbergate-agent-venv/.env
sed -i "s|@CLIENT_SECRET@|$CLIENT_SECRET|g" /srv/jobbergate-agent-venv/.env
- |
- systemctl start slurmrestd
- systemctl restart slurmdbd
- systemctl restart slurmd
- sleep 30
- systemctl restart slurmctld
- systemctl restart slurmd
- scontrol update NodeName=\$(hostname) State=RESUME
- systemctl start jobbergate-agent

- snap set vantage-agent base-api-url=$BASE_API_URL
- snap set vantage-agent oidc-client-id=$CLIENT_ID
- snap set vantage-agent oidc-client-secret=$CLIENT_SECRET
- snap set vantage-agent oidc-domain=$OIDC_DOMAIN
- snap set vantage-agent task-jobs-interval-seconds=30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matches default. Don't need this line.

- snap set jobbergate-agent base-api-url=$BASE_API_URL
- snap set jobbergate-agent oidc-client-id=$CLIENT_ID
- snap set jobbergate-agent oidc-client-secret=$CLIENT_SECRET
- snap set jobbergate-agent oidc-domain=$OIDC_DOMAIN
- snap set jobbergate-agent task-jobs-interval-seconds=30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matches default. Don't need this line.

- snap set jobbergate-agent x-slurm-user-name=ubuntu
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matches default. Don't need this line.

- snap set jobbergate-agent influx-dsn=influxdb://slurm:rats@localhost:8086/slurm-job-metrics
- snap start vantage-agent.start --enable
- snap start jobbergate-agent.start --enable
EOF

mkdir -p $HOME/democluster

cat /tmp/cloud-init.yaml | multipass launch -c$(nproc) \
-m4GB \
--mount $HOME/democluster:/home/ubuntu/democluster \
--mount $HOME/democluster:/nfs/mnt \
-ndemocluster \
file://`pwd`/democluster.img \
--cloud-init -
Expand Down
Loading
Loading