Skip to content

Instantly share code, notes, and snippets.

@dotsh
Last active October 6, 2017 15:06
Show Gist options
  • Save dotsh/eb76089ffc6fa47a7519e31794510048 to your computer and use it in GitHub Desktop.
Save dotsh/eb76089ffc6fa47a7519e31794510048 to your computer and use it in GitHub Desktop.
cd
sudo su -c 'for i in $(lxc-ls) ; do lxc-stop --name $i ; lxc-destroy --name $i ;done'
mkdir cloudera-manager-cluster
cd cloudera-manager-cluster
## restart here with this command if any problem ## sudo su -c 'for i in $(lxc-ls) ; do lxc-stop --name $i ; lxc-destroy --name $i ;done' ; rm Vagrantfile
wget -O Vagrantfile j1.re/Vgrfile-CM5
export mypubkey=$(cat ~/.ssh/id_rsa.pub | sed -e 's#\/#\\\/#g' -e 's# #\\ #g' )
sed -i -s "s/^ssh-rsa.*$/${mypubkey}/" Vagrantfile
vagrant up --provider=lxc
# vagrant reload
# for i in $(seq 1 4) ; do ping -c 1 -w 0 vm-cluster-node${i}; done
# for i in $(seq 1 4) ; do ssh -nT vagrant@vm-cluster-node${i} uptime ; done
# sudo su -c 'for i in $(lxc-ls) ; do lxc-info --name $i ; done'
for i in $(seq 1 4) ; do ssh -nT vagrant@vm-cluster-node${i} sudo apt-get update ; done
for i in $(seq 1 4) ; do ssh -nT vagrant@vm-cluster-node${i} sudo apt-get install apt-transport-https ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment