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
26
examples/docker_instance.py
Normal file
26
examples/docker_instance.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import minerva
|
||||
from minerva.docker import Docker
|
||||
import sys
|
||||
|
||||
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
|
||||
iam = "S3+SSM+CloudWatch+ECR")
|
||||
|
||||
mach = pier.machine(ami = "ami-0b0cd81283738558a", # ubuntu 22.04 x86
|
||||
instance_type = "t3.medium",
|
||||
username = "ubuntu",
|
||||
name = f"minerva-aws-test")
|
||||
|
||||
# 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 = {"hello": "world"},
|
||||
stdout = sys.stdout)
|
||||
|
||||
d.create()
|
||||
d.run("s3 ls")
|
||||
d.terminate()
|
||||
Loading…
Add table
Add a link
Reference in a new issue