Skip to content

Instantly share code, notes, and snippets.

View hackcoderr's full-sized avatar
:octocat:
Engineering leads passionate about getting his hands dirty with new technology.

Sachin Kumar hackcoderr

:octocat:
Engineering leads passionate about getting his hands dirty with new technology.
View GitHub Profile
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2 zip
sudo ./aws/install
aws --version
aws ec2 create-key-pair --key-name your_key_pair_name
aws ec2 create-security-group --description cli_security --group-name your_security_group_name
aws ec2 run-instances --image-id ami-0947d2ba12ee1ff75 --instance-type t2.micro --security-group-ids your_security_group_id --key-name your_key_pair
aws ec2 create-volume --availability-zone your_availability_zone --volume-type gp2 --size 1
aws ec2 attach-volume --device sdb --instance-id your_instance_id --volume-id your_volume_id
@hackcoderr
hackcoderr / docker.repo
Created October 31, 2020 17:20
repo for the installing docker software
[docker]
baseurl=https://download.docker.com/linux/centos/7/x86_64/stable/
gpgcheck=0
- hosts: namenode
vars_files:
- name_var.yml
tasks:
- name: "Copying the hadoop software file"
copy:
src: "{{ hadoop_path }}"
dest: "/root"
- name: "Copying the JDK software file"
copy:
hadoop_path: "/home/ec2-user/hadoop-1.2.1-1.x86_64.rpm"
jdk_path: "/home/ec2-user/jdk-8u171-linux-x64.rpm"
jdk_software: "/root/jdk-8u171-linux-x64.rpm"
hadoop_software: "/root/hadoop-1.2.1-1.x86_64.rpm"
hdfs_site: "/home/ec2-user/name_files/hdfs-site.xml"
- hosts: datanode
vars_files:
- data_var.yml
tasks:
- name: "Copying the hadoop File"
copy:
src: "{{ hadoop_path }}"
dest: "/root/"
- name: "Copying the JDK File"
copy:
hadoop_path: "/home/ec2-user/hadoop-1.2.1-1.x86_64.rpm"
jdk_path: "/home/ec2-user/jdk-8u171-linux-x64.rpm"
hadoop_software: "/root/hadoop-1.2.1-1.x86_64.rpm"
jdk_software: "/root/jdk-8u171-linux-x64.rpm"
core_site: "/home/ec2-user/datanode_files/core-site.xml"
- hosts: client
vars_files:
- client_var.yml
tasks:
- name: "Copying the hadoop File"
copy:
src: "{{ hadoop_path }}"
dest: "/root/"
- name: "Copying the JDK File"
copy:
hadoop_path: "/home/ec2-user/hadoop-1.2.1-1.x86_64.rpm"
jdk_path: "/home/ec2-user/jdk-8u171-linux-x64.rpm"
hadoop_software: "/root/hadoop-1.2.1-1.x86_64.rpm"
jdk_software: "/root/jdk-8u171-linux-x64.rpm"
core_site: "/home/ec2-user/client_files/core-site.xml"
@hackcoderr
hackcoderr / haproxy.yml
Last active January 8, 2022 17:07
Deploying Apache webserver, configuring & updating HAProxy dynamically using Ansible
- hosts: webserver
tasks:
- name: "installing the httpd server"
package:
name: "httpd"
state: present
- name: "installing the php on the webserver"
package:
name: "php"