smartcloud 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 241790f96253161b990bfc75ef559b5872849e8f4dec6ccad65cdef173789144
4
- data.tar.gz: 7d6296cd2e0851b53758d2d1971d05903892dbac659b2c9783ce9484a4f28bfc
3
+ metadata.gz: 474fdd2356fd60ade2ebb2cad2982ebf66d2d045ae19559e13d7cc244b43657a
4
+ data.tar.gz: 17f10d83a70e04d06ba32205bbe3878da6eec8b106898c385fdc36bf00b0e24a
5
5
  SHA512:
6
- metadata.gz: add6e6dfaca24de43ec1a45bbf0b3da91651c605e37591cde402629fa5e184f1c6997740ab30dd180e8477a7434d3b7f63b5d0a0edc061143972f66a94f842b5
7
- data.tar.gz: '038a10133f0e716a093b083722635cc52fad448e309e2fb92e837abb6d603508432c1fd4d627d19bdf2b8513f7e3596c383e88453f028f5ddb0ede815a068185'
6
+ metadata.gz: 2f27dfd480192c5eac77388da0c8e94487a7266b7b4596ad9b1883cf98a14932b8d4b096f9b10a7512788b002254231f7614099a61ced315075e360830f31dd3
7
+ data.tar.gz: 612b0aa19cce9b011b720c994917b6977507ed6e46861d3a007c43247a4d922379b331453684bbd070dc41d753b051104073922395aa4ebb9205c5e9de6c11cd
@@ -10,10 +10,8 @@ module Smartcloud
10
10
 
11
11
  print "-----> Creating settings for elasticsearch ... "
12
12
 
13
- vm_max_map_count_filepath = "~/.smartcloud/grids/grid-elasticsearch/vm_max_map_count"
14
13
  ssh = Smartcloud::SSH.new
15
- ssh.run "sudo sysctl -b vm.max_map_count > #{vm_max_map_count_filepath}"
16
- ssh.run "sudo sysctl -w vm.max_map_count=262144"
14
+ ssh.run "echo 'vm.max_map_count=262144' | sudo tee /etc/sysctl.d/60-smartcloud-elasticsearch.conf && sudo sysctl --system"
17
15
 
18
16
  puts "done"
19
17
  end
@@ -21,10 +19,9 @@ module Smartcloud
21
19
  def uninstall
22
20
  print "-----> Removing settings for elasticsearch ... "
23
21
 
24
- vm_max_map_count_filepath = "~/.smartcloud/grids/grid-elasticsearch/vm_max_map_count"
25
22
  ssh = Smartcloud::SSH.new
26
- ssh.run "test -f #{vm_max_map_count_filepath} && sudo sysctl -w vm.max_map_count=$(cat #{vm_max_map_count_filepath})"
27
- ssh.run "test -f #{vm_max_map_count_filepath} && rm #{vm_max_map_count_filepath}"
23
+ # NOTE: sysctl does not reset this setting until restart of system even after sudo sysctl --system is run.
24
+ ssh.run "test -f /etc/sysctl.d/60-smartcloud-elasticsearch.conf && sudo rm /etc/sysctl.d/60-smartcloud-elasticsearch.conf && sudo sysctl --system"
28
25
 
29
26
  puts "done"
30
27
  end
@@ -182,7 +182,6 @@ module Smartcloud
182
182
  'grids',
183
183
 
184
184
  'grids/grid-elasticsearch',
185
- 'grids/grid-elasticsearch/vm_max_map_count',
186
185
  'grids/grid-elasticsearch/data/***',
187
186
  'grids/grid-elasticsearch/logs/***',
188
187
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Smartcloud
4
- VERSION = "0.3.1".freeze
4
+ VERSION = "0.3.2".freeze
5
5
 
6
6
  def self.version
7
7
  @@version ||= VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timeboard