Attach and Detach Public IP in AWS
This script is used for detach elastic ip from one server and attach it to the secondary private ip of the other server.
We have two servers with same content named “server01” and “server02” with primary and secondary private IP in AWS and each instance have a public IP (ie. Elastic IP). This two public IP’s are pointed to the DNS.
If “server01” goes down, only you need to detach the elastic IP and attached it to the “server02” to the secondary private IP.
You can find the script in the below link:-
Git has a built-in server for sharing git repositories. If you have several repositories in your working directory:
Step-1 :- We clone the repo from Github
git clone email@example.com:vishnu/vishnu.git —> To our home directory for eg: /home/vishnu
step-2 :- git-deamon
git daemon –base-path=/home/vishnu –export-all –enable=receive-pack
(I created a supervisor to run this)
root@vishnu-machine:~# vim /etc/supervisor/conf.d/git_mirror_update.conf
command=/usr/local/bin/git daemon –base-path=/home/vishnu –export-all –enable=receive-pack
root@vishnu-machine:~# supervisorctl status
git_mirror_update RUNNING pid 3041, uptime 8:18:46
step-3 :- then we create a mirror from the repo which we cloned to another location in our system
git clone git://127.0.0.1/vishnu
git clone –mirror firstname.lastname@example.org:vishnu/vishnu.git
git push –mirror git://127.0.0.1/vishnu ——> This will update all the remote branches
In the deploy.rb, use
set :repository, “git://127.0.0.1/vishnu”
For refferel :- https://help.github.com/articles/working-when-github-goes-down