Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GITHUB-35] Give bigger control over server.properties #34

Merged
merged 1 commit into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ sudo: required
language: python
python:
- 2.7
cache: pip

branches:
only:
- develop
- master

env:
- ANSIBLE_INSTALL_VERSION=2.5.9
- ANSIBLE_INSTALL_VERSION=2.6.6
- ANSIBLE_INSTALL_VERSION=2.4.6.0
- ANSIBLE_INSTALL_VERSION=2.5.11
- ANSIBLE_INSTALL_VERSION=2.6.7
- ANSIBLE_INSTALL_VERSION=2.7.1

services:
Expand All @@ -26,7 +28,7 @@ before_install:
- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-ce

install:
- make deps
- make .venv

script:
- make test
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0
v3.0
25 changes: 12 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
ANSIBLE_INSTALL_VERSION ?= 2.5.9
ANSIBLE_INSTALL_VERSION ?= 2.6.7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we definitely need these changes to the Makefile? It's fine if so but we will need to push these updates to the other roles at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the changes are ok, I will send PR to scaffold repo

PATH := $(PWD)/.venv_ansible$(ANSIBLE_INSTALL_VERSION)/bin:$(shell printenv PATH)
SHELL := env PATH=$(PATH) /bin/bash

.DEFAULT_GOAL := help
.PHONY: all clean destroy help test


_check_venv:
@if [ ! -e .venv_ansible$(ANSIBLE_INSTALL_VERSION)/bin/activate ]; then \
echo -e "\033[0;31mERROR: No virtualenv found - run 'make deps' first\033[0m"; \
false; \
fi


## Make deps, test
all: deps test


## Activate the virtualenv
activate: _check_venv
activate: .venv_ansible$(ANSIBLE_INSTALL_VERSION)
@echo -e "\033[0;32mINFO: Activating venv_ansible$(ANSIBLE_INSTALL_VERSION) (ctrl-d to exit)\033[0m"
@exec $(SHELL) --init-file .venv_ansible$(ANSIBLE_INSTALL_VERSION)/bin/activate

Expand All @@ -42,18 +35,24 @@ destroy:
echo -e "\033[0;33mWARNING: molecule not found - either remove potential containers manually or run 'make deps' first\033[0m"; \
fi


## Login to docker container named '%'
login_%: _check_venv
login_%: .venv_ansible$(ANSIBLE_INSTALL_VERSION)
@echo -e "\033[0;32mINFO: Logging into $(subst login_,,$@) (ctrl-d to exit)\033[0m"
@.venv_ansible$(ANSIBLE_INSTALL_VERSION)/bin/molecule login --host $(subst login_,,$@)


## Run 'molecule test --destroy=never' (run 'make destroy' to destroy containers)
test: _check_venv
test: .venv_ansible$(ANSIBLE_INSTALL_VERSION)
@.venv_ansible$(ANSIBLE_INSTALL_VERSION)/bin/molecule test --destroy=never


# shortcut for creating virtualenv
.venv: .venv_ansible$(ANSIBLE_INSTALL_VERSION)


## Create virtualenv, install dependencies
deps:
.venv_ansible$(ANSIBLE_INSTALL_VERSION):
@if (python -V 2>&1 | grep -qv "Python 2.7"); then \
echo -e "\033[0;31mERROR: Only Python 2.7 is supported at this stage\033[0m"; \
false; \
Expand All @@ -66,7 +65,7 @@ deps:


## Run 'make test' on any file change
watch: _check_venv
watch: .venv_ansible$(ANSIBLE_INSTALL_VERSION)
@while sleep 1; do \
find defaults/ files/ handlers/ meta/ molecule/*/*.yml molecule/*/test/*.py tasks/ templates/ vars/ 2> /dev/null \
| entr -d make test; \
Expand Down
33 changes: 3 additions & 30 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,26 @@
---

sansible_kafka_apache_mirror: https://archive.apache.org/dist/
sansible_kafka_auto_create_topics: "false"
sansible_kafka_aws_cluster_assigned_id_enabled: no
sansible_kafka_aws_cluster_assigned_id_tag_name: instanceindex
# If enabled AWS will be used to figure out which host and id should be used
# Note that you must install the AWS CLI tools to use this feature
sansible_kafka_aws_cluster_autodiscover_enabled: no
sansible_kafka_aws_cluster_autodiscover_hosts: []
sansible_kafka_aws_cluster_autodiscover_id_tag_name: KafkaID
sansible_kafka_aws_cluster_autodiscover_lookup_filter: "Name=tag:Environment,Values=dev Name=tag:Role,Values=kafka"
sansible_kafka_aws_cluster_autodiscover_r53_zone_id: ~
sansible_kafka_aws_delay: 5
sansible_kafka_aws_retries: 3
sansible_kafka_conf_dir: /home/kafka/etc
sansible_kafka_controlled_shutdown_enable: true
sansible_kafka_controlled_shutdown_max_retries: 3
sansible_kafka_controlled_shutdown_retry_backoff_ms: 2000
sansible_kafka_data_dir: /home/kafka/data
sansible_kafka_default_replication_factor: 1
sansible_kafka_group: kafka
sansible_kafka_heap_opts: "-Xmx{{ (ansible_memtotal_mb / 2) | int }}m -Xms{{ (ansible_memtotal_mb / 2) | int }}m"
sansible_kafka_id: 1
sansible_kafka_interface_advertise: ~
sansible_kafka_interface_bind: ~
sansible_kafka_java_vendor: openjdk
sansible_kafka_java_version: 8
sansible_kafka_jmx_port: 9999
sansible_kafka_log_cleanup_interval_mins: 1
sansible_kafka_log_dir: /home/kafka/log
sansible_kafka_log_flush_interval_messages: 10000
sansible_kafka_log_flush_interval_ms: 1000
sansible_kafka_log_level: WARN
sansible_kafka_log_retention_bytes: 104857600 # 100 M
sansible_kafka_log_retention_hours: 24
sansible_kafka_log_segment_bytes: 104857600
sansible_kafka_max_open_files: 4098
sansible_kafka_num_io_threads: 2
sansible_kafka_num_network_threads: 2
sansible_kafka_num_partitions: 2
sansible_kafka_port: 9092
sansible_kafka_socket_receive_buffer_bytes: 1048576
sansible_kafka_socket_request_max_bytes: 104857600
sansible_kafka_socket_send_buffer_bytes: 1048576
sansible_kafka_server_properties: {}
sansible_kafka_tarball_location: /home/kafka/tmp
sansible_kafka_user: kafka
sansible_kafka_version_kafka: 0.10.1.1
sansible_kafka_version_kafka: 2.0.0
sansible_kafka_version_scala: 2.11
sansible_kafka_wait_for_kafka_port: 120
sansible_kafka_zookeeper_connection_timeout_ms: 1000000
sansible_kafka_zookeeper_hosts:
- localhost
- localhost:2181
136 changes: 0 additions & 136 deletions files/aws_cluster_autodiscover

This file was deleted.

Loading