rjurney / Agile_Data_Code_2

Code for Agile Data Science 2.0, O'Reilly 2017, Second Edition

Home Page:http://bit.ly/agile_data_science

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSON not recognized on ec2 create

jeffreybox opened this issue · comments

Experiencing issues getting started and running the ec2.sh script. I'm running in terminal on mac os 10.15.7. I installed jq successfully without error messages. However, when I run the script, I get multiple Unknown output type: JSON errors, and the script doesn't create an ec2 instance ID. It does, however, create an ec2 instance when I look in my console. Output from ec2.sh below:

Logging operations to '/tmp/ec2.sh.log' ...

Welcome to Agile Data Science 2.0 :)

I will launch an r5.2xlarge 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 ...
Testing for security group 'agile_data_science' ...

Unknown output type: JSON
Security group 'agile_data_science' not present ...
Creating security group 'agile_data_science' ...

An error occurred (InvalidGroup.Duplicate) when calling the CreateSecurityGroup operation: The security group 'agile_data_science' already exists for VPC 'vpc-6560141f'

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

An error occurred (InvalidPermission.Duplicate) when calling the AuthorizeSecurityGroupIngress operation: the specified rule "peer: 65.50.119.250/32, TCP, from port: 22, to port: 22, ALLOW" already exists

Testing for existence of keypair 'agile_data_science' and key 'agile_data_science.pem' ...

Unknown output type: JSON
Generating new keypair called 'agile_data_science' ...

Unknown output type: JSON
Changing permissions of 'agile_data_science.pem' to 0600 ...

Detecting the default region...
The default region is 'us-east-1'
Determining the image ID to use according to region...
The image for region 'us-east-1' is 'ami-0a399aac42a48483d' ...

Initializing EBS optimized r5.2xlarge EC2 instance in region 'us-east-1' with security group 'agile_data_science', key name 'agile_data_science' and image id 'ami-0a399aac42a48483d' using the script 'aws/ec2_bootstrap.sh'

Unknown output type: JSON
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 ...

Unknown output type: JSON
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' ...

Unknown output type: JSON
Got no instance id! Exiting!

@jeffreybox sorry for the late reply, but we no longer use ec2. You can run the entire system using Docker via the Dockerfile and docker-compose.