Advertisement
sandervanvugt

devopsfourweeks day1 feb21

Feb 1st, 2021
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.95 KB | None | 0 0
  1. ####### on Centos
  2. [student@centos devopsinfourweeks]$ history
  3. 1 sudo dnf install vim git bash-completion
  4. 2 sudo dnf install epel
  5. 3*
  6. 4 git clone https://github.com/sandervanvugt/ansible3h
  7. 5 git clone https://github.com/sandervanvugt/ansible-3h
  8. 6 cd ansible-3h/
  9. 7 ls
  10. 8 cd
  11. 9 ssh-keygen
  12. 10 ssh-copy-id 192.168.29.3
  13. 11 ssh 192.168.29.3
  14. 12 sudo dnf install ansible -y
  15. 13 vim inventory
  16. 14 ansible 192.168.29.3 -m ping -i inventory -u student
  17. 15 sudo vim /etc/hosts
  18. 16 vim inventory
  19. 17 ansible ubuntu -m ping -i inventory -u student
  20. 18 git clone https://github.com/sandervanvugt/luth
  21. 19 cd luth/
  22. 20 ./countdown 12
  23. 21 ansible-doc -l | less
  24. 22 ansible-doc -l | wc
  25. 23 ansible-doc user
  26. 24 ansible ubuntu -i inventory -u student -m user -a "name=linda"
  27. 25 cd
  28. 26 ls
  29. 27 ansible ubuntu -i inventory -u student -m user -a "name=linda"
  30. 28 ansible ubuntu -i inventory -u student -K -m user -a "name=linda"
  31. 29 ssh ubuntu
  32. 30 ansible --help | less
  33. 31 ansible ubuntu -i inventory -u student -b -K -m user -a "name=linda"
  34. 32 ansible ubuntu -i inventory -u student -b -K -m package -a "name=nmap"
  35. 33 ls
  36. 34 git clone https://github.com/sandervanvugt/devopsinfourweeks
  37. 35 cd devopsinfourweeks/
  38. 36 ls
  39. 37 vim ansible.cfg
  40. 38 ansible ubuntu -K -m package -a "name=nmap"
  41. 39 cp ../inventory .
  42. 40 ansible ubuntu -K -m package -a "name=nmap"
  43. 41 sudo vim /etc/ansible/ansible.cfg
  44. 42 ls
  45. 43 vim when-test.yml
  46. 44 ansible-playbook -K when-test.yml
  47. 45 ansible ubuntu -m command -a "ip a"
  48. 46 ansible ubuntu -K -m command -a "ip a"
  49. 47 vim when-test.yml
  50. 48 ansible-playbook -K when-test.yml
  51. 49 cat ansible.cfg
  52. 50 history
  53.  
  54. ###### on Ubuntustudent@student-virtual-machine:~$ history
  55. 1 git clone https://github.com/sandervanvugt/devopsinfourweeks
  56. 2 sudo apt install git
  57. 3 git clone https://github.com/sandervanvugt/devopsinfourweeks
  58. 4 cd devopsinfourweeks/
  59. 5 ls
  60. 6 cd .git/
  61. 7 ls
  62. 8 cat config
  63. 9 cd ..
  64. 10 echo hello > hellofile.txt
  65. 11 ls -l hellofile.txt
  66. 12 git status
  67. 13 git add hellofile.txt
  68. 14 git status
  69. 15 git commit -m "adding new dummy demo file"
  70. 16 ls
  71. 17 cd ..
  72. 18 git clone https://github.com/sandervanvugt/luth
  73. 19 cd luth/
  74. 20 ./countdown 12
  75. 21 cd ..
  76. 22 mkdir 1stoffeb
  77. 23 cd 1stoffeb/
  78. 24 echo "whatever" >> README.md
  79. 25 ls -a
  80. 26 git init
  81. 27 git status
  82. 28 cp /etchosts .
  83. 29 cp /etc/hosts .
  84. 30 git status
  85. 31 git add *
  86. 32 git status
  87. 33 git commit -m "first commit of my dummy files"
  88. 34 git config --global user.email mail@sandervanvugt.nl
  89. 35 git config --global user.name sandervanvugt
  90. 36 git commit -m "first commit of my dummy files"
  91. 37 git remote add origin https://github.com/sandervanvugt/1stoffeb
  92. 38 git push -u origin master
  93. 39 ls -l
  94. 40 cd ..
  95. 41 sudo apt-get install openjdk-11-jdk
  96. 42 wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
  97. 43 sudo sh -c ' echo deb https://pkg.jenkins.io/debian-stable-binary/ > /etc/apt/sources.list.d/jenkins.list'
  98. 44 sudo apt-get update
  99. 45 sudo apt install git vim -y
  100. 46 sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
  101. 47 sudo apt-get update
  102. 48 sudo apt install vim
  103. 49 sudo apt-get install jenkins
  104. 50 id
  105. 51 history
  106. 52 sudo apt remove jenkins
  107. 53 sudo apt-get install openjdk-11-jdk
  108. 54 sudo apt-get install jenkins
  109. 55 sudo systemctl status jenkins
  110. 56 sudo cat /var/lib/jenkins/secrets/initialAdminPassword
  111. 57 sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
  112. 58 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  113. 59 sudo apt-key fingerprint 0EBFCD88
  114. 60 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  115. 61 sudo apt-get update
  116. 62 sudo apt-get install docker-ce docker-ce-cli container.io
  117. 63 sudo apt-get install docker-ce docker-ce-cli containerd.io
  118. 64 sudo docker run hello-world
  119. 65 sudo usermod -aG docker jenkins
  120. 66 sudo systemctl restart jenkins
  121. 67 luth/countdown 13
  122. 68 ls
  123. 69 cd devopsinfourweeks/
  124. 70 ls
  125. 71 cd simple-nginx/
  126. 72 ls
  127. 73 cd ../wordpress-mysql/
  128. 74 ls
  129. 75 cd ..
  130. 76 cat firstpipeline
  131. 77 cat secondpipeline
  132. 78 cat firstpipeline
  133. 79 cat secondpipeline | less
  134. 80 sudo systemctl status jenkins
  135. 81 cat firstpipeline
  136. 82 sudo reboot
  137. 83 history
  138. 84 sudo apt install openssh-server
  139. 85 sudo systemctl status sshd
  140. 86 ip a
  141. 87 sudo systemctl status jenkins
  142. 88 sudo systemctl restart jenkins
  143. 89 history
  144.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement