Skip to content

msimonin/deploy5k

Repository files navigation

image

from deploy5k.api import Resources
import json
import logging
logging.basicConfig(level=logging.DEBUG)

resources = {
    "machines": [{
        "role": "compute",
        "nodes": 1,
        "cluster": "parasilo",
        "primary_network": "n1",
        "secondary_networks": ["n2"]
    }, {
        "role": "control",
        "nodes": 1,
        "cluster": "parasilo",
        "primary_network": "1",
        "secondary_networks": ["n2"]
    }],
    "networks": [{"type": "prod", "id": "n1","role": "network_1", "site": "rennes"},
        {"type": "kavlan", "id": "n2", "roles": ["network_2", "network_3"],  "site": "rennes"}]
}

r = Resources(resources)
options = {
  "job_name": "test",
  "walltime": "01:00:00",
#  "force_deploy": True
}
# This
r.reserve(**options)
r.deploy(**options)
print(r.c_resources)
r.configure_network(**options)
# Or this
# r.launch(**options)

print(r.get_roles())
print(r.get_networks())

About

Util functions to deploy compute and networks on Grid'5000

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages