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
- hosts: webserver | |
vars_files: | |
- vars.yml | |
tasks: | |
- name: "Install HTTPD " | |
package: | |
name: "httpd" | |
state: present | |
register: httpd_install |
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
#configure namenode | |
- name: "configure namenode" | |
hosts: hadoop_namenode | |
tags: | |
- "namenode" | |
vars: | |
user_dir: "{{ ansible_facts['user_dir'] }}" | |
vars_files: | |
- vars.yml | |
- namenode/vars.yml |
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.data.dir</name> | |
<value>{{user_dir}}{{datanode_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> |
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> |
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
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
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
{ | |
"CallerReference": "shubham-rasal", | |
"Aliases": { | |
"Quantity":0 | |
}, | |
"Origins": { | |
"Quantity": 1, | |
"Items": [ | |
{ | |
"Id": "cloudfront-dev-creatorsbyheart.com", |