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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-exporter-deployment | |
namespace: default | |
spec: | |
selector: | |
matchLabels: | |
app: nginx-exporter-server | |
replicas: 1 |
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
#troubleshooting commands | |
lvdisplay | |
vgdisplay | |
pvdisplay | |
pvs | |
lvs | |
fdisk -l | |
lsblk | |
#resize +100% |
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
=========#gitlab-runner============= | |
[[runners]] | |
name = "gitlab" | |
url = "https://gitlab.local" | |
token = "7PeUFFpUPTA9P1NgzfW2" | |
tls-ca-file = "/etc/gitlab/ssl/gitlab.local.crt" | |
executor = "docker" | |
environment = ["DOCKER_TLS_CERTDIR="] | |
[runners.custom_build_dir] | |
[runners.docker] |
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
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
namespace: default | |
name: service-reader | |
rules: | |
- apiGroups: [""] # "" indicates the core API group | |
resources: ["services"] | |
verbs: ["get", "watch", "list"] |
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
1)oc create user nurlan | |
2)htpasswd /etc/origin/master/htpasswd nurlan | |
3)oc create identity HTPasswdPasswordIdentityProvider:nurlan | |
4) на всех мастерах вставить логин и пароль из /etc/origin/master/htpasswd | |
5)oc adm policy add-role-to-user admin nurlan -n mynamespace - дать роль admin пользователю nurlan в NS mynamespace |
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
pcs cluster auth 192.168.0.116 192.168.0.117 -u hacluster -p 123 --force | |
pcs cluster setup --force --name pacemaker1 192.168.0.116 192.168.0.117 | |
pcs status | |
pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=192.168.0.120 cidr_netmask=24 op monitor interval=30s | |
pcs resource delete VirtualIP |
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
================================================SRV-1======================================================= | |
! Configuration File for keepalived | |
global_defs { | |
router_id NGINX_MASTER | |
} | |
vrrp_instance NGINX_VRRP_1 { | |
state MASTER | |
interface enp0s3 |
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
Пример использования curator для автоматического удаления индексов старше 4 дней. | |
Software versions: | |
curator: 5.8.1 (https://www.elastic.co/guide/en/elasticsearch/client/curator/current/yum-repository.html) | |
ElasticSearch: 7.5.0 | |
1. curator --config /etc/elasticsearch/curator-clients.yml /etc/elasticsearch/curator-actions.yml - запуска куратора | |
0 2 * * * /usr/local/bin/curator --config /etc/elasticsearch/curator/client.yml /etc/elasticsearch/curator/action.yml |
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
=================Filebeat===7.6.2=======/etc/filebeat/filebeat.yml=========================== | |
filebeat.inputs: | |
- type: log | |
enabled: true | |
paths: | |
- /opt/IBM/WebSphere/AppServer/V85/ND/profiles/AppSrv01/logs/Member1/SystemOut.log | |
filebeat.config.modules: | |
path: ${path.config}/modules.d/*.yml |
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
docker run -d --name gitlab-runner --restart always -v /srv/gitlab-runner/config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest |