forked from squad12-devops/case-study
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
38 lines (33 loc) · 1.36 KB
/
build.sh
File metadata and controls
38 lines (33 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Ansible installation
sudo apt -y update
sudo apt-add repository ppa:ansible/ansible
sudo apt-get -y install ansible
ansible --version
ssh-keygen -t rsa -N '' -f /tmp/ssh_sq12 -q
ansible -m ping localhost
cat ~/.ssh/id_rsa.pub
# Docker installation and setup
sudo apt-get -y update
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt -y update
apt-cache policy docker-ce
sudo apt -y install docker-ce
#cocker ps permissions to ubuntu
sudo chmod 777 /var/run/docker.sock
docker ps
#Ansible environment setup
#sudo cp /etc/ansible/hosts /etc/ansible/hosts_"$(date +"%Y_%m_%d_%I_%M_%p")"
#Maven Installation is part of main.tf
# ELK Dashboard Installation and Setup
sudo apt-get -y update
sudo apt-get -Y install default-jre
sudo wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get -y update && sudo apt-get -y install elasticsearch
sudo service elasticsearch start
sudo systemctl enable elasticsearch
sudo apt-get -y install kibana
sudo service kibana start
sudo systemctl enable kibana