forked from bellwether/minerva
significant improvement to the readme and verification that all the examples work
This commit is contained in:
parent
e3c11fb1aa
commit
5dccce53e9
9 changed files with 275 additions and 109 deletions
|
|
@ -1,23 +1,31 @@
|
|||
import minerva
|
||||
|
||||
def worker(pier, n=0):
|
||||
mach = pier.machine(ami = "ami-05a242924e713f80a", # dask on ubuntu 22.04 x86
|
||||
instance_type = "t3.medium",
|
||||
username = "ubuntu",
|
||||
name = f"test-{n}",
|
||||
variables = {"type": "worker",
|
||||
"number": n})
|
||||
return mach
|
||||
|
||||
m = minerva.Minerva("hay")
|
||||
pier = m.pier(subnet_id = "subnet-05eb26d8649a093e1", # project-subnet-public1-us-east-1a
|
||||
sg_groups = ["sg-0f9e555954e863954", # ssh
|
||||
"sg-0b34a3f7398076545"] # default
|
||||
"sg-0b34a3f7398076545"], # default
|
||||
iam = "S3+SSM+CloudWatch+ECR",
|
||||
key_pair = ("Ari-Brown-HAY", "~/.ssh/Ari-Brown-HAY.pem"))
|
||||
|
||||
|
||||
def worker(pier, n=0):
|
||||
mach = pier.machine(ami = "ami-0399a4f70ca684620", # dask on ubuntu 22.04 x86
|
||||
instance_type = "t3.medium",
|
||||
username = "ubuntu",
|
||||
name = f"test-{n}",
|
||||
disk_size = 32,
|
||||
variables = {"type": "worker",
|
||||
"number": n})
|
||||
return mach
|
||||
|
||||
mach = worker(pier)
|
||||
|
||||
mach.create()
|
||||
mach.login()
|
||||
print("*******")
|
||||
print(repr(mach.cmd("echo 'hello world'").stdout))
|
||||
print("*******")
|
||||
print(mach.cmd("echo 'I am machine $number of type $type'"))
|
||||
print("*******")
|
||||
mach.terminate()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue