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 306 forks source link

error running ec2.sh #75

Closed valima closed 5 years ago

valima commented 6 years ago

Hi, I am running the sc2.sh script on Ubuntu (which in turn is running as a subsystem on Windows 10). When I run the script, it throws some errors to the console but still carries on printing messages suggesting it ran ok. What worries me is did it actually launch the aws machine? Even if it did, I do not understand how they would be able to charge me without any account details. Are there any steps missing in the chapter that need to be performed before running this script like setting up AWS account and use those account details in the script for AWS to authorise creating the machine? See below the log:

Detecting the default region... The default region is '' Determining the image ID to use according to region... The image for region '' is '' ...

Initializing EBS optimized r4.xlarge EC2 instance in region '' with security group 'agile_data_science', key name 'agile_data_science' and image id '' using the script 'aws/ec2_bootstrap.sh' usage: aws [options] [ ...] [parameters] To see help text, you can run:

aws help aws help aws help aws: error: argument --image-id: expected one argument Got reservation ID '' ...

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 ... You must specify a region. You can also configure your region by running "aws configure". The public hostname of the instance we just created is '' ... Writing hostname to '.ec2_hostname' ...

Now we will tag this ec2 instance and name it 'agile_data_science_ec2' ... You must specify a region. You can also configure your region by running "aws configure". You must specify a region. You can also configure your region by running "aws configure".

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@ Note: only your IP of 'xx.xxx.xxx.xxx' 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

rjurney commented 5 years ago

In order to launch the machine, you need to configure your account details via aws configure. Check out the project's README.md file, which I have just updated for more details.