EC2 - spot instance How To

ChristianVirtual

[H]ard DCOTM x3
Joined
Feb 23, 2013
Messages
2,561
Try to quickly compile what is needed for a spot instance

1) SELF DISCIPLINE IN TERMS OF COST CONTROL ... it can get pretty quick expensive is uncontrolled !!!

2) Amazon account for AWS

3) Login into the console: http://console.aws.amazon.com/

4) Choose EC2
Screen Shot 2018-05-07 at 23.09.30.png


5) Define SSH key pair (on your own or from the console) ; cant't snapshot due to my keys shown
Suggest to use the SSH key for password less connection via ssh -i

6) Define security group (basically allow ports and IP)

Screen Shot 2018-05-07 at 23.11.00.png
I have four group ; you might need one (e.g. BOINC-style)

here I allow port 22 for SSH, 31416 for BOINC client, 3389 I forgot and 36330 for F@H (yes, I sometimes use EC2 for them too); in the source field I have my fixed IP address nnn.nnn.nnn.nnn/32 to keep you guys away from my instance

Screen Shot 2018-05-07 at 23.11.35.png
 
Choose a spot instance


Screen Shot 2018-05-07 at 23.17.55.png


and check the "Price History"
Screen Shot 2018-05-07 at 23.18.46.png

Mainly go with the "compute optimized" one (forget GPU, too slow and painful)
Screen Shot 2018-05-07 at 23.19.30.png
More details here: https://aws.amazon.com/ec2/instance-types/


You can see the development over the past which helps you to determine a price limit

Screen Shot 2018-05-07 at 23.21.01.png
 

Attachments

  • Screen Shot 2018-05-07 at 23.21.01.png
    Screen Shot 2018-05-07 at 23.21.01.png
    188.5 KB · Views: 0
Last edited:
Once decided you can request one or many instances of the same type in one shot

On the upper part of the screen you mainly define

1) Number of instances (here 1)
2) Which AMI (first go with Standard Amazon Linux Image; then once setup is done save it)
I have my CV_BOINC image (with private keys; thats why not public)

3) Choose the instant type (for the count choose in 1)
(here I used 32cores)

4) Availability zone
(opps, was lazy here; but cheapest choosen)

Screen Shot 2018-05-07 at 23.25.11.png


5) choose the security group (here BOINCstyle as defined earlier)
6) choose your key you want for SSH connection
7) set a price limit (lower right part of screen)

Screen Shot 2018-05-07 at 23.25.40.png


there is so much more ; but right now we need to focus on France-smashing

8) Launch
 
Last edited:
once launched it can take a bit time to get the instance created; you can follow the progress in the "Instance" window

Screen Shot 2018-05-07 at 23.33.53.png


Once its running and checks done you can scroll to the right and get the IP address

then a simple

ssh -i <private key file> ec2-user@<IP>

then you have a CentOS style Linux you can use the installation guide as your wish


<to be finetuned>
 
Last edited:
Back
Top