Skip to content

Commit 82e3307

Browse files
authored
Merge pull request #877 from spurti-chopra/master
Add changes to support xenial distribution on ppc64le for Sugilite run_list
2 parents d5c7c96 + 9e2c7ce commit 82e3307

File tree

9 files changed

+341
-6
lines changed

9 files changed

+341
-6
lines changed
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
###########################################################################
2+
# jvm.options #
3+
# #
4+
# - all flags defined here will be used by cassandra to startup the JVM #
5+
# - one flag should be specified per line #
6+
# - lines that do not start with '-' will be ignored #
7+
# - only static flags are accepted (no variables or parameters) #
8+
# - dynamic flags will be appended to these on cassandra-env #
9+
###########################################################################
10+
11+
######################
12+
# STARTUP PARAMETERS #
13+
######################
14+
15+
# Uncomment any of the following properties to enable specific startup parameters
16+
17+
# In a multi-instance deployment, multiple Cassandra instances will independently assume that all
18+
# CPU processors are available to it. This setting allows you to specify a smaller set of processors
19+
# and perhaps have affinity.
20+
#-Dcassandra.available_processors=number_of_processors
21+
22+
# The directory location of the cassandra.yaml file.
23+
#-Dcassandra.config=directory
24+
25+
# Sets the initial partitioner token for a node the first time the node is started.
26+
#-Dcassandra.initial_token=token
27+
28+
# Set to false to start Cassandra on a node but not have the node join the cluster.
29+
#-Dcassandra.join_ring=true|false
30+
31+
# Set to false to clear all gossip state for the node on restart. Use when you have changed node
32+
# information in cassandra.yaml (such as listen_address).
33+
#-Dcassandra.load_ring_state=true|false
34+
35+
# Enable pluggable metrics reporter. See Pluggable metrics reporting in Cassandra 2.0.2.
36+
#-Dcassandra.metricsReporterConfigFile=file
37+
38+
# Set the port on which the CQL native transport listens for clients. (Default: 9042)
39+
#-Dcassandra.native_transport_port=port
40+
41+
# Overrides the partitioner. (Default: org.apache.cassandra.dht.Murmur3Partitioner)
42+
#-Dcassandra.partitioner=partitioner
43+
44+
# To replace a node that has died, restart a new node in its place specifying the address of the
45+
# dead node. The new node must not have any data in its data directory, that is, it must be in the
46+
# same state as before bootstrapping.
47+
#-Dcassandra.replace_address=listen_address or broadcast_address of dead node
48+
49+
# Allow restoring specific tables from an archived commit log.
50+
#-Dcassandra.replayList=table
51+
52+
# Allows overriding of the default RING_DELAY (1000ms), which is the amount of time a node waits
53+
# before joining the ring.
54+
#-Dcassandra.ring_delay_ms=ms
55+
56+
# Set the port for the Thrift RPC service, which is used for client connections. (Default: 9160)
57+
#-Dcassandra.rpc_port=port
58+
59+
# Set the SSL port for encrypted communication. (Default: 7001)
60+
#-Dcassandra.ssl_storage_port=port
61+
62+
# Enable or disable the native transport server. See start_native_transport in cassandra.yaml.
63+
# cassandra.start_native_transport=true|false
64+
65+
# Enable or disable the Thrift RPC server. (Default: true)
66+
#-Dcassandra.start_rpc=true/false
67+
68+
# Set the port for inter-node communication. (Default: 7000)
69+
#-Dcassandra.storage_port=port
70+
71+
# Set the default location for the trigger JARs. (Default: conf/triggers)
72+
#-Dcassandra.triggers_dir=directory
73+
74+
# For testing new compaction and compression strategies. It allows you to experiment with different
75+
# strategies and benchmark write performance differences without affecting the production workload.
76+
#-Dcassandra.write_survey=true
77+
78+
# To disable configuration via JMX of auth caches (such as those for credentials, permissions and
79+
# roles). This will mean those config options can only be set (persistently) in cassandra.yaml
80+
# and will require a restart for new values to take effect.
81+
#-Dcassandra.disable_auth_caches_remote_configuration=true
82+
83+
# To disable dynamic calculation of the page size used when indexing an entire partition (during
84+
# initial index build/rebuild). If set to true, the page size will be fixed to the default of
85+
# 10000 rows per page.
86+
#-Dcassandra.force_default_indexing_page_size=true
87+
88+
########################
89+
# GENERAL JVM SETTINGS #
90+
########################
91+
92+
# enable assertions. highly suggested for correct application functionality.
93+
-ea
94+
95+
# enable thread priorities, primarily so we can give periodic tasks
96+
# a lower priority to avoid interfering with client workload
97+
-XX:+UseThreadPriorities
98+
99+
# allows lowering thread priority without being root on linux - probably
100+
# not necessary on Windows but doesn't harm anything.
101+
# see http://tech.stolsvik.com/2010/01/linux-java-thread-priorities-workar
102+
-XX:ThreadPriorityPolicy=42
103+
104+
# Enable heap-dump if there's an OOM
105+
-XX:+HeapDumpOnOutOfMemoryError
106+
107+
# Per-thread stack size.
108+
-Xss512k
109+
110+
# Larger interned string table, for gossip's benefit (CASSANDRA-6410)
111+
-XX:StringTableSize=1000003
112+
113+
# Make sure all memory is faulted and zeroed on startup.
114+
# This helps prevent soft faults in containers and makes
115+
# transparent hugepage allocation more effective.
116+
-XX:+AlwaysPreTouch
117+
118+
# Disable biased locking as it does not benefit Cassandra.
119+
-XX:-UseBiasedLocking
120+
121+
# Enable thread-local allocation blocks and allow the JVM to automatically
122+
# resize them at runtime.
123+
-XX:+UseTLAB
124+
-XX:+ResizeTLAB
125+
-XX:+UseNUMA
126+
127+
# http://www.evanjones.ca/jvm-mmap-pause.html
128+
-XX:+PerfDisableSharedMem
129+
130+
# Prefer binding to IPv4 network intefaces (when net.ipv6.bindv6only=1). See
131+
# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6342561 (short version:
132+
# comment out this entry to enable IPv6 support).
133+
-Djava.net.preferIPv4Stack=true
134+
135+
### Debug options
136+
137+
# uncomment to enable flight recorder
138+
#-XX:+UnlockCommercialFeatures
139+
#-XX:+FlightRecorder
140+
141+
# uncomment to have Cassandra JVM listen for remote debuggers/profilers on port 1414
142+
#-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1414
143+
144+
# uncomment to have Cassandra JVM log internal method compilation (developers only)
145+
#-XX:+UnlockDiagnosticVMOptions
146+
#-XX:+LogCompilation
147+
148+
#################
149+
# HEAP SETTINGS #
150+
#################
151+
152+
# Heap size is automatically calculated by cassandra-env based on this
153+
# formula: max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB))
154+
# That is:
155+
# - calculate 1/2 ram and cap to 1024MB
156+
# - calculate 1/4 ram and cap to 8192MB
157+
# - pick the max
158+
#
159+
# For production use you may wish to adjust this for your environment.
160+
# If that's the case, uncomment the -Xmx and Xms options below to override the
161+
# automatic calculation of JVM heap memory.
162+
#
163+
# It is recommended to set min (-Xms) and max (-Xmx) heap sizes to
164+
# the same value to avoid stop-the-world GC pauses during resize, and
165+
# so that we can lock the heap in memory on startup to prevent any
166+
# of it from being swapped out.
167+
#-Xms4G
168+
#-Xmx4G
169+
170+
# Young generation size is automatically calculated by cassandra-env
171+
# based on this formula: min(100 * num_cores, 1/4 * heap size)
172+
#
173+
# The main trade-off for the young generation is that the larger it
174+
# is, the longer GC pause times will be. The shorter it is, the more
175+
# expensive GC will be (usually).
176+
#
177+
# It is not recommended to set the young generation size if using the
178+
# G1 GC, since that will override the target pause-time goal.
179+
# More info: http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html
180+
#
181+
# The example below assumes a modern 8-core+ machine for decent
182+
# times. If in doubt, and if you do not particularly want to tweak, go
183+
# 100 MB per physical CPU core.
184+
#-Xmn800M
185+
186+
#################
187+
# GC SETTINGS #
188+
#################
189+
190+
### CMS Settings
191+
192+
-XX:+UseParNewGC
193+
-XX:+UseConcMarkSweepGC
194+
-XX:+CMSParallelRemarkEnabled
195+
-XX:SurvivorRatio=8
196+
-XX:MaxTenuringThreshold=1
197+
-XX:CMSInitiatingOccupancyFraction=75
198+
-XX:+UseCMSInitiatingOccupancyOnly
199+
-XX:CMSWaitDuration=10000
200+
-XX:+CMSParallelInitialMarkEnabled
201+
-XX:+CMSEdenChunksRecordAlways
202+
# some JVMs will fill up their heap when accessed via JMX, see CASSANDRA-6541
203+
-XX:+CMSClassUnloadingEnabled
204+
205+
### G1 Settings (experimental, comment previous section and uncomment section below to enable)
206+
207+
## Use the Hotspot garbage-first collector.
208+
#-XX:+UseG1GC
209+
#
210+
## Have the JVM do less remembered set work during STW, instead
211+
## preferring concurrent GC. Reduces p99.9 latency.
212+
#-XX:G1RSetUpdatingPauseTimePercent=5
213+
#
214+
## Main G1GC tunable: lowering the pause target will lower throughput and vise versa.
215+
## 200ms is the JVM default and lowest viable setting
216+
## 1000ms increases throughput. Keep it smaller than the timeouts in cassandra.yaml.
217+
#-XX:MaxGCPauseMillis=500
218+
219+
## Optional G1 Settings
220+
221+
# Save CPU time on large (>= 16GB) heaps by delaying region scanning
222+
# until the heap is 70% full. The default in Hotspot 8u40 is 40%.
223+
#-XX:InitiatingHeapOccupancyPercent=70
224+
225+
# For systems with > 8 cores, the default ParallelGCThreads is 5/8 the number of logical cores.
226+
# Otherwise equal to the number of cores when 8 or less.
227+
# Machines with > 10 cores should try setting these to <= full cores.
228+
#-XX:ParallelGCThreads=16
229+
# By default, ConcGCThreads is 1/4 of ParallelGCThreads.
230+
# Setting both to the same value can reduce STW durations.
231+
#-XX:ConcGCThreads=16
232+
233+
### GC logging options -- uncomment to enable
234+
235+
-XX:+PrintGCDetails
236+
-XX:+PrintGCDateStamps
237+
-XX:+PrintHeapAtGC
238+
-XX:+PrintTenuringDistribution
239+
-XX:+PrintGCApplicationStoppedTime
240+
-XX:+PrintPromotionFailure
241+
#-XX:PrintFLSStatistics=1
242+
#-Xloggc:/var/log/cassandra/gc.log
243+
-XX:+UseGCLogFileRotation
244+
-XX:NumberOfGCLogFiles=10
245+
-XX:GCLogFileSize=10M

