add files
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10.11
|
||||
container_name: pdns-mariadb
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: "SuperSecretRootPassword"
|
||||
MYSQL_DATABASE: "powerdns"
|
||||
MYSQL_USER: "powerdns"
|
||||
MYSQL_PASSWORD: "StrongUserPassword"
|
||||
volumes:
|
||||
- ./mariadb-data:/var/lib/mysql
|
||||
networks:
|
||||
- pdns-net
|
||||
|
||||
powerdns:
|
||||
image: pschiffe/pdns-mysql:latest
|
||||
container_name: pdns-server
|
||||
restart: always
|
||||
depends_on:
|
||||
- mariadb
|
||||
ports:
|
||||
- "53:53/tcp"
|
||||
- "53:53/udp"
|
||||
- "8081:8081"
|
||||
environment:
|
||||
PDNS_gmysql_host: "mariadb"
|
||||
PDNS_gmysql_port: "3306"
|
||||
PDNS_gmysql_user: "powerdns"
|
||||
PDNS_gmysql_password: "StrongUserPassword"
|
||||
PDNS_gmysql_dbname: "powerdns"
|
||||
# PDNS_master: "yes" ← УДАЛЕНО! Больше не нужно
|
||||
PDNS_api: "yes"
|
||||
PDNS_api_key: "MySecretApiKey123"
|
||||
PDNS_webserver: "yes"
|
||||
PDNS_webserver_address: "0.0.0.0"
|
||||
PDNS_webserver_port: "8081"
|
||||
PDNS_webserver_allow_from: "0.0.0.0/0"
|
||||
PDNS_default_soa_content: "ns1.lan hostmaster.lan 0 10800 3600 604800 3600"
|
||||
PDNS_default_ttl: "3600"
|
||||
PDNS_local_address: "0.0.0.0"
|
||||
PDNS_local_port: "53"
|
||||
networks:
|
||||
- pdns-net
|
||||
|
||||
pdns-admin:
|
||||
image: powerdnsadmin/pda-legacy:latest
|
||||
container_name: pdns-admin
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:80"
|
||||
depends_on:
|
||||
- powerdns
|
||||
environment:
|
||||
PDA_DB_HOST: "mariadb"
|
||||
PDA_DB_PORT: "3306"
|
||||
PDA_DB_USER: "powerdns"
|
||||
PDA_DB_PASSWORD: "StrongUserPassword"
|
||||
PDA_DB_NAME: "powerdnsadmin"
|
||||
PDA_PDNS_API_URL: "http://powerdns:8081/"
|
||||
PDA_PDNS_API_KEY: "MySecretApiKey123"
|
||||
networks:
|
||||
- pdns-net
|
||||
|
||||
networks:
|
||||
pdns-net:
|
||||
driver: bridge
|
||||
@@ -19,7 +19,7 @@ cat /proc/sys/vm/max_map_count
|
||||
После обновления и установки жабы, лучше всего перезагрузится. Далее мы качаем архив с опенсерчем с оффсайта
|
||||
```
|
||||
wget https://artifacts.opensearch.org/releases/bundle/opensearch/3.6.0/opensearch-3.6.0-linux-x64.deb
|
||||
sudo env OPENSEARCH_INITIAL_ADMIN_PASSWORD=5ruXurur! dpkg -i opensearch-3.6.0-linux-x64.
|
||||
sudo env OPENSEARCH_INITIAL_ADMIN_PASSWORD=5ruXurur! dpkg -i opensearch-3.6.0-linux-x64.deb
|
||||
sudo systemctl enable opensearch
|
||||
```
|
||||
|
||||
@@ -27,3 +27,15 @@ sudo systemctl enable opensearch
|
||||
После завершения подготовки требуется нарисовать кофниг. Конфиг имеет формат YAML и различается в зависимости от кластера или стендэлон опенсерча
|
||||
|
||||
|
||||
mv /etc/opensearch/opensearch.yml /etc/opensearch/opensearch.yml.back
|
||||
|
||||
rm /etc/opensearch/*.pem
|
||||
|
||||
vim /etc/opensearch/opensearch.yml
|
||||
|
||||
systemctl start opensearch
|
||||
|
||||
|
||||
wget https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/3.6.0/opensearch-dashboards-3.6.0-linux-x64.deb
|
||||
|
||||
$2y$12$7.7YOQi6.CEN1VSNXg3BqefgQLEeqDbsqxNBNhY1tgZ085q1eZeCK
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
cluster.name: kal-cluster
|
||||
node.name: opensearch-1
|
||||
node.roles: [ cluster_manager, data ]
|
||||
cluster.initial_cluster_manager_nodes: ["opensearch-cluster_manager"]
|
||||
discovery.seed_hosts: ["opensearch-1.sailor.com", "opensearch-2.sailor.com", "opensearch-3.sailor.com"]
|
||||
network.host: 0.0.0.0
|
||||
http.port: 9200
|
||||
plugins.security.disabled: true
|
||||
# Path to directory where to store the data (separate multiple locations by comma):
|
||||
path.data: /var/lib/opensearch
|
||||
# Path to log files:
|
||||
path.logs: /var/log/opensearch
|
||||
+1
-1
@@ -5,7 +5,7 @@ cluster.initial_cluster_manager_nodes: ["opensearch-cluster_manager"]
|
||||
discovery.seed_hosts: ["opensearch-1.sailor.com", "opensearch-2.sailor.com", "opensearch-3.sailor.com"]
|
||||
network.host: 0.0.0.0
|
||||
http.port: 9200
|
||||
plugins.security.disabled: false
|
||||
plugins.security.disabled: true
|
||||
# Path to directory where to store the data (separate multiple locations by comma):
|
||||
path.data: /var/lib/opensearch
|
||||
# Path to log files:
|
||||
@@ -0,0 +1,12 @@
|
||||
cluster.name: kal-cluster
|
||||
node.name: opensearch-3
|
||||
node.roles: [ cluster_manager, data ]
|
||||
cluster.initial_cluster_manager_nodes: ["opensearch-cluster_manager"]
|
||||
discovery.seed_hosts: ["opensearch-1.sailor.com", "opensearch-2.sailor.com", "opensearch-3.sailor.com"]
|
||||
network.host: 0.0.0.0
|
||||
http.port: 9200
|
||||
plugins.security.disabled: true
|
||||
# Path to directory where to store the data (separate multiple locations by comma):
|
||||
path.data: /var/lib/opensearch
|
||||
# Path to log files:
|
||||
path.logs: /var/log/opensearch
|
||||
@@ -0,0 +1,40 @@
|
||||
cluster.name: kal-cluster
|
||||
node.name: opensearch-2
|
||||
node.roles: [ cluster_manager, data ]
|
||||
cluster.initial_cluster_manager_nodes: ["opensearch-cluster_manager"]
|
||||
discovery.seed_hosts: ["opensearch-1.sailor.com", "opensearch-2.sailor.com", "opensearch-3.sailor.com"]
|
||||
network.host: 0.0.0.0
|
||||
http.port: 9200
|
||||
plugins.security.nodes_dn:
|
||||
- "CN=opensearch-1.sailor.com,OU=Lab,O=Sailor Lab,L=Moscow,ST=Moscow,C=RU"
|
||||
- "CN=opensearch-2.sailor.com,OU=Lab,O=Sailor Lab,L=Moscow,ST=Moscow,C=RU"
|
||||
- "CN=opensearch-3.sailor.com,OU=Lab,O=Sailor Lab,L=Moscow,ST=Moscow,C=RU"
|
||||
plugins.security.ssl.transport.keystore_filepath: /etc/opensearch/ssl/keystore.jks
|
||||
plugins.security.ssl.transport.keystore_password: Passw0rd
|
||||
plugins.security.ssl.transport.keystore_keypassword: Passw0rd
|
||||
plugins.security.ssl.transport.truststore_filepath: /etc/opensearch/ssl/truststore.jks
|
||||
plugins.security.ssl.transport.truststore_password: Passw0rd
|
||||
transport.ssl.enforce_hostname_verification: false
|
||||
|
||||
plugins.security.ssl.http.enabled: true #Whether to enable TLS on the REST layer. If enabled, only HTTPS is allowed. Optional. Default is false.
|
||||
plugins.security.ssl.http.keystore_filepath: /etc/opensearch/ssl/keystore.jks
|
||||
plugins.security.ssl.http.keystore_password: Passw0rd
|
||||
plugins.security.ssl.http.keystore_keypassword: Passw0rd
|
||||
plugins.security.ssl.http.truststore_filepath: /etc/opensearch/ssl/truststore.jks
|
||||
plugins.security.ssl.http.truststore_password: Passw0rd
|
||||
plugins.security.authcz.admin_dn:
|
||||
- "EMAILADDRESS=medik19999@mail.ru,CN=grigory,OU=Lab,O=Sailor Lab,L=Moscow,ST=Moscow,C=RU"
|
||||
|
||||
plugins.security.ssl.transport.pemcert_filepath: /etc/opensearch/ssl/node1.pem
|
||||
plugins.security.ssl.transport.pemkey_filepath: /etc/opensearch/ssl/node1-key.pem
|
||||
plugins.security.ssl.transport.pemtrustedcas_filepath: /etc/opensearch/ssl/root-ca.pem
|
||||
plugins.security.ssl.transport.enforce_hostname_verification: false
|
||||
plugins.security.ssl.http.enabled: true
|
||||
plugins.security.ssl.http.pemcert_filepath: /etc/opensearch/ssl/node1.pem
|
||||
plugins.security.ssl.http.pemkey_filepath: /etc/opensearch/ssl/node1-key.pem
|
||||
plugins.security.ssl.http.pemtrustedcas_filepath: /etc/opensearch/ssl/root-ca.pem
|
||||
|
||||
# Path to directory where to store the data (separate multiple locations by comma):
|
||||
path.data: /var/lib/opensearch
|
||||
# Path to log files:
|
||||
path.logs: /var/log/opensearch
|
||||
@@ -0,0 +1,32 @@
|
||||
cluster.name: kal-cluster
|
||||
node.name: opensearch-2
|
||||
node.roles: [ cluster_manager, data ]
|
||||
cluster.initial_cluster_manager_nodes: ["opensearch-cluster_manager"]
|
||||
discovery.seed_hosts: ["opensearch-1.sailor.com", "opensearch-2.sailor.com", "opensearch-3.sailor.com"]
|
||||
network.host: 0.0.0.0
|
||||
http.port: 9200
|
||||
plugins.security.nodes_dn:
|
||||
- "CN=opensearch-1.sailor.com,OU=Lab,O=Sailor Lab,L=Moscow,ST=Moscow,C=RU"
|
||||
- "CN=opensearch-2.sailor.com,OU=Lab,O=Sailor Lab,L=Moscow,ST=Moscow,C=RU"
|
||||
- "CN=opensearch-3.sailor.com,OU=Lab,O=Sailor Lab,L=Moscow,ST=Moscow,C=RU"
|
||||
plugins.security.ssl.transport.keystore_filepath: /etc/opensearch/ssl/keystore.jks
|
||||
plugins.security.ssl.transport.keystore_password: Passw0rd
|
||||
plugins.security.ssl.transport.keystore_keypassword: Passw0rd
|
||||
plugins.security.ssl.transport.truststore_filepath: /etc/opensearch/ssl/truststore.jks
|
||||
plugins.security.ssl.transport.truststore_password: Passw0rd
|
||||
|
||||
plugins.security.ssl.http.enabled: true #Whether to enable TLS on the REST layer. If enabled, only HTTPS is allowed. Optional. Default is false.
|
||||
plugins.security.ssl.http.keystore_filepath: /etc/opensearch/ssl/keystore.jks
|
||||
plugins.security.ssl.http.keystore_password: Passw0rd
|
||||
plugins.security.ssl.http.keystore_keypassword: Passw0rd
|
||||
plugins.security.ssl.http.truststore_filepath: /etc/opensearch/ssl/truststore.jks
|
||||
plugins.security.ssl.http.truststore_password: Passw0rd
|
||||
plugins.security.authcz.admin_dn:
|
||||
- "EMAILADDRESS=medik19999@mail.ru,CN=grigory,OU=Lab,O=Sailor Lab,L=Moscow,ST=Moscow,C=RU"
|
||||
|
||||
|
||||
|
||||
# Path to directory where to store the data (separate multiple locations by comma):
|
||||
path.data: /var/lib/opensearch
|
||||
# Path to log files:
|
||||
path.logs: /var/log/opensearch
|
||||
@@ -5,3 +5,9 @@
|
||||
Из важного записать все ноды в файлы хостс или поднять свой днс
|
||||
|
||||
27.04.2026 Решил поднимать свой днс. Помучил нейронки. Из предлженных вариантов только powerdns имеет апи и тераформ провайдера. Подолбится ли с базовой инфрой? Или попытатся обойтись костылями?
|
||||
04.05.2026 Днс сработал и решил 1 проблему. Как приятно держать свою инфру. Выяснил что с винды не создавалась тачка потому как был включен впн, а я забыл что прокс виртуальный с винды и трафик тунелируется через вмваре бридж прямо в тунель. Собрал кластер без секюрити плагина. Установил дашборду. Столкнулся с пробелмой авторизации. Пока отключил все настройки безопасности на серче и дашборде.
|
||||
Шаг 0 выполнен. Теперь надо поднять все то же самое но с включенным секьюрити плагином. И прокинуть пользаков в опенсерч.
|
||||
Так же можно задуматься какие логи я буду писать в опенсерч. Для начала можно попробовать напрямую логи самого серча
|
||||
Для сбора используем fluenbit. Шаг 0 заставить это как то работать
|
||||
|
||||
На заметку поискать мб какую то Пошечку для автоматизации выпуска сертификатов и их доставки на сервера
|
||||
@@ -0,0 +1,2 @@
|
||||
Ты devops инженер. Твоя основная специальность это автоматизация и настройка серверов.
|
||||
Ты занят настройкой opensearch.
|
||||
Reference in New Issue
Block a user