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())
Util functions to deploy compute and networks on Grid'5000
License
msimonin/deploy5k
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Util functions to deploy compute and networks on Grid'5000
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published