cookbooks/travis_build_environment/recipes/cassandra.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,32 @@
44
distribution ''
55
key 'A278B781FE4B2BDA'
66
keyserver 'hkp://ha.pool.sks-keyservers.net'
7+
not_if { node['kernel']['machine'] == 'ppc64le' }
8+
end
9+
10+
apt_repository 'cassandra' do
11+
uri 'http://www.apache.org/dist/cassandra/debian'
12+
components %w[311x main]
13+
distribution ''
14+
arch 'amd64'
15+
key 'A278B781FE4B2BDA'
16+
keyserver 'hkp://ha.pool.sks-keyservers.net'
17+
only_if { node['kernel']['machine'] == 'ppc64le' }
718
end
819

920
package %w[cassandra cassandra-tools] do
1021
action %i[install upgrade]
1122
end
1223

24+
cookbook_file '/etc/cassandra/jvm.options' do
25+
source 'cassandra.jvm.options'
26+
mode 0o644
27+
owner 'root'
28+
group 'root'
29+
only_if { node['kernel']['machine'] == 'ppc64le' }
30+
only_if { ::Dir.exist?("/etc/cassandra") }
31+
end
32+
1333
service 'cassandra' do
1434
action %i[disable stop]
1535
end

cookbooks/travis_build_environment/recipes/ci_user.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,13 @@
146146
only_if { ::File.exist?(local_archive) }
147147
end
148148

