Skip to content
Snippets Groups Projects
Commit 5e020e88 authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

k2 not k1 and ubuntu fixes

Former-commit-id: 81dc6d67
parent cdcc3dc6
No related branches found
No related tags found
No related merge requests found
......@@ -69,12 +69,12 @@ resources:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'sql0' ]]
availability_zone: { get_param: avz }
flavor: m3.xsmall
image: { get_param: centos_7_image_id }
image: { get_param: ubuntu_1804_image_id }
key_name: { get_param: ssh_key }
security_groups: [ { get_param: SSHMonashSecGroupID }, { get_param: SlurmSecGroupID }, { get_param: MySQLSecGroupID }, { get_param: NFSSecGroupID } ]
metadata:
ansible_host_groups: [ SQLNodes, NFSNodes ]
ansible_ssh_user: ec2-user
ansible_ssh_user: ubuntu
project_name: { get_param: project_name }
networks:
- network: { get_param: NetID }
......@@ -267,7 +267,7 @@ resources:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'gpudesktopu%index%' ]]
security_groups: [ default, { get_param: SSHMonashSecGroupID }, { get_param: SlurmSecGroupID }, { get_param: NFSSecGroupID } ]
metadata:
ansible_host_groups: [ DesktopNodes, GPU, ComputeNodes, K1Nodes, VisNodes ]
ansible_host_groups: [ DesktopNodes, GPU, ComputeNodes, VisNodes ]
ansible_ssh_user: ubuntu
project_name: { get_param: project_name }
networks:
......
......@@ -10,13 +10,16 @@ resources:
name: "heatslurmsecgroup"
rules: [ { protocol: tcp,
port_range_min: 12000,
port_range_max: 12999},
port_range_max: 12999,
remote_mode: "remote_group_id"},
{ protocol: tcp,
port_range_min: 6817,
port_range_max: 6819},
port_range_max: 6819,
remote_mode: "remote_group_id"},
{ protocol: tcp,
port_range_min: 1019,
port_range_max: 1019}]
port_range_max: 1019,
remote_mode: "remote_group_id"}]
NFSSecGroup:
type: "OS::Neutron::SecurityGroup"
properties:
......
......@@ -96,7 +96,7 @@
- hosts: 'VisNodes'
roles:
- { role: systemd-nvidia-uvm, tags: [ uvm ] }
- { role: systemd-nvidia-uvm, tags: [ uvm,SiteSpecific ] }
- hosts: 'VisNodes'
roles:
......
......@@ -11,14 +11,18 @@ from subprocess import call
import re
import json
def grab_card_ids():
# This method runs nvidia-smi to grab the card ids, then returns a list
if not os.path.isfile("/bin/nvidia-smi"):
def getNvidia_smi_path():
if os.path.isfile("/bin/nvidia-smi"):
return "/bin/nvidia-smi"
elif os.path.isfile("/usr/bin/nvidia-smi"):
return "/usr/bin/nvidia-smi"
else:
print("nvidia-smi binary not found!")
exit(1)
exit(1)
cmd = ["/bin/nvidia-smi", "--query-gpu=pci.bus_id","--format=csv,noheader"]
def grab_card_ids():
# This method runs nvidia-smi to grab the card ids, then returns a list
cmd = [getNvidia_smi_path(), "--query-gpu=pci.bus_id","--format=csv,noheader"]
p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
cards = []
......@@ -27,15 +31,11 @@ def grab_card_ids():
line = line.rstrip().split(":")[2]
pcibus_num = int(re.sub('[.:]', '', line).rstrip("0"),16)
card = "PCI:0:{}:0".format(str(pcibus_num))
cards.append(card)
cards.append(card)
return cards
def grab_card_boardname():
if not os.path.isfile("/bin/nvidia-smi"):
print("nvidia-smi binary not found!")
exit(1)
cmd = ["/bin/nvidia-smi", "--query-gpu=name","--format=csv,noheader"]
cmd = [getNvidia_smi_path(), "--query-gpu=name","--format=csv,noheader"]
cards = []
p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
for line in p.stdout.readlines():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment