0% found this document useful (0 votes)
168 views2 pages

Devops Day1 April22

The documents summarize the command line history of a student on two systems - Rocky and Ubuntu. On Rocky, the student installs Ansible and uses it to deploy packages and playbooks. On Ubuntu, the student clones a GitHub repo, installs Docker and Jenkins, configures pipelines in Jenkins to use Docker, and runs some Docker commands to launch containers.

Uploaded by

smile2me2012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views2 pages

Devops Day1 April22

The documents summarize the command line history of a student on two systems - Rocky and Ubuntu. On Rocky, the student installs Ansible and uses it to deploy packages and playbooks. On Ubuntu, the student clones a GitHub repo, installs Docker and Jenkins, configures pipelines in Jenkins to use Docker, and runs some Docker commands to launch containers.

Uploaded by

smile2me2012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

ON ROCKY

[student@rocky devopsinfourweeks]$ history


1 sudo dnf install epel-release
2 sudo dnf install -y ansible
3 sudo sh -c 'echo [Link] [Link] ubunut >> /etc/hosts'
4 cat /etc/hosts
5 ssh-keygen
6 sudo vim /etc/hosts
7 ssh-copy-id ubuntu
8 ssh ubuntu
9 echo ubuntu >> inventory
10 ansible ubuntu -m ping -i inventory -u student -K
11 ansible ubuntu -m ping -i inventory -u student -k
12 ansible ubuntu -m ping -i inventory -u student
13 ansible-doc -l
14 ansible all -i inventory -u student -m user -a "name=linda" -b -K
15 ansible ubuntu -i inventory -u student -b -K -m package -a "name=nmap"
16 ansible localhost -m package -a "name=git" -b -K -k
17 git clone [Link]
18 ansible-doc git
19 cd devopsinfourweeks/
20 vim [Link]
21 ansible all -m package -a "name=git"
22 ls
23 cp ../inventory .
24 ansible all -m package -a "name=git"
25 vim [Link]
26 ls
27 vim [Link]
28 git pull
29 vim install_and_start_httpt.yaml
30 ansible-playbook install_and_start_httpt.yaml
31 ./[Link] 12
32 history

ON UBUNTU
student@student-virtual-machine:~$ history
1 exit
2 ip a
3 ssh student@[Link]
4 sudo apt install vim git
5 git clone [Link]
6 git clone [Link]
7 git clone [Link]
8 cd devopsinfourweeks/
9 ls
10 vim [Link]
11 history
12 sudo apt install openjdk-11-jdk
13 wget -q -O [Link] | sudo apt-
key add -
14 wget -q -O - [Link] | sudo apt-
key add -
15 sudo sh -c 'echo deb [Link] binary/ >
/etc/apt/[Link].d/[Link]'
16 sudo apt update
17 history
18 rm /etc/apt/[Link].d/[Link]
19 sudo rm /etc/apt/[Link].d/[Link]
20 sudo apt update
21 sudo apt upgrade
22 sudo apt install ca-certificates
23 wget -q -O - [Link] | sudo apt-
key add
24 sudo sh -c 'echo deb [Link] binary/ >
/etc/apt/[Link].d/[Link]'
25 sudo apt install jenkins
26 sudo apt update
27 sudo apt install jenkins
28 ./[Link] 6
29 sud -i
30 sudo -i
31 sudo apt install apt-transport-https ca-certificates curl gnupg-agent
software-properties-common
32 curl -fsSL [Link] | sudo apt-key add -
33 sudo apt-key fingerprint 0EBFCD88
34 sudo add-apt-repository "deb [arch=amd64]
[Link] $(lsb_release -cs) stable"
35 sudo apt update
36 sudo apt install docker-ce docker-ce-cli [Link]
37 sudo docker run hello-world
38 sudo usermod -aG docker jenkins
39 sudo systemctl restart jenkins
40 sudo systemctl status jenkins
41 free -m
42 top
43 vim firstpipeline
44 sudo docker images
45 vim secondpipeline
46 cat secondpipeline
47 sudo apt install openssh-server
48 docker run ubuntu
49 newgrp docker
50 sudo reboot
51 docker run ubuntu
52 echo $?
53 docker ps
54 docker ps -a
55 docker run -d nginx
56 docker ps
57 docker run -it ubuntu sh
58 docker ps aux
59 docker ps -a
60 docker run -it ubuntu sh
61 docker inspect ubuntu:latest | less
62 docker inspect nginx:latest
63 docker inspect nginx:latest | less
64 docker ps
65 docker inspect compassionate_varahamihira
66 docker inspect compassionate_varahamihira | less
67 curl [Link]
68 docker run --name webserver --memory="128m" -d -p 8080:80 nginx
69 docker run --name webserver --memory="128m" -d -p 8081:80 nginx
70 docker rm webserver
71 docker run --name webserver --memory="128m" -d -p 8081:80 nginx
72 curl localhost:8081
73 history

You might also like