This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2008-10-17", | |
"Id": "PolicyForPublicWebsiteContent", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3api put-bucket-policy --bucket dev-creatorsbyheart.com --policy file://s3_bucket_policy.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3 cp aws_image.jpg s3://dev-creatorsbyheart.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"CallerReference": "shubham-rasal", | |
"Aliases": { | |
"Quantity":0 | |
}, | |
"Origins": { | |
"Quantity": 1, | |
"Items": [ | |
{ | |
"Id": "cloudfront-dev-creatorsbyheart.com", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws cloudfront create-distribution --distribution-config file://cf_config.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ssm send-command \ | |
--document-name "AWS-RunShellScript" \ | |
--parameters commands=["sudo yum install httpd git -y, | |
sudo systemctl start httpd, | |
sudo systemctl enable httpd, | |
sudo mkfs.ext4 /dev/xvdf/ /var/www/html , | |
sudo rm -rf /var/www/html/*, | |
sudo git clone https://github.com/creatorsbyheart/creatorsbyheart.github.io.git /var/www/html/ , | |
sudo systemctl restart httpd "] | |
--targets "Key=instanceids,Values=<instance-id>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install hadoop on namenode and datanodes | |
- hosts: | |
- hadoop_namenode | |
- hadoop_datanode | |
vars: | |
- user_directory: "{{ ansible_facts['user_dir']}}" | |
tasks: | |
#copy java software | |
- name: "Transfer JDK 8" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>fs.default.name</name> | |
<value>hdfs://{{ groups['hadoop_namenode'][0] }}:{{hadoop_port}}</value> | |
</property> | |
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>dfs.name.dir</name> | |
<value>{{user_dir}}{{namenode_directory }}</value> | |
</property> | |
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>fs.default.name</name> | |
<value>hdfs://{{ groups['hadoop_namenode'][0] }}:{{hadoop_port}}</value> | |
</property> | |
</configuration> |