Created
October 14, 2018 12:59
-
-
Save mataprasad/d04b5a52dc1a571f857e71c8c82ef634 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check linux version | |
lsb_release -a | |
# check disk space | |
df | |
# check memory | |
free -m | |
# check memory | |
# cat /proc/meminfo | |
sudo -s | |
# install python | |
apt-get install python | |
# install pip | |
apt-get install python-pip python-dev build-essential | |
pip install --upgrade pip | |
# install oracle java 8 | |
add-apt-repository ppa:webupd8team/java | |
apt-get update | |
apt-get install oracle-java8-installer | |
update-alternatives --config java | |
# install node 8 | |
wget -qO- https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
apt-get install -y nodejs | |
# install docker | |
apt-get update | |
apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
apt-key fingerprint 0EBFCD88 | |
add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
apt-get update | |
apt-get install docker-ce | |
# test docker installation | |
docker run hello-world | |
# install awscli | |
pip install --upgrade awscli | |
aws --version | |
# now add your aws credentials in envirnoment | |
nano /etc/envirnoment | |
export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> | |
export AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> | |
# install jenkins | |
apt-get update | |
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' | |
apt-get update | |
apt-get install jenkins | |
# check jenkins status | |
service jenkins status | |
# can change jenkins default port [8080] on below file | |
nano /etc/default/jenkins | |
# add jenkins user to sudoers | |
nano /etc/sudoers | |
# and add below line in the end | |
jenkins ALL=(ALL) NOPASSWD: ALL | |
service jenkins restart | |
# add jenkins user to docker group | |
usermod -aG docker jenkins | |
# install ansible | |
sudo apt-get update && sudo apt-get install software-properties-common | |
sudo apt-add-repository ppa:ansible/ansible | |
sudo apt-get update && sudo apt-get install ansible | |
ansible --version | |
# setup ansible hosts file and change the inventory line in <config file> to point this hosts file | |
example host file | |
[<host_group_name>] | |
<ip> ansible_user=<ssh_uer> ansible_ssh_pass=<ssh_password> ansible_port=<ssh_port(do not supply if default)> | |
ansible <all|host_group_name> -m ping |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment