-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·39 lines (28 loc) · 955 Bytes
/
build.sh
File metadata and controls
executable file
·39 lines (28 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
MY_DATABASE="ec2.db"
# Create Database
sqlite3 "$MY_DATABASE" < create.sql || exit 9
# Locations
curl -O --fail --compressed "https://b0.p.awsstatic.com/locations/1.0/aws/current/locations.json" || exit 9
perl locations.pl < locations.json || exit 9
# IP Ranges
curl -O --fail "https://ip-ranges.amazonaws.com/ip-ranges.json" || exit 9
perl ip-ranges.pl < ip-ranges.json || exit 9
# Prices
bash price-lists.sh || exit 9
# Spot price
curl -O --fail "https://website.spot.ec2.aws.a2z.com/spot.json" || exit 9
perl spot.pl < spot.json || exit 9
# Instace Types (EC2)
aws ec2 describe-instance-types --region us-east-1 --output json > instance-types.json || exit 9
perl instance-types.pl < instance-types.json || exit 9
# Storage Types (EBS)
sqlite3 "$MY_DATABASE" < storage-types.sql || exit 9
# SAP
perl sap.pl || exit 9
perl sap-hana.pl || exit 9
# Export
bash export.sh || exit 9
# Websites
perl web.pl || exit 9
echo "DONE"