Skip to content

Commit

Permalink
v1 working good #47
Browse files Browse the repository at this point in the history
  • Loading branch information
GowthamChowta committed Mar 29, 2022
1 parent 58a84d8 commit a2ca48f
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions instance-creation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,37 @@ sed -i '/k8s_master_fips/c\k8s_master_fips =["'$IP'"]' cluster.tfvars &&

bash terraform_init.sh &&
bash terraform_apply.sh &&
# Sleeping for 30 seconds just for instances to start
sleep 30 &&
cd ../../ &&
# installing Ansible
pip3 install -r requirements.txt &&
eval $(ssh-agent -s) &&
ssh-add ~/.ssh/id_rsa &&
# This will avoid the yes/no prompt when doing SSH connection to the machines
echo 'StrictHostKeyChecking no' &>> /etc/ssh/ssh_config &&
# Run the ansible playbooks to install kubernetes
cd ../terra &&
cp ../jetstream_kubespray/inventory/$CLUSTER/hosts hosts &&
ansible-playbook -i hosts users.yml &&
ansible-playbook -i hosts install-k8s.yml &&
sleep 30 &&
ansible-playbook -i hosts master.yml &&
sleep 30 &&
ansible-playbook -i hosts workers.yml &&
ssh ubuntu@$IP &&
git clone https://github.com/airavata-courses/terra.git &&
cd terra &&
git checkout ansible-kub-setup &&
cd Kubernetes\ files/ &&

kubectl apply -f MySQLConfigMap.yaml &&
kubectl apply -f MySQLService.yaml &&
sleep 30 &&
kubectl apply -f rabbitmq.yaml &&
sleep 30 &&
kubectl apply -f data-retrieval.yaml &&
kubectl apply -f api-gateway.yaml &&
kubectl apply -f weatherForecast.yaml &&
kubectl apply -f user-managment.yaml &&
kubectl apply -f userinterface.yaml &&

0 comments on commit a2ca48f

Please sign in to comment.