-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathsession-18.txt
73 lines (50 loc) · 1.68 KB
/
session-18.txt
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
ansible shell vs ansible command module
----------------------------------------
shell module
command module
shell module --> it will use shell environment, means we can use redirections >, pipes | and other shell variables
command module --> it will just run the commands, but can't use shell environment like > , pipe | or variables.
if a simple plain command with out variables, redirections, pipes, etc. we can use command module..
if you want to run shell script inside ansible or complex commands with redirections then we can use shell module
ansible.builtin.user -> works for all distros
useradd/adduser -->
if we use ansible modules we can automatically get idempotency nature..
src: # by default ansible checks in ansible server
dest:
1. make the connection
2. import the data
troubleshoot
--------------------
DB
---
check mysql service is running or not
systemctl status mysqld
check port no 3306 is opened or not
netstat -lntp
check you are able to connect mysql or not
mysql -h db.daws78s.online -u root -pExpenseApp@1
ps -ef | grep mysql
mysql process is running or not
Backend
--------
check backend service is running
systemctl status backend
check port no 8080 is running or not
netstat -lntp
check you are able to connect mysql or not
telnet db.daws78s.online 3306
check mysql data is imported
mysql -h db.daws78s.online -u root -pExpenseApp@1
show databases;
use transactions;
show tables;
ps -ef | grep expense
frontend
-----------
systemctl status nginx
netstat -lntp --> port no 80
telnet backend.daws78s.online 8080
system/os package --> mysql(c language)
ansible --> PyMYSQL (python)
nodejs backend --> mysql(nodejs package)
can java application use mysql nodejs library? no