add opensearch addons
This commit is contained in:
3
opensearch-nginx-lb/Dockerfile
Normal file
3
opensearch-nginx-lb/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
ARG BASE_IMAGE=nginx:stable
|
||||
FROM ${BASE_IMAGE}
|
||||
COPY rootfs/ /
|
40
opensearch-nginx-lb/config.json
Normal file
40
opensearch-nginx-lb/config.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "OpenSearch NGINX Load Balancer",
|
||||
"version": "1.0.0",
|
||||
"slug": "opensearch-nginx-lb",
|
||||
"description": "NGINX load balancer for OpenSearch coordinator nodes.",
|
||||
"arch": [
|
||||
"amd64",
|
||||
"armv7",
|
||||
"arm64"
|
||||
],
|
||||
"startup": "services",
|
||||
"boot": "auto",
|
||||
"host_network": true,
|
||||
"map": [
|
||||
[
|
||||
"config",
|
||||
"./config",
|
||||
"rw"
|
||||
]
|
||||
],
|
||||
"options": {
|
||||
"lb_port": 9200,
|
||||
"coordinator_nodes": [
|
||||
"os-coord-1",
|
||||
"os-coord-2"
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
"lb_port": "int",
|
||||
"coordinator_nodes": [
|
||||
"list",
|
||||
[
|
||||
"str"
|
||||
]
|
||||
]
|
||||
},
|
||||
"ports": {
|
||||
"9200/tcp": 9200
|
||||
}
|
||||
}
|
13
opensearch-nginx-lb/rootfs/config/nginx.conf
Normal file
13
opensearch-nginx-lb/rootfs/config/nginx.conf
Normal file
@@ -0,0 +1,13 @@
|
||||
events {}
|
||||
http {
|
||||
upstream opensearch_coord {
|
||||
server os-coord-1:9200;
|
||||
server os-coord-2:9200;
|
||||
}
|
||||
server {
|
||||
listen 9200;
|
||||
location / {
|
||||
proxy_pass http://opensearch_coord;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
#!/command/execlineb -S0
|
||||
# Prevent restart loops; allow clean exit
|
||||
exit 0
|
@@ -0,0 +1,4 @@
|
||||
#!/command/with-contenv bash
|
||||
set -euo pipefail
|
||||
echo "[s6-run] Starting NGINX load balancer"
|
||||
exec nginx -g 'daemon off;'
|
Reference in New Issue
Block a user