149+
kerl_build_cmd = "#{node['travis_build_environment']['kerl_path']} build #{rel} #{rel}"
150+
if node['kernel']['machine'] == 'ppc64le'
151+
kerl_build_cmd = "KERL_CONFIGURE_OPTIONS=--disable-hipe #{node['travis_build_environment']['kerl_path']} build #{rel} #{rel}"
152+
end
153+
149154
bash "build erlang #{rel}" do
150-
code "#{node['travis_build_environment']['kerl_path']} build #{rel} #{rel}"
155+
code kerl_build_cmd
151156

152157
user node['travis_build_environment']['user']
153158
group node['travis_build_environment']['group']
@@ -202,6 +207,7 @@
202207
'HOME' => node['travis_build_environment']['home'],
203208
'USER' => node['travis_build_environment']['user']
204209
)
210+
creates "#{dest}/bin/elixirc"
205211
end
206212

207213
file "#{node['travis_build_environment']['home']}/.kiex/elixirs/elixir-#{elixir}.env" do

cookbooks/travis_build_environment/recipes/couchdb.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
retries 2
88
retry_delay 30
99
action :add
10+
not_if { node['kernel']['machine'] == 'ppc64le' }
1011
end
1112

1213
package 'couchdb'

cookbooks/travis_build_environment/recipes/firefox.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,10 @@
3030
owner node['travis_build_environment']['user']
3131
group node['travis_build_environment']['group']
3232
has_binaries %w[firefox firefox-bin]
33+
not_if { node['kernel']['machine'] == 'ppc64le' }
34+
end
35+
36+
package %w[firefox] do
37+
action %i[install upgrade]
38+
only_if { node['kernel']['machine'] == 'ppc64le' }
3339
end

cookbooks/travis_build_environment/recipes/hhvm.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
if node['kernel']['machine'] == 'ppc64le'
2+
hhvm_uri = 'http://ppa.launchpad.net/ibmpackages/hhvm/ubuntu'
3+
key = "E7D1FA0C"
4+
else
5+
hhvm_uri = 'http://dl.hhvm.com/ubuntu'
6+
key = 'http://dl.hhvm.com/conf/hhvm.gpg.key'
7+
end
8+
19
apt_repository 'hhvm-repository' do
2-
uri 'http://dl.hhvm.com/ubuntu'
10+
uri hhvm_uri
311
distribution node['lsb']['codename']
412
components ['main']
5-
key 'http://dl.hhvm.com/conf/hhvm.gpg.key'
13+
key key
614
retries 2
715
retry_delay 30
816
end

cookbooks/travis_build_environment/recipes/mongodb.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,16 @@
2828
key 'EA312927'
2929
retries 2
3030
retry_delay 30
31+
not_if { node['kernel']['machine'] == 'ppc64le' }
3132
end
3233

33-
package 'mongodb-org'
34+
package 'mongodb-org' do
35+
not_if { node['kernel']['machine'] == 'ppc64le' }
36+
end
37+
38+
package 'mongodb' do
39+
only_if { node['kernel']['machine'] == 'ppc64le' }
40+
end
3441

3542
service 'mongod' do
3643
action %i[stop disable]

0 commit comments

Comments
 (0)