forked from bellwether/minerva
added examples
This commit is contained in:
parent
ffdd27e506
commit
f4dd130266
5 changed files with 102 additions and 0 deletions
29
examples/launch_instances.py
Normal file
29
examples/launch_instances.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
from minerva.pier import Pier
|
||||
from minerva.docker import Docker
|
||||
import sys
|
||||
|
||||
profile = "hay"
|
||||
pier = Pier(profile,
|
||||
subnet_id = "subnet-05eb26d8649a093e1", # project-subnet-public1-us-east-1a
|
||||
sg_groups = ["sg-0f9e555954e863954", # ssh
|
||||
"sg-0b34a3f7398076545"], # default
|
||||
iam = "S3+SSM+CloudWatch+ECR")
|
||||
|
||||
num = 0
|
||||
mach = pier.machine(ami = "ami-0b0cd81283738558a", # ubuntu 22.04 x86
|
||||
instance_type = "t3.medium",
|
||||
username = "ubuntu",
|
||||
name = f"minerva-{num}",
|
||||
variables = {"num": num})
|
||||
|
||||
# Running the machine in the HAYSTAC PMO account
|
||||
# Pulling a container from the HAYSTAC T&E account
|
||||
d = Docker(machine = mach,
|
||||
#container = "436820952613.dkr.ecr.us-east-1.amazonaws.com/test:latest",
|
||||
container = "amazon/aws-cli:latest",
|
||||
variables = {"num": num},
|
||||
stdout = sys.stdout)
|
||||
|
||||
d.create()
|
||||
d.run()
|
||||
#d.terminate()
|
||||
Loading…
Add table
Add a link
Reference in a new issue