Added: template for NSQ cluster
This commit is contained in:
parent
04b6ea6750
commit
495d7efdc0
14
templates/nsq/0/README.md
Normal file
14
templates/nsq/0/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Nsq.io
|
||||
|
||||
### Info:
|
||||
|
||||
This template creates, scale in and scale out a nsqd cluster on top of Rancher. By default there are 3 static nsqlookupd provisioned.
|
||||
NSQD can be reached internally by using the nsq-lb Loadbalancer or directly.
|
||||
|
||||
### Usage:
|
||||
|
||||
Select NSQ from catalog.
|
||||
|
||||
Enter the number of nodes for your NSQD cluster.
|
||||
|
||||
Click deploy.
|
43
templates/nsq/0/docker-compose.yml.tpl
Normal file
43
templates/nsq/0/docker-compose.yml.tpl
Normal file
@ -0,0 +1,43 @@
|
||||
nsqlookupd01:
|
||||
image: nsqio/nsq
|
||||
command: /nsqlookupd
|
||||
nsqlookupd02:
|
||||
image: nsqio/nsq
|
||||
command: /nsqlookupd
|
||||
nsqlookupd03:
|
||||
image: nsqio/nsq
|
||||
command: /nsqlookupd
|
||||
nsqd:
|
||||
image: nsqio/nsq
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- nsqd --data-path=/data --lookupd-tcp-address=nsqlookupd01:4160 --lookupd-tcp-address=nsqlookupd02:4160 --lookupd-tcp-address=nsqlookupd03:4160 -broadcast-address=$$HOSTNAME
|
||||
labels:
|
||||
io.rancher.scheduler.affinity:host_label_soft: nsqd=true
|
||||
io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
|
||||
io.rancher.sidekicks: data
|
||||
io.rancher.container.hostname_override: container_name
|
||||
volumes_from:
|
||||
- data
|
||||
nsqadmin:
|
||||
image: nsqio/nsq
|
||||
command: /nsqadmin --lookupd-http-address=nsqlookupd01:4161 --lookupd-http-address=nsqlookupd02:4161 --lookupd-http-address=nsqlookupd03:4161
|
||||
nsq-lb:
|
||||
image: rancher/lb-service-haproxy:v0.7.9
|
||||
ports:
|
||||
- 4150:4150/tcp
|
||||
- 4151:4151/tcp
|
||||
- 4171:4171/tcp
|
||||
labels:
|
||||
io.rancher.container.agent.role: environmentAdmin
|
||||
io.rancher.container.create_agent: 'true'
|
||||
io.rancher.scheduler.global: 'true'
|
||||
data:
|
||||
image: busybox
|
||||
command: /bin/true
|
||||
net: none
|
||||
volumes:
|
||||
- /data
|
||||
labels:
|
||||
io.rancher.container.start_once: 'true'
|
64
templates/nsq/0/rancher-compose.yml
Normal file
64
templates/nsq/0/rancher-compose.yml
Normal file
@ -0,0 +1,64 @@
|
||||
version: '2'
|
||||
catalog:
|
||||
name: NSQD
|
||||
version: v1.0.0-compat
|
||||
questions:
|
||||
- variable: "NSQD_SCALE"
|
||||
description: "Number of NSQD nodes."
|
||||
label: "Nsqd Nodes"
|
||||
required: true
|
||||
default: "3"
|
||||
type: "int"
|
||||
- variable: "NSQADMIN_SCALE"
|
||||
description: "Number of NSQ Admin nodes."
|
||||
label: "Nsqadmin Nodes"
|
||||
required: true
|
||||
default: "3"
|
||||
type: "int"
|
||||
services:
|
||||
nsqlookupd01:
|
||||
scale: 1
|
||||
start_on_create: true
|
||||
nsqlookupd02:
|
||||
scale: 1
|
||||
start_on_create: true
|
||||
nsqlookupd03:
|
||||
scale: 1
|
||||
start_on_create: true
|
||||
nsqadmin:
|
||||
scale: ${NSQADMIN_SCALE}
|
||||
start_on_create: true
|
||||
data:
|
||||
scale: ${NSQD_SCALE}
|
||||
start_on_create: true
|
||||
nsq-lb:
|
||||
start_on_create: true
|
||||
lb_config:
|
||||
certs: []
|
||||
port_rules:
|
||||
- priority: 1
|
||||
protocol: tcp
|
||||
service: nsqd
|
||||
source_port: 4150
|
||||
target_port: 4150
|
||||
- priority: 2
|
||||
protocol: http
|
||||
service: nsqd
|
||||
source_port: 4151
|
||||
target_port: 4151
|
||||
- priority: 3
|
||||
protocol: http
|
||||
service: nsqadmin
|
||||
source_port: 4171
|
||||
target_port: 4171
|
||||
health_check:
|
||||
response_timeout: 2000
|
||||
healthy_threshold: 2
|
||||
port: 42
|
||||
unhealthy_threshold: 3
|
||||
initializing_timeout: 60000
|
||||
interval: 2000
|
||||
reinitializing_timeout: 60000
|
||||
nsqd:
|
||||
scale: ${NSQD_SCALE}
|
||||
start_on_create: true
|
BIN
templates/nsq/catalogIcon-nsq.png
Normal file
BIN
templates/nsq/catalogIcon-nsq.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.1 KiB |
7
templates/nsq/config.yml
Normal file
7
templates/nsq/config.yml
Normal file
@ -0,0 +1,7 @@
|
||||
name: NSQ
|
||||
description: |
|
||||
A realtime distributed messaging platform
|
||||
version: v1.0.0-compat
|
||||
category: Message queues
|
||||
maintainer: "Matthias Schneider <ms@wck.biz>"
|
||||
projectURL: https://nsq.io/
|
Loading…
x
Reference in New Issue
Block a user