rjurney / Agile_Data_Code_2

Code for Agile Data Science 2.0, O'Reilly 2017, Second Edition
http://bit.ly/agile_data_science
MIT License
456 stars 307 forks source link

Unable to launch instance (SOLVED) #41

Closed josecyc closed 7 years ago

josecyc commented 7 years ago

Hey Russel,

I am trying to launch the EC2 instance. So far the script was able to create the security group but not launch the instance. I am getting the following:


Welcome to Agile Data Science 2.0 :)

I will launch an r3.xlarge instance in the default VPC for you, using a key and security group we will create.

The utility 'jq' is required for this script to detect the hostname of your ec2 instance ...
Detecting 'jq' ...
'jq' was detected ...
Creating security group 'agile_data_science' ...
{
    "GroupId": "sg-14f41e6e"
}

Detecting external IP address ...
Authorizing port 22 to your external IP (187.227.148.67) in security group 'agile_data_science' ...

Generating keypair called 'agile_data_science' ...

An error occurred (InvalidKeyPair.Duplicate) when calling the CreateKeyPair operation: The keypair 'agile_data_science' already exists.
Changing permissions of 'agile_data_science.pem' to 0600 ...

Detecting the default region...
The default region is 'us-west-2'
Determining the image ID to use according to region...
The image for region 'us-west-2' is 'ami-a41eaec4' ...

Initializing EBS optimized r3.xlarge EC2 instance in region 'us-west-2' with security group 'agile_data_science', key name 'agile_data_science' and image id 'ami-a41eaec4' using the script 'aws/ec2_bootstrap.sh'
Got reservation ID 'r-0b32b659f0bc4c1aa' ...

Sleeping 10 seconds before inquiring to get the public hostname of the instance we just created ...
...
Awake!

Using the reservation ID to get the public hostname ...
The public hostname of the instance we just created is 'ec2-34-212-189-56.us-west-2.compute.amazonaws.com' ...
Writing hostname to '.ec2_hostname' ...

Now we will tag this ec2 instance and name it 'agile_data_science_ec2' ...

After a few minutes (for it to initialize), you may ssh to this machine via the command in red: 
ssh -i ./agile_data_science.pem ubuntu@ec2-34-212-189-56.us-west-2.compute.amazonaws.com
Note: only your IP of '187.227.148.67' is authorized to connect to this machine.

NOTE: IT WILL TAKE SEVERAL MINUTES FOR THIS MACHINE TO INITIALIZE. PLEASE WAIT FIVE MINUTES BEFORE LOGGING IN.

Note: if you ssh to this machine after a few minutes and there is no software in $HOME, please wait a few minutes for the install to finish.

Once you ssh in, the exercise code is in the Agile_Data_Code_2 directory! Run all files from this directory, with the exception of the web applications, which you will run from ex. ch08/web

Note: after a few minutes, now you will need to run ./ec2_create_tunnel.sh to forward ports 5000 and 8888 on the ec2 instance to your local ports 5000 and 8888. This way you can run the example web applications on the ec2 instance and browse them at http://localhost:5000 and you can view Jupyter notebooks at http://localhost:8888
If you tire of the ssh tunnel port forwarding, you may end these connections by executing ./ec2_kill_tunnel.sh

---------------------------------------------------------------------------------------------------------------------

Thanks for trying Agile Data Science 2.0!

If you have ANY problems, please file an issue on Github at https://github.com/rjurney/Agile_Data_Code_2/issues and I will resolve them.

If you need help creating your own applications, or with on-site or video training...
Check out Data Syndrome at http://datasyndrome.com

Enjoy! Russell Jurney <@rjurney> <russell.jurney@gmail.com> <http://linkedin.com/in/russelljurney>

I believe it must be something to do with 'aws/ec2_bootstrap.sh' but I can't pinpoint exactly

Thanks in advance

Jose

josecyc commented 7 years ago

SOLVED, I wasn't executing the file from the Agile directory