Merge pull request #726 from rawmind0/master
Minor fixes to kafka and zookeeper packages
This commit is contained in:
		
						commit
						fae924d76a
					
				@ -23,6 +23,7 @@
 | 
				
			|||||||
- kafka_auto_create_topics="true"		# kafka auto create topics
 | 
					- kafka_auto_create_topics="true"		# kafka auto create topics
 | 
				
			||||||
- kafka_replication_factor=1 			# Kafka replication factor
 | 
					- kafka_replication_factor=1 			# Kafka replication factor
 | 
				
			||||||
- kafka_pub_ip= < true | false >		# Advertise public ip to zookeeper.
 | 
					- kafka_pub_ip= < true | false >		# Advertise public ip to zookeeper.
 | 
				
			||||||
 | 
					- host_label=""                         # Host label where to deploy kafka.
 | 
				
			||||||
- zk_link="kafka-zk/zk" 				# zookeeper stack/service to connect to.
 | 
					- zk_link="kafka-zk/zk" 				# zookeeper stack/service to connect to.
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 Click deploy.
 | 
					 Click deploy.
 | 
				
			||||||
 | 
				
			|||||||
@ -1,46 +0,0 @@
 | 
				
			|||||||
broker:
 | 
					 | 
				
			||||||
  tty: true
 | 
					 | 
				
			||||||
  image: rawmind/alpine-kafka:1.0.0-2
 | 
					 | 
				
			||||||
  volumes_from:
 | 
					 | 
				
			||||||
    - broker-volume
 | 
					 | 
				
			||||||
    - broker-conf
 | 
					 | 
				
			||||||
  environment:
 | 
					 | 
				
			||||||
    - JVMFLAGS=-Xmx${kafka_mem}m -Xms${kafka_mem}m
 | 
					 | 
				
			||||||
    - CONFD_INTERVAL=${kafka_interval}
 | 
					 | 
				
			||||||
    - ZK_SERVICE=${zk_link}
 | 
					 | 
				
			||||||
    - KAFKA_DELETE_TOPICS=${kafka_delete_topics}
 | 
					 | 
				
			||||||
    - KAFKA_LOG_DIRS=${kafka_log_dir}
 | 
					 | 
				
			||||||
    - KAFKA_LOG_RETENTION_HOURS=${kafka_log_retention}
 | 
					 | 
				
			||||||
    - KAFKA_NUM_PARTITIONS=${kafka_num_partitions}
 | 
					 | 
				
			||||||
    - ADVERTISE_PUB_IP=${kafka_pub_ip}
 | 
					 | 
				
			||||||
    - KAFKA_AUTO_CREATE_TOPICS=${kafka_auto_create_topics}
 | 
					 | 
				
			||||||
    - KAFKA_REPLICATION_FACTOR=${kafka_replication_factor}
 | 
					 | 
				
			||||||
  external_links:
 | 
					 | 
				
			||||||
    - ${zk_link}:zk
 | 
					 | 
				
			||||||
  labels: 
 | 
					 | 
				
			||||||
    io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
 | 
					 | 
				
			||||||
    io.rancher.container.hostname_override: container_name
 | 
					 | 
				
			||||||
    io.rancher.sidekicks: broker-volume, broker-conf
 | 
					 | 
				
			||||||
broker-conf:
 | 
					 | 
				
			||||||
  net: none
 | 
					 | 
				
			||||||
  labels:
 | 
					 | 
				
			||||||
    io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
 | 
					 | 
				
			||||||
    io.rancher.container.hostname_override: container_name
 | 
					 | 
				
			||||||
    io.rancher.container.start_once: true
 | 
					 | 
				
			||||||
  image: rawmind/rancher-kafka:0.11.0.0-1
 | 
					 | 
				
			||||||
  volumes:
 | 
					 | 
				
			||||||
    - /opt/tools
 | 
					 | 
				
			||||||
broker-volume:
 | 
					 | 
				
			||||||
  net: none
 | 
					 | 
				
			||||||
  labels:
 | 
					 | 
				
			||||||
    io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
 | 
					 | 
				
			||||||
    io.rancher.container.hostname_override: container_name
 | 
					 | 
				
			||||||
    io.rancher.container.start_once: true
 | 
					 | 
				
			||||||
  environment:
 | 
					 | 
				
			||||||
    - SERVICE_UID=10003
 | 
					 | 
				
			||||||
    - SERVICE_GID=10003
 | 
					 | 
				
			||||||
    - SERVICE_VOLUME=${kafka_log_dir}
 | 
					 | 
				
			||||||
  volumes:
 | 
					 | 
				
			||||||
    - ${kafka_log_dir}
 | 
					 | 
				
			||||||
  volume_driver: local
 | 
					 | 
				
			||||||
  image: rawmind/alpine-volume:0.0.2-1
 | 
					 | 
				
			||||||
							
								
								
									
										63
									
								
								templates/kafka/4/docker-compose.yml.tpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								templates/kafka/4/docker-compose.yml.tpl
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,63 @@
 | 
				
			|||||||
 | 
					version: '2'
 | 
				
			||||||
 | 
					services:
 | 
				
			||||||
 | 
					  broker:
 | 
				
			||||||
 | 
					    tty: true
 | 
				
			||||||
 | 
					    image: rawmind/alpine-kafka:1.0.0-2
 | 
				
			||||||
 | 
					    volumes_from:
 | 
				
			||||||
 | 
					      - broker-volume
 | 
				
			||||||
 | 
					      - broker-conf
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      - JVMFLAGS=-Xmx${kafka_mem}m -Xms${kafka_mem}m
 | 
				
			||||||
 | 
					      - CONFD_INTERVAL=${kafka_interval}
 | 
				
			||||||
 | 
					      - ZK_SERVICE=${zk_link}
 | 
				
			||||||
 | 
					      - KAFKA_DELETE_TOPICS=${kafka_delete_topics}
 | 
				
			||||||
 | 
					      - KAFKA_LOG_DIRS=${kafka_log_dir}
 | 
				
			||||||
 | 
					      - KAFKA_LOG_RETENTION_HOURS=${kafka_log_retention}
 | 
				
			||||||
 | 
					      - KAFKA_NUM_PARTITIONS=${kafka_num_partitions}
 | 
				
			||||||
 | 
					      - ADVERTISE_PUB_IP=${kafka_pub_ip}
 | 
				
			||||||
 | 
					      - KAFKA_AUTO_CREATE_TOPICS=${kafka_auto_create_topics}
 | 
				
			||||||
 | 
					      - KAFKA_REPLICATION_FACTOR=${kafka_replication_factor}
 | 
				
			||||||
 | 
					    external_links:
 | 
				
			||||||
 | 
					      - ${zk_link}:zk
 | 
				
			||||||
 | 
					    labels: 
 | 
				
			||||||
 | 
					      io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
 | 
				
			||||||
 | 
					      io.rancher.container.hostname_override: container_name
 | 
				
			||||||
 | 
					      io.rancher.sidekicks: broker-volume, broker-conf
 | 
				
			||||||
 | 
					    {{- if ne .Values.host_label ""}}
 | 
				
			||||||
 | 
					      io.rancher.scheduler.affinity:host_label: ${host_label}
 | 
				
			||||||
 | 
					    {{- end}}
 | 
				
			||||||
 | 
					  broker-conf:
 | 
				
			||||||
 | 
					    network_mode: none
 | 
				
			||||||
 | 
					    labels:
 | 
				
			||||||
 | 
					      io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
 | 
				
			||||||
 | 
					      io.rancher.container.hostname_override: container_name
 | 
				
			||||||
 | 
					      io.rancher.container.start_once: true
 | 
				
			||||||
 | 
					    {{- if ne .Values.host_label ""}}
 | 
				
			||||||
 | 
					      io.rancher.scheduler.affinity:host_label: ${host_label}
 | 
				
			||||||
 | 
					    {{- end}}
 | 
				
			||||||
 | 
					    image: rawmind/rancher-kafka:0.11.0.0-1
 | 
				
			||||||
 | 
					    volumes:
 | 
				
			||||||
 | 
					      - brokerconfig:/opt/tools
 | 
				
			||||||
 | 
					  broker-volume:
 | 
				
			||||||
 | 
					    network_mode: none
 | 
				
			||||||
 | 
					    labels:
 | 
				
			||||||
 | 
					      io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
 | 
				
			||||||
 | 
					      io.rancher.container.hostname_override: container_name
 | 
				
			||||||
 | 
					      io.rancher.container.start_once: true
 | 
				
			||||||
 | 
					    {{- if ne .Values.host_label ""}}
 | 
				
			||||||
 | 
					      io.rancher.scheduler.affinity:host_label: ${host_label}
 | 
				
			||||||
 | 
					    {{- end}}
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      - SERVICE_UID=10003
 | 
				
			||||||
 | 
					      - SERVICE_GID=10003
 | 
				
			||||||
 | 
					      - SERVICE_VOLUME=${kafka_log_dir}
 | 
				
			||||||
 | 
					    volumes:
 | 
				
			||||||
 | 
					      - brokerdata:${kafka_log_dir}
 | 
				
			||||||
 | 
					    image: rawmind/alpine-volume:0.0.2-1
 | 
				
			||||||
 | 
					volumes:
 | 
				
			||||||
 | 
					  brokerconfig:
 | 
				
			||||||
 | 
					    driver: local
 | 
				
			||||||
 | 
					    per_container: true
 | 
				
			||||||
 | 
					  brokerdata:
 | 
				
			||||||
 | 
					    driver: local
 | 
				
			||||||
 | 
					    per_container: true
 | 
				
			||||||
@ -1,8 +1,9 @@
 | 
				
			|||||||
.catalog:
 | 
					version: '2'
 | 
				
			||||||
 | 
					catalog:
 | 
				
			||||||
  name: Kafka
 | 
					  name: Kafka
 | 
				
			||||||
  version: 1.0.0-rancher1
 | 
					  version: 1.0.0-rancher1
 | 
				
			||||||
  description: |
 | 
					  description: |
 | 
				
			||||||
    (Experimental) Apache Kafka cluster.
 | 
					    Apache Kafka cluster.
 | 
				
			||||||
  minimum_rancher_version: v0.59.0
 | 
					  minimum_rancher_version: v0.59.0
 | 
				
			||||||
  maintainer: "Raul Sanchez <rawmind@gmail.com>"
 | 
					  maintainer: "Raul Sanchez <rawmind@gmail.com>"
 | 
				
			||||||
  uuid: kafka-0
 | 
					  uuid: kafka-0
 | 
				
			||||||
@ -75,6 +76,13 @@
 | 
				
			|||||||
      required: false
 | 
					      required: false
 | 
				
			||||||
      default: false 
 | 
					      default: false 
 | 
				
			||||||
      type: "boolean"
 | 
					      type: "boolean"
 | 
				
			||||||
 | 
					    - variable: host_label
 | 
				
			||||||
 | 
					      label: "Host Label"
 | 
				
			||||||
 | 
					      description: |
 | 
				
			||||||
 | 
					        Host label where deploy kafka. E.G.: 'kafka=true'
 | 
				
			||||||
 | 
					      required: false
 | 
				
			||||||
 | 
					      default: ""
 | 
				
			||||||
 | 
					      type: "string"
 | 
				
			||||||
    - variable: "zk_link"
 | 
					    - variable: "zk_link"
 | 
				
			||||||
      description: |
 | 
					      description: |
 | 
				
			||||||
        Choose the Zookeeper service to use. 
 | 
					        Choose the Zookeeper service to use. 
 | 
				
			||||||
@ -83,14 +91,15 @@
 | 
				
			|||||||
      default: "kafka-zk/zk"
 | 
					      default: "kafka-zk/zk"
 | 
				
			||||||
      required: true
 | 
					      required: true
 | 
				
			||||||
      type: "service"
 | 
					      type: "service"
 | 
				
			||||||
broker:
 | 
					services:
 | 
				
			||||||
  scale: ${kafka_scale}
 | 
					  broker:
 | 
				
			||||||
  retain_ip: true
 | 
					    scale: ${kafka_scale}
 | 
				
			||||||
  health_check:
 | 
					    retain_ip: true
 | 
				
			||||||
    port: 9092
 | 
					    health_check:
 | 
				
			||||||
    interval: 5000
 | 
					      port: 9092
 | 
				
			||||||
    unhealthy_threshold: 3
 | 
					      interval: 5000
 | 
				
			||||||
    request_line: ''
 | 
					      unhealthy_threshold: 3
 | 
				
			||||||
    healthy_threshold: 2
 | 
					      request_line: ''
 | 
				
			||||||
    response_timeout: 5000
 | 
					      healthy_threshold: 2
 | 
				
			||||||
 | 
					      response_timeout: 5000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,7 @@
 | 
				
			|||||||
- ZK_MAX_CLIENT_CXNS="500"
 | 
					- ZK_MAX_CLIENT_CXNS="500"
 | 
				
			||||||
- ZK_SYNC_LIMIT="5"
 | 
					- ZK_SYNC_LIMIT="5"
 | 
				
			||||||
- ZK_TICK_TIME="2000"
 | 
					- ZK_TICK_TIME="2000"
 | 
				
			||||||
 | 
					- host_label=""                         # Host label where to deploy zookeeper.
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 Click deploy.
 | 
					 Click deploy.
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 | 
				
			|||||||
@ -22,6 +22,7 @@ services:
 | 
				
			|||||||
{{- end}}
 | 
					{{- end}}
 | 
				
			||||||
      io.rancher.sidekicks: zk-volume, zk-conf
 | 
					      io.rancher.sidekicks: zk-volume, zk-conf
 | 
				
			||||||
  zk-conf:
 | 
					  zk-conf:
 | 
				
			||||||
 | 
					    network_mode: none
 | 
				
			||||||
    labels:
 | 
					    labels:
 | 
				
			||||||
      io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
 | 
					      io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
 | 
				
			||||||
      io.rancher.container.hostname_override: container_name
 | 
					      io.rancher.container.hostname_override: container_name
 | 
				
			||||||
@ -33,6 +34,7 @@ services:
 | 
				
			|||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - zkconfig:/opt/tools
 | 
					      - zkconfig:/opt/tools
 | 
				
			||||||
  zk-volume:
 | 
					  zk-volume:
 | 
				
			||||||
 | 
					    network_mode: none
 | 
				
			||||||
    labels:
 | 
					    labels:
 | 
				
			||||||
      io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
 | 
					      io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
 | 
				
			||||||
      io.rancher.container.hostname_override: container_name
 | 
					      io.rancher.container.hostname_override: container_name
 | 
				
			||||||
 | 
				
			|||||||
@ -57,10 +57,9 @@ catalog:
 | 
				
			|||||||
      default: 60
 | 
					      default: 60
 | 
				
			||||||
      type: "int"
 | 
					      type: "int"
 | 
				
			||||||
    - variable: host_label
 | 
					    - variable: host_label
 | 
				
			||||||
      label: "Host with Label to put zookeeper on"
 | 
					      label: "Host Label"
 | 
				
			||||||
      description: |
 | 
					      description: |
 | 
				
			||||||
        Host label to use as zookeeper 'value' tag.
 | 
					        Host label where deploy zookeeper. E.G.: 'zookeeper=true'
 | 
				
			||||||
        Example: 'zookeeper=true'
 | 
					 | 
				
			||||||
      required: false
 | 
					      required: false
 | 
				
			||||||
      default: ""
 | 
					      default: ""
 | 
				
			||||||
      type: "string"
 | 
					      type: "string"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user