Skip to content

Instantly share code, notes, and snippets.

View patsevanton's full-sized avatar

Anton Patsev patsevanton

View GitHub Profile
@patsevanton
patsevanton / gist:c414863a127c25aab916271230f1df6e
Created February 16, 2022 07:00
check-connection-by-list-ip
#!/bin/bash
declare -a arr=("10.0.0.01" "10.0.0.2" "10.0.0.3")
#sudo yum install -y nc
for i in "${arr[@]}"
do
nc -w 2 -v "$i" 80 >> 1.txt 2>&1
nc -w 2 -v "$i" 443 >> 1.txt 2>&1
#!/usr/bin/env python
import subprocess
import six
import sys
dns_zone_domain_ru = subprocess.Popen("host -l domain.ru 10.0.0.1", shell=True, stdout=subprocess.PIPE)
list_fqdn = dns_zone_domain_ru.communicate()
for i in list_fqdn:
if isinstance(i, six.string_types):
kubectl create service nodeport webapp-service --tcp=8080:8080 --node-port=30080 --dry-run=client -o yaml
root@controlplane ~$
root@controlplane ~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
controlplane Ready control-plane,master 4m41s v1.20.2
node01 Ready <none> 2m56s v1.20.2
root@controlplane ~$ kubectl describe nodes controlplane | grep -i taint
Taints: <none>
root@controlplane ~$ kubectl get deploy
NAME READY UP-TO-DATE AVAILABLE AGE
blue 5/5 5 5 117s
❯ ansible-playbook -vvv -i ansible/inventory ansible/packer_active_directory.yml
[DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 3.6.9 (default, Jan 26
2021, 15:33:00) [GCC 8.4.0]. This feature will be removed from ansible-core in version 2.12. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
ansible-playbook [core 2.11.4]
config file = /home/apatsev/github/packer-ansible-active-directory-yandex-cloud/ansible.cfg
configured module search path = ['/home/apatsev/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible
ansible collection location = /home/apatsev/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible-playbook
werf --timeout=10m0s helm install --wait airflow --set webserver.defaultUser.password=password,ingress.enabled=true,ingress.hosts[0]=airflow.192.168.22.7.xip.io . --namespace airflow
┌ Waiting for resources elimination: secrets/airflow-fernet-key
└ Waiting for resources elimination: secrets/airflow-fernet-key (0.01 seconds)
Will not track helm hook secret/airflow-fernet-key: Secret kind not supported for tracking
┌ Waiting for release resources to become ready
│ ┌ deploy/airflow-scheduler po/airflow-scheduler-78d9ffb5ff-c5c6j container/wait-for-airflow-migrations logs
│ │ DB_BACKEND=postgresql
│ │ DB_HOST=airflow-postgresql.airflow.svc.cluster.local
werf helm install airflow --wait --set webserver.defaultUser.password=password,ingress.enabled=true,ingress.hosts[0]=airflow.192.168.22.7.xip.io . --namespace airflow
┌ Waiting for resources elimination: secrets/airflow-fernet-key
└ Waiting for resources elimination: secrets/airflow-fernet-key (0.02 seconds)
Will not track helm hook secret/airflow-fernet-key: Secret kind not supported for tracking
┌ Waiting for release resources to become ready
│ ┌ deploy/airflow-statsd po/airflow-statsd-675c854c4-2c4kd container/statsd logs
│ │ level=info ts=2021-04-13T13:22:58.715Z caller=main.go:287 msg="Starting StatsD -> Prometheus Exporter" version="(version=0.17.0, branch=HEAD, revision=b162bd047a2a052e86923eecae9918590d64f0b1)"
│ │ level=info ts=2021-04-13T13:22:58.715Z caller=main.go:288 msg="Build context" context="(go=go1.14.4, user=root@3f80877a62b8, date=20200626-15:20:35)"
werf helm install --wait --set webserver.defaultUser.password=password,ingress.enabled=true,ingress.hosts[0]=airflow.192.168.22.7.xip.io --namespace xxxxx airflow ./
┌ Waiting for resources elimination: secrets/airflow-fernet-key
└ Waiting for resources elimination: secrets/airflow-fernet-key (0.02 seconds)
Will not track helm hook secret/airflow-fernet-key: Secret kind not supported for tracking
┌ Waiting for release resources to become ready
│ ┌ Status progress
│ │ DEPLOYMENT REPLICAS AVAILABLE UP-TO-DATE
│ │ airflow-scheduler 1/1 0 1
2020.08.03 08:52:38.862539 [ 3679 ] {} <Trace> HTTPHandler-factory: HTTP Request for HTTPHandler-factory. Method: POST, Address: 172.26.10.108:54868, User-Agent: Vector/0.9.2 (v0.9.2 x86_64-unknown-linux-musl 2020-06-09), Length: 476, Content Type: application/x-ndjson, Transfer Encoding: identity
2020.08.03 08:52:38.862893 [ 3679 ] {} <Trace> DynamicQueryHandler: Request URI: /?query=INSERT+INTO+%22vector%22.%22logs%22+FORMAT+JSONEachRow
2020.08.03 08:52:38.863226 [ 3679 ] {0f8ee387-9f8e-4e95-9ed2-12dcc3821fca} <Debug> executeQuery: (from 172.26.10.108:54868) INSERT INTO "vector"."logs" FORMAT JSONEachRow
2020.08.03 08:52:38.863421 [ 3679 ] {0f8ee387-9f8e-4e95-9ed2-12dcc3821fca} <Trace> ContextAccess (default): Access granted: INSERT(node_name, timestamp, server_name, user_id, request_full, request_user_agent, request_http_host, request_uri, request_scheme, request_method, request_length, request_time, request_referrer, response_status, response_body_bytes_sent, response_content_type, remote_addr, remote_po