Upgrade Elasticsearch from 6.x to latest 7.x

This commit is contained in:
Râu Cao committed 2022-11-06 13:56:15 +01:00
1 parent 5a94050555
commit 3620a43190
10 files changed
+77 -14

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ cookbook 'mariadb', '= 0.3.1'
cookbook 'ipfs',
git: 'https://gitea.kosmos.org/kosmos/ipfs-cookbook.git',
ref: 'v0.7.0'
cookbook 'elasticsearch', '= 4.2.0'
cookbook 'elasticsearch', '= 4.3.0'
cookbook 'java', '~> 4.3.0'
cookbook 'ulimit', '~> 1.0.0'
cookbook 'golang', '~> 5.3.1'
+2 -2
View File
@@ -9,7 +9,7 @@ DEPENDENCIES
chef-sugar (= 3.3.0)
compat_resource (= 12.19.0)
composer (~> 2.7.0)
elasticsearch (= 4.2.0)
elasticsearch (= 4.3.0)
firewall (~> 2.6.3)
git (~> 10.0.0)
golang (~> 5.3.1)
@@ -81,7 +81,7 @@ GRAPH
apt (>= 0.0.0)
php (>= 0.0.0)
windows (>= 0.0.0)
elasticsearch (4.2.0)
elasticsearch (4.3.0)
apt (>= 0.0.0)
ark (>= 0.0.0)
chef-sugar (>= 0.0.0)
+3
View File
@@ -1,5 +1,8 @@
# Change Log
## [v4.3.0](https://github.com/elastic/cookbook-elasticsearch/tree/v4.3.0) (2019-12-30)
- Default to Elasticsearch 7.4.2
## [v4.2.0](https://github.com/elastic/cookbook-elasticsearch/tree/v4.2.0) (2019-08-02)
- Default to Elasticsearch 7.3.0
- Some fixes for the version logic when selecting v7 or higher ES
+2 -2
View File
@@ -156,7 +156,7 @@ elasticsearch_install 'elasticsearch'
```ruby
elasticsearch_install 'my_es_installation' do
type 'package' # type of install
version '7.3.0'
version '7.4.2'
action :install # could be :remove as well
end
```
@@ -177,7 +177,7 @@ end
```ruby
elasticsearch_install 'my_es_installation' do
type 'tarball' # type of install
version '7.3.0'
version '7.4.2'
action :install # could be :remove as well
end
```
@@ -140,6 +140,22 @@ default['elasticsearch']['checksums']['6.8.2']['debian'] = '9e6b591bef75d042abb4
default['elasticsearch']['checksums']['6.8.2']['rhel'] = '3561e6c1bbac324448928e752b9d6c0d2a413c569993625f6dd255b343f61a6c'
default['elasticsearch']['checksums']['6.8.2']['tarball'] = '2dc3107475659dfd21afa74612a43d5ccbcf4942ab679e8e4e77167cafe27c94'
default['elasticsearch']['checksums']['6.8.3']['debian'] = '65220ba62793445dc0a6fc41078f6020dcfe5b3c9d5ee2ba75d17866b5e09d40'
default['elasticsearch']['checksums']['6.8.3']['rhel'] = '9c3c7d18f12db3e27fb8c751ffae1c5a5dd8db59266a5ebb69d620e3ae363de2'
default['elasticsearch']['checksums']['6.8.3']['tarball'] = '824078e421c9f7e5ab9c875e4019d9ebfe3ada99db286b54dec090f97d1cbe25'
default['elasticsearch']['checksums']['6.8.4']['debian'] = '55b4248b38c72d254230c8469847649489fe4abf1b2e14e3a82f6ae5214f8a8f'
default['elasticsearch']['checksums']['6.8.4']['rhel'] = '1d618c51a263984da1992230d35611b012aff8ade4fee0a16338f9919a9a4a9b'
default['elasticsearch']['checksums']['6.8.4']['tarball'] = 'b8a545cc6d5fc3bd4be7adbe7057faa68fc548cf1923b30a2d90f328c6da96c9'
default['elasticsearch']['checksums']['6.8.5']['debian'] = '115e5649962793fbcc628b0eb660eafe570ff67676ca88cf98e7cec830fd1dd4'
default['elasticsearch']['checksums']['6.8.5']['rhel'] = '96520e7c3b49bdad753ccfad76ce2899dbcecf6a1531f20a59b5087305a1c557'
default['elasticsearch']['checksums']['6.8.5']['tarball'] = '5fe84fa84a0ca0136aad9bbdfc2053f8dda9a3e166ddf34e947bb1fe24e4ce6d'
default['elasticsearch']['checksums']['6.8.6']['debian'] = '82dce29bb3c9108f44e936c3fc6200ce7264bb1a27c1a1cc6dde39b6eac03487'
default['elasticsearch']['checksums']['6.8.6']['rhel'] = '4880396d1a78046efe4a6ec45c1cc2f1f9f0d328466aa32355e95f9834d9d0af'
default['elasticsearch']['checksums']['6.8.6']['tarball'] = '67b9b07a649831eb30779cf8264548a0828414ba9abb1be7bc592a8db91fdf7c'
default['elasticsearch']['checksums']['7.0.0']['debian'] = '491d36af33bc896f8c44c46e1ed550e304220c9eedee991091864f5f3434e2f4'
default['elasticsearch']['checksums']['7.0.0']['rhel'] = '99ed1d22c128189ccb07c99babe7f437180e42c94af15782acf4b80d2520abc4'
default['elasticsearch']['checksums']['7.0.0']['tarball'] = '68deee5e9c961ad48cc83859970ac7a79029fe5f5e6de7e58ea0f7c7713f25ba'
@@ -167,3 +183,31 @@ default['elasticsearch']['checksums']['7.2.1']['tarball'] = 'd5d660895a39755ad6a
default['elasticsearch']['checksums']['7.3.0']['debian'] = '72ae24cf0f5d97a307f35d116a41e1165e80f58f08b0ca4e6de3ec5228f06f9c'
default['elasticsearch']['checksums']['7.3.0']['rhel'] = 'f49dc809cf48369b70546f13dfb28b43e1a07387b681ca786c794762d52847ca'
default['elasticsearch']['checksums']['7.3.0']['tarball'] = '6cddb4d9a3c5e730f8e35e2155937c069d057129808ea135d31f0ed5f7f2ea22'
default['elasticsearch']['checksums']['7.3.1']['debian'] = '570af7456603fd103408ed61ccec4473302976d46e1ff845b74a881122977e02'
default['elasticsearch']['checksums']['7.3.1']['rhel'] = '240f93d16da4c20d2cc377b7c6a61dbf4fb9634d74829ccb5f7cd42c023bc967'
default['elasticsearch']['checksums']['7.3.1']['tarball'] = '69864bcbca495603004c6c4e6f5d69bce4dc89cd6d672d1ebc7f5387a3d13c74'
default['elasticsearch']['checksums']['7.3.2']['debian'] = '690e98653b3dc50ec5f8e65c480ec41c8c4db0d2c63b5ed3f25fef53d6aaaa55'
default['elasticsearch']['checksums']['7.3.2']['rhel'] = 'bdada0a4c7b5574c41726154212b6b25373e2b4d7d2a64e24238b206ad422ecd'
default['elasticsearch']['checksums']['7.3.2']['tarball'] = '8254dc2d98959cb7964a523a7abab3cd40362dde694ce020ae1efd554efb8e82'
default['elasticsearch']['checksums']['7.4.0']['debian'] = '3edf17d9d63a08a0f7eb7d9727a1737e1c770277f64fe44342115e62f752cc51'
default['elasticsearch']['checksums']['7.4.0']['rhel'] = '1bfae41734c77af3bc66084ac0cc04add1190f9311b045d3c184ea7b3e688334'
default['elasticsearch']['checksums']['7.4.0']['tarball'] = 'b712ced4a7feae46c3f966d52ac24f1b3418ee3ffbf0495a97f27ccf40878873'
default['elasticsearch']['checksums']['7.4.1']['debian'] = '55a92288e81856e9bb6c36c0f7149b24cf36432527ca809fc48e25775b0cf584'
default['elasticsearch']['checksums']['7.4.1']['rhel'] = '8ec30fbd95235cb15d0f27cd40f75a43f640f5832e2ee2d44fe8d2983cd5724f'
default['elasticsearch']['checksums']['7.4.1']['tarball'] = '39be609b1051bc92dc8a9481d47c4c16c9efd77e8a423eca97eb45fec5d4d156'
default['elasticsearch']['checksums']['7.4.2']['debian'] = '514a8e21e173481edb9130ebbf33f15209b467df5c2222632d63c4527c16abc6'
default['elasticsearch']['checksums']['7.4.2']['rhel'] = 'af616eed2cd30411f400dee0c993eb8fccd55e510548697d7cc0eb178ac4adec'
default['elasticsearch']['checksums']['7.4.2']['tarball'] = 'f54475eafbf3384f4378002d87badf013018a9238937a4bd780e71271c670772'
default['elasticsearch']['checksums']['7.5.0']['debian'] = '5b167d15461049f6aa58a96d805c9bcd297ad19467392eea125ce91c5eaaf908'
default['elasticsearch']['checksums']['7.5.0']['rhel'] = 'a8e802c74c3163272fb7119a9d23c1e8f7bbe76e6502a3fcc30709705bc57f4a'
default['elasticsearch']['checksums']['7.5.0']['tarball'] = '1e183717071e329591c109a8560a90b66ddd55958a68cc83385ae123d680b4ca'
default['elasticsearch']['checksums']['7.5.1']['debian'] = 'e566a88e15d8f85cf793c8f971b51eeae6465a0aa73f968ae4b1ee6aa71e4c20'
default['elasticsearch']['checksums']['7.5.1']['rhel'] = 'e6202bba2bd8644d23dcbef9ad7780c847dfe4ee699d3dc1804f6f62eed59c2d'
default['elasticsearch']['checksums']['7.5.1']['tarball'] = '37c317efaacf33a1bae250a59e822864750fddd8caf08c4b6a6c235ffa5f47e8'
@@ -11,7 +11,7 @@ class ElasticsearchCookbook::InstallResource < Chef::Resource::LWRPBase
# if this version parameter is not set by the caller, we look at
# `attributes/default.rb` for a default value to use, or we raise
attribute(:version, kind_of: String, default: '7.3.0')
attribute(:version, kind_of: String, default: '7.4.2')
# we allow a string or symbol for this value
attribute(:type, kind_of: String, equal_to: %w(package tarball repository), default: 'repository')
+1 -1
View File
@@ -1 +1 @@
{"name":"elasticsearch","version":"4.2.0","description":"Installs and configures Elasticsearch","long_description":"# Elasticsearch Chef Cookbook\n\n[![Build Status](https://travis-ci.org/elastic/cookbook-elasticsearch.svg?branch=master)](https://travis-ci.org/elastic/cookbook-elasticsearch) [![Cookbook Version](https://img.shields.io/cookbook/v/elasticsearch.svg)](https://supermarket.chef.io/cookbooks/elasticsearch)[![Build Status](https://jenkins-01.eastus.cloudapp.azure.com/job/elasticsearch-cookbook/badge/icon)](https://jenkins-01.eastus.cloudapp.azure.com/job/elasticsearch-cookbook/)\n\n**Please** review the [frequently asked questions](FAQ.md) and [contributing guidelines](CONTRIBUTING.md) before opening issues or submitting pull requests.\n\n## Looking for Elasticsearch 5.x or 6.x?\n\nPlease [check out the previous 3.x.x releases](https://github.com/elastic/cookbook-elasticsearch/tree/3.x.x) of this cookbook. Please consider pinning your cookbook to '~> 3.0' for support for Elasticsearch 6 and earlier, or '~> 4.0' release for Elasticsearch 6 and beyond.\n\n## Attributes\n\nPlease consult [attributes/default.rb](attributes/default.rb) for a large list\nof checksums for many different archives and package files of different\nelasticsearch versions. Both recipes and resources/providers here use those\ndefault values.\n\nYou may use `%s` in your URL and this cookbook will use sprintf/format to insert\nthe version parameter as a string into your download_url.\n\n|Name|Default|Other values|\n|----|-------|------------|\n| For Elasticsearch < 7: ||\n|`default['elasticsearch']['download_urls']['debian']`|[See values](attributes/default.rb).|`%s` will be replaced with the version attribute above|\n|`default['elasticsearch']['download_urls']['rhel']`|[See values](attributes/default.rb).|`%s` will be replaced with the version attribute above|\n|`default['elasticsearch']['download_urls']['tarball']`|[See values](attributes/default.rb).|`%s` will be replaced with the version attribute above|\n| For Elasticsearch >= 7: ||\n|`default['elasticsearch']['download_urls_v7']['debian']`|[See values](attributes/default.rb).|`%s` will be replaced with the version attribute above|\n|`default['elasticsearch']['download_urls_v7']['rhel']`|[See values](attributes/default.rb).|`%s` will be replaced with the version attribute above|\n|`default['elasticsearch']['download_urls_v7']['tarball']`|[See values](attributes/default.rb).|`%s` will be replaced with the version attribute above|\n\nThis cookbook's `elasticsearch::default` recipe also supports setting any `elasticsearch_` resource using attributes:\n\n```\ndefault['elasticsearch']['user'] = {}\ndefault['elasticsearch']['install'] = {}\ndefault['elasticsearch']['configure'] = {}\ndefault['elasticsearch']['service'] = {}\ndefault['elasticsearch']['plugin'] = {}\n```\n\nFor example, this will pass a username 'foo' to `elasticsearch_user` and set a uid to `1234`:\n```\ndefault['elasticsearch']['user']['username'] = 'foo'\ndefault['elasticsearch']['user']['uid'] = '1234'\n```\n\n## Recipes\n\nResources are the intended way to consume this cookbook, however we have\nprovided a single recipe that configures Elasticsearch by downloading an archive\ncontaining a distribution of Elasticsearch, and extracting that into `/usr/share`.\n\nSee the attributes section above to for what defaults you can adjust.\n\n### default\n\nThe default recipe creates an elasticsearch user, group, package installation,\nconfiguration files, and service with all of the default options.\n\nPlease note that there are [additional examples within the test fixtures](test/fixtures/cookbooks/elasticsearch_test),\nincluding a demonstration of how to configure two instances of Elasticsearch on a single server.\n\n## Resources\n\n## Notifications and Service Start/Restart\n\nThe resources provided in this cookbook **do not automatically restart** services when changes have occurred. They ***do start services by default when configuring a new service*** This has been done to protect you from accidental data loss and service outages, as nodes might restart simultaneously or may not restart at all when bad configuration values are supplied.\n\nelasticsearch_service has a special `service_actions` parameter you can use to specify what state the underlying service should be in on each chef run (defaults to `:enabled` and `:started`). It will also pass through all of the standard `service` resource\nactions to the underlying service resource if you wish to notify it.\n\nYou **must** supply your desired notifications when using each resource if you want Chef to automatically restart services. Again, we don't recommend this unless you know what you're doing.\n\nWe are supporting whyrun mode in this cookbook, simply because we're using all builtin resources from core Chef, and these also already support whyrun. If you contribute to this cookbook, please be sure to maintain that or guard dangerous Ruby code with something likLine truncated
{"name":"elasticsearch","version":"4.3.0","description":"Installs and configures Elasticsearch","long_description":"","maintainer":"Karel Minarik","maintainer_email":"karel.minarik@elasticsearch.org","license":"Apache-2.0","platforms":{"amazon":">= 0.0.0","centos":">= 0.0.0","debian":">= 0.0.0","fedora":">= 0.0.0","redhat":">= 0.0.0","ubuntu":">= 0.0.0"},"dependencies":{"apt":">= 0.0.0","yum":">= 0.0.0","chef-sugar":">= 0.0.0","ark":">= 0.0.0"},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{},"source_url":"https://github.com/elastic/cookbook-elasticsearch","issues_url":"https://github.com/elastic/cookbook-elasticsearch/issues","chef_version":[[">= 12.5"]],"ohai_version":[]}
+1 -2
View File
@@ -4,8 +4,7 @@ maintainer 'Karel Minarik'
maintainer_email 'karel.minarik@elasticsearch.org'
license 'Apache-2.0'
description 'Installs and configures Elasticsearch'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '4.2.0'
version '4.3.0'
supports 'amazon'
supports 'centos'
+4 -4
View File
@@ -12,18 +12,18 @@
"hostname": "mastodon-3",
"ipaddress": "192.168.122.161",
"roles": [
"kvm_guest",
"mastodon",
"postgresql_client",
"kvm_guest"
"postgresql_client"
],
"recipes": [
"kosmos-base",
"kosmos-base::default",
"kosmos_kvm::guest",
"kosmos_postgresql::hostsfile",
"kosmos-mastodon",
"kosmos-mastodon::default",
"kosmos-mastodon::nginx",
"kosmos_kvm::guest",
"apt::default",
"timezone_iii::default",
"timezone_iii::debian",
@@ -90,4 +90,4 @@
"role[kvm_guest]",
"role[mastodon]"
]
}
}
@@ -12,11 +12,28 @@ elasticsearch_user 'elasticsearch'
elasticsearch_install 'elasticsearch' do
type 'package'
version '6.8.2'
version '7.17.7'
action :install
end
elasticsearch_configure 'elasticsearch' do
allocated_memory node["kosmos-mastodon"]["elasticsearch"]["allocated_memory"]
jvm_options %w(
-Xms1536m
-Xmx1536m
-XX:+AlwaysPreTouch
-server
-Xss1m
-Djava.awt.headless=true
-Dfile.encoding=UTF-8
-Djna.nosys=true
-XX:-OmitStackTraceInFastThrow
-Dio.netty.noUnsafe=true
-Dio.netty.noKeySetOptimization=true
-Dio.netty.recycler.maxCapacityPerThread=0
-XX:+HeapDumpOnOutOfMemoryError
)
end
elasticsearch_service 'elasticsearch'