Compare commits

...

8 Commits

Author SHA1 Message Date
093d0fa56a Software fix
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-17 22:31:13 +03:00
eca352baab Software: qemu-ga check
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-17 22:30:32 +03:00
32f03ed5dc Speedup playbook
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-17 22:25:46 +03:00
d688810304 Speedup playbook
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-17 22:24:45 +03:00
0e8662c390 Check software
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-17 22:24:07 +03:00
501f2be89e Check software
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-17 22:22:27 +03:00
9d6b6a7afc Больше негде тестить. Пушим сразу в прод
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-17 22:05:31 +03:00
555358a851 More OOB actions
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone Build was killed
2022-01-13 13:49:13 +00:00
3 changed files with 29 additions and 94 deletions

View File

@@ -1,21 +1,3 @@
---
kind: pipeline
type: exec
name: test
trigger:
event:
exclude:
- promote
steps:
- name: Check playbook
commands:
- ansible-playbook -C playbook.yml
node:
target: local
---
kind: pipeline
type: exec
@@ -32,56 +14,3 @@ steps:
node:
target: shell-scripts
trigger:
event:
- promote
target:
- production
---
kind: pipeline
type: exec
name: deploy to local test
steps:
- name: Check playbook
commands:
- ansible-playbook -C playbook.yml
- name: Run playbook
commands:
- ansible-playbook playbook.yml
node:
target: local
trigger:
event:
- promote
target:
- local
---
kind: pipeline
type: exec
name: deploy to public test
steps:
- name: Check playbook
commands:
- ansible-playbook -C playbook.yml
- name: Run playbook
commands:
- ansible-playbook playbook.yml
node:
target: shell-testing
trigger:
event:
- promote
target:
- testing

View File

@@ -6,8 +6,7 @@
become: yes
apt:
name: nginx-light
update_cache: yes
state: latest
state: present
- name: Create dir
file:
path: /var/www

View File

@@ -53,20 +53,40 @@ echo -e "\n${TEXT_COLOR_GOOD} - Installed panel: ${TEXT_COLOR_OFF}\n"
[[ -d /usr/local/mgr5/ ]] && echo "ISPManager!"
[[ -d /usr/local/fastpanel2 ]] && echo "Fastpanel 2"
echo -e "${TEXT_COLOR_GOOD} - Installed packages: ${TEXT_COLOR_OFF}\n"
echo -e "${TEXT_COLOR_GOOD} - OOMS: ${TEXT_COLOR_OFF}\n"
dmesg -T | grep "Out of memory" | tail -20
list=$(apt list --installed 2>&1 |egrep 'atop')
echo $list
# Top RAM
echo -e "${TEXT_COLOR_GOOD} - Top RAM usage:${TEXT_COLOR_OFF}"
ps axk-%mem ouser,%cpu,%mem,command | head
echo
# Top CPU
echo -e "${TEXT_COLOR_GOOD} - Top CPU usage:${TEXT_COLOR_OFF}"
ps axk-%cpu ouser,%cpu,%mem,command | head
echo
# Какое ПО стоит? Docker/atop
echo -e "\n${TEXT_COLOR_GOOD} - Installed software: ${TEXT_COLOR_OFF}\n"
for i in "docker" "atop" "qemu-ga"
do
if which $i
then
echo "$i is installed"
else
echo "$i is NOT installed"
fi
echo
done
while true
do
echo -e "
---
1. Посмотреть жрущие ЦПУ/ОЗУ процессы
2. Вывести OOM'ы
3. nginx: Посмотреть конфиги и домены в них
4. Запустить logs
2. nginx: Посмотреть конфиги и домены в них
3. Запустить logs
0. Выход
"
@@ -76,23 +96,10 @@ echo -e "
0)
harakiri
;;
1)
echo -e "${TEXT_COLOR_GOOD}- Top RAM usage:${TEXT_COLOR_OFF}"
ps axk-%mem ouser,%cpu,%mem,command | head
echo
echo -e "${TEXT_COLOR_GOOD}- Top CPU usage:${TEXT_COLOR_OFF}"
ps axk-%cpu ouser,%cpu,%mem,command | head
;;
2)
echo "- OOMS:"
dmesg -T | grep "Out of memory"
;;
3)
nginx -T 2> /dev/null | egrep "configuration file|server_name"
;;
4)
3)
wget -O /tmp/nginx.sh 94.228.126.204/nginx.sh
bash /tmp/nginx.sh
rm /tmp/nginx.sh