@@ -16,3 +16,63 @@ Webotron currently has the following features:
1616- Set AWS profile with --profile=<profile_name>
1717- Configure route 53 domain
1818- Configure Cloud Front distribution with SSL
19+
20+ ##Installation
21+ pip install webotron-20
22+
23+ ##Using webotron-20
24+
25+ - Setup AWS profile. .AWS/config
26+
27+ - Use profile to use/access AWS resources.
28+
29+ - PS C:\Users\Rishu> webotron
30+ Usage: webotron [ OPTIONS] COMMAND [ ARGS] ...
31+
32+ Webotron deploys websites to AWS.
33+
34+ Options:
35+ --profile TEXT Use a given AWS profile.
36+ --help Show this message and exit.
37+
38+ Commands:
39+ find-cert Find a certificate for given domain.
40+ list-bucket-objects List objects in s3 bucket.
41+ list-buckets List all s3 buckets.
42+ setup-bucket Create and configure s3 bucket for Static Website...
43+ setup-cdn To Setup a cloud frot for given domain and bucket.
44+ setup-domain Configure DOMAIN to point to BUCKET.
45+ sync Sync contents from Path to Bucket.
46+ - Examples
47+ PS C:\Users\Rishu> webotron --profile=pythonAutomation list-buckets
48+ s3.Bucket(name='kittentest.techenvision.net')
49+ PS C:\Users\Rishu> webotron --profile=pythonAutomation list-bucket-objects kittentest.techenvision.net
50+ s3.ObjectSummary(bucket_name='kittentest.techenvision.net', key='css/main.css')
51+ s3.ObjectSummary(bucket_name='kittentest.techenvision.net', key='images/Balinese-kitten1.jpg')
52+ s3.ObjectSummary(bucket_name='kittentest.techenvision.net', key='images/Maine_coon_kitten_roarie.jpg')
53+ s3.ObjectSummary(bucket_name='kittentest.techenvision.net', key='images/SFSPCA_Kitten.jpg')
54+ s3.ObjectSummary(bucket_name='kittentest.techenvision.net', key='index.html')
55+
56+ PS C:\Users\Rishu> webotron --profile=pythonAutomation sync "D:\Tech\Automate AWS with Python\code\automating-aws-with-python\01-webotron\kitten_web" kittentest.techenvision.net
57+ File has been successfully added : css/main.css
58+ File has been successfully added : images/Balinese-kitten1.jpg
59+ File has been successfully added : images/Maine_coon_kitten_roarie.jpg
60+ File has been successfully added : images/SFSPCA_Kitten.jpg
61+ File has been successfully added : index.html
62+ File has been successfully deleted : webotron.py
63+ File has been successfully deleted : certificate.py
64+ File has been successfully deleted : cdn.py
65+ File has been successfully deleted : domain.py
66+ File has been successfully deleted : __ init__ .py
67+ File has been successfully deleted : util.py
68+ File has been successfully deleted : bucket.py
69+ Sync is successful. Your bucket URL is:
70+ http://kittentest.techenvision.net.s3-website.us-east-2.amazonaws.com
71+
72+ PS C:\Users\Rishu> webotron --profile=pythonAutomation find-cert kittentest.techenvision.net
73+ {'CertificateArn': 'arn:aws:acm:us-east-1:637555073356: certificate /56b961ea-f789-42a1-97fa-8328ccaa4a77', 'DomainName': 'techenvision.net'}
74+
75+ PS C:\Users\Rishu> webotron --profile=pythonAutomation setup-cdn kittentest.techenvision.net kittentest.techenvision.net
76+ Distribution already exists. Creating Alias Record.
77+ Domain configured: https://kittentest.techenvision.net
78+ PS C:\Users\Rishu>
0 commit comments