Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added spot bid price as an option #270

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dataduct/pipeline/ec2_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
ETL_AMI = config.ec2.get('ETL_AMI', const.NONE)
SECURITY_GROUP = config.ec2.get('SECURITY_GROUP', const.NONE)
SECURITY_GROUP_ID = config.ec2.get('SECURITY_GROUP_ID', const.NONE)
SPOT_BID_PRICE = config.ec2.get('SPOT_BID_PRICE', const.NONE)
SUBNET_ID = config.ec2.get('SUBNET_ID', const.NONE)
KEY_PAIR = config.etl.get('KEY_PAIR', const.NONE)
RETRY_DELAY = config.etl.get('RETRY_DELAY', const.DEFAULT_DELAY)
Expand All @@ -35,6 +36,7 @@ def __init__(self,
ami=ETL_AMI,
security_group=SECURITY_GROUP,
security_group_id=SECURITY_GROUP_ID,
spot_bid_price=SPOT_BID_PRICE,
subnet_id=SUBNET_ID,
**kwargs):
"""Constructor for the Ec2Resource class
Expand All @@ -47,6 +49,7 @@ def __init__(self,
instance_type(str): machine type to be used eg. m1.large
ami(str): ami id for the ec2 resource
retry_delay(str): time delay between step retries
spot_bid_price(str): max spot bid price for resource e.g 0.04
**kwargs(optional): Keyword arguments directly passed to base class
"""

Expand All @@ -72,5 +75,6 @@ def __init__(self,
retryDelay=RETRY_DELAY,
securityGroups=security_group,
securityGroupIds=security_group_id,
spotBidPrice=spot_bid_price,
subnetId=subnet_id
)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ boto>=2.34.0
Sphinx>=1.2.3
sphinx-rtd-theme>=0.1.6
pandas>=0.14.1
psycopg2==2.6.0
psycopg2==2.7.1
MySQL-python
PyYAML
coverage
Expand Down