/
zk-image-example.conf
162 lines (142 loc) · 6.77 KB
/
zk-image-example.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# This is an example configuration to create a Zookeeper linode disk image which can
# then be replicated for each node during cluster creation.
# Specify an OS distribution ID or distribution label. All nodes of a cluster
# created based on this image will have this distribution.
#
# Note: Currently, only Ubuntu 14 and Debian 8 distributions are supported by these scripts.
# They will likely not work with other distributions.
#
# List all distribution IDs and labels with:
# "./zookeeper-cluster-linode.sh distributions api_env_production.conf"
#
# List only those distributions containing some string like 'ubuntu' with:
# "./zookeeper-cluster-linode.sh distributions api_env_production.conf ubuntu"
#
# Specify either the distribution ID or the distribution label (case does not matter)
# For Ubuntu 14.04 LTS:
# DISTRIBUTION_FOR_IMAGE=124
# or alternatively
# DISTRIBUTION_FOR_IMAGE="Ubuntu 14.04 LTS"
#
# For Debian 8:
# DISTRIBUTION_FOR_IMAGE=140
# or
# DISTRIBUTION_FOR_IMAGE="Debian 8"
DISTRIBUTION_FOR_IMAGE=124
# A label for the template image, as displayed in "images.list".
LABEL_FOR_IMAGE="Zookeeper 3.4.6 Ubuntu 14.04 LTS"
# Default kernel for image.
# This kernel is used for all nodes of a cluster created from this image.
# List all kernel IDs, labels and hypervisor support with:
# ./zookeeper-cluster-linode.sh kernels api_env_production.conf
#
# List only kernels matching 4.1 with a regular expression:
# ./zookeeper-cluster-linode.sh kernels api_env_production.conf "4\.1.*"
#
# 138 seems to be the constant kernel ID for whatever's the latest 64-bit kernel.
KERNEL_FOR_IMAGE=138
# or alternatively the partial or full kernel label (case does not matter)
# KERNEL_FOR_IMAGE="Latest 64 bit" or KERNEL_FOR_IMAGE="3.18.5-x86_64"
# Specify the preferred datacenter disk image is created.
# This can be any datacenter, but cluster creation may be faster
# if the image is created in the same datacenter where cluster will be
# created.
# Time taken for transferring files from local system is another factor.
# List all datacenters with this command:
# ./zookeeper-cluster-linode.sh datacenters api_env_production.conf
DATACENTER_FOR_IMAGE="newark"
# or alternatively, specify the LOCATION or ABBR returned by avail.datacenters (case does not matter)
# DATACENTER_FOR_IMAGE="Newark, NJ, USA"
# DATACENTER_FOR_IMAGE="newark"
# **** REQUIRED *****
#
# Default root password for all nodes in cluster created from this image.
# It should contains at least two of these four character classes: lower case letters - upper case letters - numbers - punctuation
# It can be overridden in each cluster's config file.
# It should contain at least two of these four character classes:
# lower case letters - upper case letters - numbers - punctuation.
#
# Some special characters may require escape prefixing and the password to be enclosed in
# single or double quotes.
# Some examples:
# - for password with spaces, enclose in double quotes
# IMAGE_ROOT_PASSWORD="a PassworD with spaces"
#
# - for password with double quotes, enclose in double quotes and prefix every double quote in the password with a backslash \ :
# IMAGE_ROOT_PASSWORD="pswd_WITH_\"dbl\"_quotes"
#
# - for password with $, enclose in double quotes and prefix every $ in the password with a backslash \ :
# IMAGE_ROOT_PASSWORD="pswd_with_\$a_"
IMAGE_ROOT_PASSWORD=""
# **** REQUIRED *****
#
# Default root SSH key pair file. All nodes in a cluster created from this
# image will have this SSH key as an authorized user.
# It can be overridden in each cluster's config file.
# The private key file is used by script to ssh into nodes.
IMAGE_ROOT_SSH_PUBLIC_KEY=$HOME/.ssh/clusterroot.pub
IMAGE_ROOT_SSH_PRIVATE_KEY=$HOME/.ssh/clusterroot
# If this is "yes" (highly recommended) password based ssh authentication is disabled and key
# based authentication is the only option for all
# nodes created from this image.
#
# If this is "no", password based ssh authentication is enabled (even if
# it was disabled by default in the distribution), and both password and key
# based authentication are available on all nodes created from this image.
#
# This modifies the value of "PasswordAuthentication" in /etc/ssh/sshd_config.
IMAGE_DISABLE_SSH_PASSWORD_AUTHENTICATION=yes
# **** REQUIRED *****
# A username for administrative purposes. This username can be used by
# all sysadmins / devops / developers to ssh into any node created from
# this image.
# This should not be 'root' or IMAGE_SCRIPT_SSH_USER.
IMAGE_ADMIN_USER=clusteradmin
# **** REQUIRED *****
#
# Password for IMAGE_ADMIN_USER.
# This should not be empty. If it is, it's considered a validation error
# and image creation will not proceed.
#
# Make this a really strong password, especially if IMAGE_DISABLE_SSH_PASSWORD_AUTHENTICATION=no
#
# Some special characters may require escape prefixing and the password to be enclosed in
# single or double quotes.
# Some examples:
# - for password with spaces, enclose in double quotes
# IMAGE_ADMIN_PASSWORD="a PassworD with spaces"
#
# - for password with double quotes, enclose in double quotes and prefix every double quote in the password with a backslash \ :
# IMAGE_ADMIN_PASSWORD="pswd_WITH_\"dbl\"_quotes"
#
# - for password with $, enclose in double quotes and prefix every $ in the password with a backslash \ :
# IMAGE_ADMIN_PASSWORD="pswd_with_\$a_"
IMAGE_ADMIN_PASSWORD=""
# **** OPTIONAL, used only if IMAGE_ADMIN_USER is defined *****
#
# A file containing public keys of all users who are authorized to
# ssh into nodes as IMAGE_ADMIN_USER.
# This file can contain multiple public keys, just like a "authorized_keys" file.
# All these keys will be appended to the image's "authorized_keys".
IMAGE_ADMIN_SSH_AUTHORIZED_KEYS=$HOME/.ssh/clusteradmin.pub
# Size of disk image in MB (max 24000). ~5GB is good enough for most
# distributions, and allows enough leftover storage quota in every plan
# to create additional disks if required.
IMAGE_DISK_SIZE=5000
# Upgrades the OS before installing any software.
# Set to yes for production, no for simulator (because of complications with grub install)
UPGRADE_OS=yes
INSTALL_ZOOKEEPER_DISTRIBUTION=./zookeeper-3.4.7.tar.gz
ZOOKEEPER_INSTALL_DIRECTORY=/opt
ZOOKEEPER_USER=zk
# Min and max heap size for the JVM hosting the zookeeper daemon.
# Set the max to about 75% of the linode's available RAM, but never too high.
# A high heap size increases the possibility of swapping to disk,
# which is terrible for zookeeper's performance.
# After allocating JVM's heap size, there should be enough memory left for
# the JVM process itself and the OS's processes and caches.
# Min can be <= max. Recommended to set them equal.
# If they're equal, the entire max value is committed by OS instead of just
# keeping it reserved, and there will be fewer delays due to memory allocation by OS.
ZOOKEEPER_MAX_HEAP_SIZE=75%
ZOOKEEPER_MIN_HEAP_SIZE=75%