Compare commits
85 Commits
765d0b080e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
8d0c6bc301
|
|||
|
80766f2473
|
|||
|
d9a59e064e
|
|||
|
16cb333991
|
|||
|
7386de86d7
|
|||
|
5ff6046169
|
|||
|
093a98b753
|
|||
|
7b76fc1579
|
|||
|
527603bd63
|
|||
|
6bb23e70d6
|
|||
|
bd3e8d8c26
|
|||
|
b2aa902421
|
|||
|
3c740a0b92
|
|||
|
4e0131597f
|
|||
|
742ca590f2
|
|||
|
4ecfb8fc7f
|
|||
|
66481aa4c4
|
|||
|
626662a7ff
|
|||
|
f2e0a0929a
|
|||
|
12948be193
|
|||
|
df4f1236de
|
|||
|
875b23c746
|
|||
|
b34c3ad20b
|
|||
|
db69e437d5
|
|||
|
663c4da0a0
|
|||
|
010e2d0d64
|
|||
|
065eac06b1
|
|||
|
1759af98b8
|
|||
|
736d4effa4
|
|||
|
1ebe0e4074
|
|||
|
9250b2c726
|
|||
|
6807b8f5bc
|
|||
|
0338e56d4c
|
|||
|
bd193567ca
|
|||
|
86f7b68726
|
|||
|
51af9c76e0
|
|||
|
f15d5cb958
|
|||
|
ae14a1f353
|
|||
|
b700baac37
|
|||
|
6f93820936
|
|||
|
9fca5386f3
|
|||
|
b6ba5ba679
|
|||
|
4976888358
|
|||
|
e4ad52d413
|
|||
|
94a3c41964
|
|||
|
704d0bca0e
|
|||
|
02dc95b7de
|
|||
|
2a14837f64
|
|||
|
1ae5210813
|
|||
|
20f67d7261
|
|||
|
4ce77e1a6e
|
|||
|
21513e6d10
|
|||
|
33987402e3
|
|||
|
81aae3d1bb
|
|||
|
65c1933a99
|
|||
|
5e7a0c07b0
|
|||
|
8601e33764
|
|||
|
c736468259
|
|||
|
6370069e9d
|
|||
|
0e9bcca72d
|
|||
|
c762dfe8c1
|
|||
|
53cf95c4e7
|
|||
|
959d506cfb
|
|||
|
8c71261fc9
|
|||
|
6c3da8a711
|
|||
|
53de8ea119
|
|||
|
639800a838
|
|||
|
1e2ff76797
|
|||
|
301565b910
|
|||
|
171db0fb7c
|
|||
|
821b56e6ab
|
|||
|
e29d90d3d0
|
|||
|
f2ebda4a1a
|
|||
|
67f62ebd6c
|
|||
|
7dc4895da3
|
|||
|
153b1e77c5
|
|||
|
ea69c7cec6
|
|||
|
5813a45987
|
|||
|
63534e1cf5
|
|||
|
2d835335b5
|
|||
|
e21797b402
|
|||
|
7396af5ca4
|
|||
|
df8c8d1742
|
|||
|
3e6faf34c4
|
|||
|
13b61a3639
|
+2
-20
@@ -8,25 +8,7 @@ data_bag_path "data_bags"
|
|||||||
encrypted_data_bag_secret "#{current_dir}/encrypted_data_bag_secret"
|
encrypted_data_bag_secret "#{current_dir}/encrypted_data_bag_secret"
|
||||||
local_mode true # Chef local mode, replacing Solo
|
local_mode true # Chef local mode, replacing Solo
|
||||||
|
|
||||||
# Knife-Zero config, see https://knife-zero.github.io/40_configuration/
|
|
||||||
# Prevent attributes from being saved to the node files
|
|
||||||
knife[:automatic_attribute_whitelist] = %w[
|
|
||||||
fqdn
|
|
||||||
os
|
|
||||||
os_version
|
|
||||||
hostname
|
|
||||||
ipaddress
|
|
||||||
roles
|
|
||||||
recipes
|
|
||||||
ipaddress
|
|
||||||
platform
|
|
||||||
platform_version
|
|
||||||
cloud
|
|
||||||
cloud_v2
|
|
||||||
chef_packages
|
|
||||||
]
|
|
||||||
|
|
||||||
# Added to /etc/chef/client.rb on node bootstrap
|
# Added to /etc/chef/client.rb on node bootstrap
|
||||||
# https://docs.chef.io/attribute_persistence/
|
# https://docs.chef.io/attribute_persistence/
|
||||||
knife[:normal_attribute_allowlist] = ['knife_zero', 'kosmos_kvm', 'kosmos-ejabberd', 'openresty']
|
# Source of truth: site-cookbooks/kosmos-base/files/default/chef_attributes.rb
|
||||||
knife[:allowed_normal_attributes] = ['knife_zero', 'kosmos_kvm', 'kosmos-ejabberd', 'openresty']
|
client_d_dir(File.expand_path("../site-cookbooks/kosmos-base/files/default/chef_attributes.rb"))
|
||||||
|
|||||||
@@ -13,3 +13,6 @@
|
|||||||
[submodule "site-cookbooks/blossom"]
|
[submodule "site-cookbooks/blossom"]
|
||||||
path = site-cookbooks/blossom
|
path = site-cookbooks/blossom
|
||||||
url = git@gitea.kosmos.org:kosmos/blossom-cookbook.git
|
url = git@gitea.kosmos.org:kosmos/blossom-cookbook.git
|
||||||
|
[submodule "nodes"]
|
||||||
|
path = nodes
|
||||||
|
url = git@gitea.kosmos.org:kosmos/chef-nodes.git
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ cookbook 'java', '~> 4.3.0'
|
|||||||
cookbook 'logrotate', '= 2.2.0'
|
cookbook 'logrotate', '= 2.2.0'
|
||||||
cookbook 'mysql', '~> 8.7.3'
|
cookbook 'mysql', '~> 8.7.3'
|
||||||
cookbook 'nginx', '= 9.0.0'
|
cookbook 'nginx', '= 9.0.0'
|
||||||
cookbook 'nodejs', '~> 7.3.1'
|
cookbook 'nodejs', '~> 11.0.1'
|
||||||
cookbook 'ntp', '= 3.4.0'
|
cookbook 'ntp', '= 3.4.0'
|
||||||
cookbook 'ohai', '~> 5.2.5'
|
cookbook 'ohai', '~> 5.2.5'
|
||||||
cookbook 'openssl', '~> 8.5.5'
|
cookbook 'openssl', '~> 8.5.5'
|
||||||
@@ -41,7 +41,6 @@ cookbook 'ulimit', '~> 1.0.0'
|
|||||||
cookbook 'users', '~> 5.3.1'
|
cookbook 'users', '~> 5.3.1'
|
||||||
cookbook 'zerotier', '~> 1.0.7'
|
cookbook 'zerotier', '~> 1.0.7'
|
||||||
cookbook 'unbound', '~> 3.0.2'
|
cookbook 'unbound', '~> 3.0.2'
|
||||||
cookbook 'prometheus', '~> 1.0.0'
|
|
||||||
|
|
||||||
# openresty dependency
|
# openresty dependency
|
||||||
cookbook 'jemalloc', '~> 0.1.7'
|
cookbook 'jemalloc', '~> 0.1.7'
|
||||||
|
|||||||
+3
-5
@@ -24,7 +24,7 @@ DEPENDENCIES
|
|||||||
ref: nginx
|
ref: nginx
|
||||||
mysql (~> 8.7.3)
|
mysql (~> 8.7.3)
|
||||||
nginx (= 9.0.0)
|
nginx (= 9.0.0)
|
||||||
nodejs (~> 7.3.1)
|
nodejs (~> 11.0.1)
|
||||||
ntp (= 3.4.0)
|
ntp (= 3.4.0)
|
||||||
ohai (~> 5.2.5)
|
ohai (~> 5.2.5)
|
||||||
openssl (~> 8.5.5)
|
openssl (~> 8.5.5)
|
||||||
@@ -33,7 +33,6 @@ DEPENDENCIES
|
|||||||
git: https://gitea.kosmos.org/kosmos/postfix-cookbook.git
|
git: https://gitea.kosmos.org/kosmos/postfix-cookbook.git
|
||||||
revision: dd6598572a775ae73f17527260ec8097b52d385b
|
revision: dd6598572a775ae73f17527260ec8097b52d385b
|
||||||
ref: bugfix/
|
ref: bugfix/
|
||||||
prometheus (~> 1.0.0)
|
|
||||||
redisio (~> 6.4.1)
|
redisio (~> 6.4.1)
|
||||||
ruby_build (~> 2.5.0)
|
ruby_build (~> 2.5.0)
|
||||||
timezone_iii (= 1.0.4)
|
timezone_iii (= 1.0.4)
|
||||||
@@ -87,17 +86,16 @@ GRAPH
|
|||||||
build-essential (>= 5.0)
|
build-essential (>= 5.0)
|
||||||
ohai (>= 4.1.0)
|
ohai (>= 4.1.0)
|
||||||
yum-epel (>= 0.0.0)
|
yum-epel (>= 0.0.0)
|
||||||
nodejs (7.3.3)
|
nodejs (11.0.1)
|
||||||
ark (>= 2.0.2)
|
ark (>= 2.0.2)
|
||||||
chocolatey (>= 3.0)
|
chocolatey (>= 3.0)
|
||||||
|
yum (>= 7.2)
|
||||||
ntp (3.4.0)
|
ntp (3.4.0)
|
||||||
ohai (5.2.5)
|
ohai (5.2.5)
|
||||||
openssl (8.5.5)
|
openssl (8.5.5)
|
||||||
php (8.0.1)
|
php (8.0.1)
|
||||||
yum-epel (>= 0.0.0)
|
yum-epel (>= 0.0.0)
|
||||||
postfix (6.4.1)
|
postfix (6.4.1)
|
||||||
prometheus (1.0.0)
|
|
||||||
ark (>= 0.0.0)
|
|
||||||
redisio (6.4.1)
|
redisio (6.4.1)
|
||||||
selinux (>= 0.0.0)
|
selinux (>= 0.0.0)
|
||||||
ruby_build (2.5.0)
|
ruby_build (2.5.0)
|
||||||
|
|||||||
@@ -54,6 +54,10 @@ Clone this repository, `cd` into it, and run:
|
|||||||
|
|
||||||
knife zero converge name:dev.kosmos.org --client-version 15.3.14
|
knife zero converge name:dev.kosmos.org --client-version 15.3.14
|
||||||
|
|
||||||
|
### Upgrade Chef Client on a node:
|
||||||
|
|
||||||
|
knife ssh -a knife_zero.host 'name:foo-1' 'curl -L https://chef.io/chef/install.sh | sudo bash -s -- -v 18.10.17'
|
||||||
|
|
||||||
## Managing cookbooks
|
## Managing cookbooks
|
||||||
|
|
||||||
Cookbooks are managed via Berkshelf. Run `berks --help` for command help.
|
Cookbooks are managed via Berkshelf. Run `berks --help` for command help.
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "akkounts-1",
|
|
||||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0LKcqydrG3zgtmThEg+q\nOcw8QvIB2usMkF4kNMFeqhhdr2q/AtRcq4RJ0u0MiZbkHduGWfG9QZpjmbFZcEke\nURJbddqSDPHFAtrK2+BpcMqNN/mSp59f4MJf6wdLnBoeZCF5pCCXibyj+/754Ly+\nEJNiB1sf1Lu82YW2YM7iLhOLk1QQD2DTfBGbj9swdPrgKK+1npQ4A7O8sOB5gDjb\n9QVLCvCEoYFi+9is0vw/YryEr6tfnNw+CroP2uDfyVfWznF8oPUuttAcHgqDA3CV\n7lCRk9yVt1FKwuq2lFcsMqZ7wO4EoxpzCz/XTnpFPFvgeVinyXjSPsQCBAdwJe5T\nWQIDAQAB\n-----END PUBLIC KEY-----\n"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "akkounts-2",
|
||||||
|
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAi/0X3npRvDRwPVRIWu4z\nY+9Qnj7EONuarsZ5aVuuVV/sqUpdJoQB/zYCxrF3HvNXbaDDOmIKiUiTfttWdcVK\nOIXH1IcykFSXFzT5tBof+kRVTHIVp5vtR1dAi1eCm1i7CId52Zqti0aF2/08XVUy\npWOJLlDObwn/M6i0gAQs/kGtYkFhlvZrmAkrlDYCzHb1nalyATohS9n/aNn8bvY1\noSPZb4vmlW4ln5y+tqJf8fOWlfUiIdgRnsQKFa97ijfQFbv1TGv33rhqDdsjR2jn\n7qJmYQ7U83W2cGhBiUR7N4rWY0Mig3e9UeOufVpNDLVvRcXZWx1pzDyn9pD6lk+7\nFwIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-10",
|
|
||||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw2+3Wo+KkXVJCOX1SxT9\nSdwKXgPbCDM3EI9uwoxhMxQfRyN53dxIsBDsQUVOIe1Z8yqm4FenMQlNmeDR+QLE\nvNFf1fisinW+D9VVRm+CjcJy96i/Dyt786Z6YRrDlB860HxCbfTL2Zv5BRtbyIKg\nhz5gO+9PMEpPVR2ij9iue4K6jbM1AAL2ia/P6zDWLJqeIzUocCeHV5N0Z3jXH6qr\nf444v78x35MMJ+3tg5h95SU1/PDCpdSTct4uHEuKIosiN7p4DlYMoM5iSyvVoujr\nflRQPEpGzS9qEt3rDo/F4ltzYMx6bf1tB/0QaBKD+zwPZWTTwf61tSBo5/NkGvJc\nFQIDAQAB\n-----END PUBLIC KEY-----\n"
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-12",
|
|
||||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9GtHHi298BjiIqpZ3WkT\nkYAPfWD60hFe/8icYcq/F/6cHLYKZQ4chek9X/hDCMq4tHEN6Oh58T5x/nuNdPrK\nIAMGyVAGk6ekWlmD4jwdEf6TGb/J3ffJTRDvwX/I8xD/DW3wtXsN+X24T59ByGTm\nrnwRmmmwHF3otRx9wnCsIgDQ0AjiUujsfNNv1FcLXD/WJLys9lEeU5aJ4XtHTwDv\ntJM8YyVEFhEnuvgdKmzn5+F5k9VGdUwForlFOBfvzbCnTZMDMmDVeiUtAUv/7xWQ\nQl2mLUGCtgWuYJYXsQacAJ6pa3h+7cQyshC6w3dwUG+1fS9lNO0Yp1GGX1AGYKpp\nPQIDAQAB\n-----END PUBLIC KEY-----\n"
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-13",
|
|
||||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvbqWc6OwRxgHfsQuTNL4\naxeVvNen5d9srYpZSHjuBB/k9NHB+9P6vU5qF37XHkw1lVUGeYbPHzhYsx3O0/kZ\nH5f4+4SMy/P9jc6SE7AJF4qtYKgJ88koZdqCww07c6K9g+BnEGFFZui/h3hUBxWj\nTfhBHEWPyQ2bl/lr9sIJwsEz+EN0isGn/eIXkmw9J6LdLJ5Q0LLks33K28FNOU7q\nfeAN4MiBVMUtgCGyT2Voe6WrOXwQLSDXQONOp3sfSfFExsIJ1s24xdd7AMD7/9a7\n4sFDZ4swhqAWgWmW2giR7Kb8wTvGQLO/O/uUbmKz3DZXgkOKXHdHCEB/PZx1mRNM\nEwIDAQAB\n-----END PUBLIC KEY-----\n"
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-9",
|
|
||||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnMHzKE8JBrsQkmRDeMjX\n71mBzvRzNM90cwA8xtvIkXesdTyGqohX9k/PJbCY5ySGK9PpMaYDPVAnwnUP8LFQ\n3G98aSbLxUjqU/PBzRsnWpihehr05uz9zYcNFzr4LTNvGQZsq47nN9Tk+LG3zHP7\nAZViv2mJ4ZRnukXf6KHlyoVvhuTu+tiBM8QzjTF97iP/aguNPzYHmrecy9Uf5bSA\nZrbNZT+ayxtgswC2OclhRucx7XLSuHXtpwFqsQzSAhiX1aQ3wwCyH9WJtVwpfUsE\nlxTjcQiSM9aPZ8iSC0shpBaKD1j3iF/2K2Jk+88++zMhJJPLermvaJxzsdePgvyk\nKQIDAQAB\n-----END PUBLIC KEY-----\n"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "redis-3",
|
||||||
|
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoRDTlMy6e+GXmen1nvQL\nTlbfXosRk1qTiqXYKtH0fmXz6i0OchBeNj4xZP+UvkrKcsifoumScGhSslQo1lzU\nASAJe5/lG1govkK27UFXwnYPZGRaB13CXJSDe5nbhga21HdDBbZOYttYa8/xQIes\nkbUGUu6uzJKXux5tiOD1ZhQTVIgnXx0ELjeRvRR4NOqEaXW+PPht6pK9MFFoN3tf\nnG/vt19QBM6Eox+UuKqSYloBseu8HRbves7jN4g/ml4qdjftgXft9H6OGCPmv+rA\nyRezzcVN7L092y3Ti+d6RftOBnIl8ABlURChnEFvUFxNRtT/0Zo7321w2TaDBfGa\n2wIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "redis-4",
|
||||||
|
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn3Zdzfao+n3PdtlJlViJ\nnpVDcL8ofw2rb2/VK7ivpWMKaL7mOq8HIQ+R+ghvllX/vPmN6co3+aUxOvvQ6KGC\nmAcnc7StqOpYUK0g6QZFROESO0vz1hy078AL9D2dEwOj7XS8leWCQyGgA1Z89T9n\naatXqEF1zGuvnVLA340prYkJk5S1X6KHq1WIi9H23hYehvGZlpkJ87wv8sKIo4Y3\nzIVA5hio0t0q+JyStOGr+xRl3mM43b25XcIh2ibrzKp3YoRWSCvMfhAdMKm1WEEI\njM/3fQRtkI1OQSb0o/wUoAmpUEEOTIvbWU2SuFVY7HYRuPwEilvbrGZKgrvbp8R+\nZQIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "rsk-testnet-5",
|
|
||||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx/UHlgcSeh9Do7CTCKXC\n/4/aO2OvT+ijDVmrMYCNtE4sMeuFqKPnV1zxJZmRm4VNhkSQDkdWYD+6XvuFYW60\nyjB/N6D5lLlyjG4HD6fTkfh0K6f7t5mOYV7o4T59OoA3cBZuSROjtWmJ8jEFJ+k9\nII2kcyhPQcFN01ckzvZKRSPbVRccMoc+AKTjB3ZUfs/ERtlVoDrK4jEHluXOxUJO\nBKCcLonjJuLlpRLh7QfKrKFcR4idn5Ir43R6aSUesI/ipKwKsXnR3Bu7vXp74VF3\nMJ3EkdSBG+qJzy51fbRfQiUPAr/vSoVQZwW7FkIhIqqLkMaYCymn7qKfTGujoNU7\nlwIDAQAB\n-----END PUBLIC KEY-----\n"
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "uploads-1",
|
|
||||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwJwWaz8TeGv3SFlKzLMx\nqN8GTL/c0N9ppBvv8xNSS/yF9Y40SbL418uxYzm9hIhOXgIygIgLT2EKIXX32t+R\neOJCdYycQFM3At2fhMkjhuUW0gmDRcYBcBJLC5hLh2EZ+A8V7k4qgrBpPLOjEv48\nhQY0vuAw2DGndWr4QLh5NLUmQiOrfuzcZSSNCBOTIgUZgNmRd9QcCHDq4WDH3poa\nosJo4a9JGEGUL1irOivvEdyJPwEd2f++nYAdWwj8pjCYgpRshQlLhxOlylMx7MxB\nQt2bgJC9sahfbfJCOqdlCU3DMJL0bRUiuxK77WeSsxWBJmrsiF3+Ljs2Ix+s7fnS\nywIDAQAB\n-----END PUBLIC KEY-----\n"
|
|
||||||
}
|
|
||||||
+3
@@ -3,7 +3,10 @@ config:
|
|||||||
line-length: false # MD013
|
line-length: false # MD013
|
||||||
no-duplicate-heading: false # MD024
|
no-duplicate-heading: false # MD024
|
||||||
reference-links-images: false # MD052
|
reference-links-images: false # MD052
|
||||||
|
ul-style:
|
||||||
|
style: asterisk
|
||||||
no-multiple-blanks:
|
no-multiple-blanks:
|
||||||
maximum: 2
|
maximum: 2
|
||||||
ignores:
|
ignores:
|
||||||
- .github/copilot-instructions.md
|
- .github/copilot-instructions.md
|
||||||
|
- .windsurf/**
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
".": "11.0.1"
|
||||||
|
}
|
||||||
+261
-126
@@ -1,221 +1,356 @@
|
|||||||
# NodeJS Cookbook Changelog
|
# NodeJS Cookbook Changelog
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## [11.0.1](https://github.com/sous-chefs/nodejs/compare/v11.0.0...v11.0.1) (2026-07-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* migrate to Policyfile ([#315](https://github.com/sous-chefs/nodejs/issues/315)) ([0a481e2](https://github.com/sous-chefs/nodejs/commit/0a481e22c2dcb811800219f96d24ba95bca583da))
|
||||||
|
|
||||||
|
## [11.0.0](https://github.com/sous-chefs/nodejs/compare/v10.2.3...v11.0.0) (2026-05-19)
|
||||||
|
|
||||||
|
|
||||||
|
### ⚠ BREAKING CHANGES
|
||||||
|
|
||||||
|
* migrate nodejs to custom resources ([#306](https://github.com/sous-chefs/nodejs/issues/306))
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* migrate nodejs to custom resources ([#306](https://github.com/sous-chefs/nodejs/issues/306)) ([a941d0f](https://github.com/sous-chefs/nodejs/commit/a941d0f729fad8b386cd8886ad9c232ed41b57e5))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **ci:** Update workflows to use release pipeline ([#300](https://github.com/sous-chefs/nodejs/issues/300)) ([ef16e2c](https://github.com/sous-chefs/nodejs/commit/ef16e2ce7d32be9d50822926a8d09e30d4a54bad))
|
||||||
|
|
||||||
|
## [10.2.3](https://github.com/sous-chefs/nodejs/compare/10.2.2...v10.2.3) (2025-10-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **ci:** Update workflows to use release pipeline ([#300](https://github.com/sous-chefs/nodejs/issues/300)) ([ef16e2c](https://github.com/sous-chefs/nodejs/commit/ef16e2ce7d32be9d50822926a8d09e30d4a54bad))
|
||||||
|
|
||||||
|
## 10.2.1 - *2025-06-08*
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 10.2.0 - *2024-11-20*
|
||||||
|
|
||||||
|
* Add support for new NodeSource repository (Thanks to @stissot)
|
||||||
|
* Rework source install packages
|
||||||
|
* Update SUSE packages
|
||||||
|
|
||||||
|
## 10.1.22 - *2024-11-19*
|
||||||
|
|
||||||
|
* Update default version to current LTS
|
||||||
|
|
||||||
|
## 10.1.21 - *2024-11-19*
|
||||||
|
|
||||||
|
* Update CI platforms
|
||||||
|
|
||||||
|
## 10.1.20 - *2024-11-18*
|
||||||
|
|
||||||
|
* Update test matrix check success of the integration stage
|
||||||
|
|
||||||
|
## 10.1.19 - *2024-11-18*
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 10.1.16 - *2024-05-03*
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 10.1.10 - *2023-04-07*
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 10.1.7 - *2023-04-01*
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 10.1.6 - *2023-03-20*
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 10.1.5 - *2023-03-15*
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 10.1.4 - *2023-02-20*
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 10.1.2 - *2023-02-14*
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 10.1.1 - *2022-12-08*
|
||||||
|
|
||||||
|
Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 10.1.0 - *2022-08-08*
|
||||||
|
|
||||||
|
* To ensure consistent environment between `npm install` and `npm list`, pass same environment variables.
|
||||||
|
|
||||||
|
## 10.0.1 - *2022-08-07*
|
||||||
|
|
||||||
|
* Standardise files with files in sous-chefs/repo-management
|
||||||
|
* Default to using EL 9 repo for Fedora
|
||||||
|
* CI: Remove Fedora from source suite
|
||||||
|
|
||||||
|
## 10.0.0 - *2022-04-21*
|
||||||
|
|
||||||
|
* Update to NodeJS 17.x
|
||||||
|
* Remove delivery and move to calling RSpec directly via a reusable workflow
|
||||||
|
* Update tested platforms
|
||||||
|
* Disable upstream DNF module on EL8 based systems
|
||||||
|
|
||||||
|
## 9.0.2 - *2022-02-17*
|
||||||
|
|
||||||
|
* Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
|
## 9.0.1 - *2022-02-08*
|
||||||
|
|
||||||
|
* Remove delivery folder
|
||||||
|
|
||||||
|
## 9.0.0 - *2021-09-13*
|
||||||
|
|
||||||
|
* Update the default version to 14 LTS
|
||||||
|
* Remove testing for EOL platforms
|
||||||
|
* Add Debian 11 testing
|
||||||
|
* Fix release version to use for Amazon Linux
|
||||||
|
|
||||||
|
## 8.0.0 - *2021-09-02*
|
||||||
|
|
||||||
|
* Update metadata and README to Sous Chef
|
||||||
|
* Enable unified_mode by default and require at least Chef Infra Client 15.3
|
||||||
|
* Cookstyle fixes
|
||||||
|
|
||||||
## 7.3.3 - *2021-08-30*
|
## 7.3.3 - *2021-08-30*
|
||||||
|
|
||||||
- Standardise files with files in sous-chefs/repo-management
|
* Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
## 7.3.2 - *2021-06-01*
|
## 7.3.2 - *2021-06-01*
|
||||||
|
|
||||||
- Standardise files with files in sous-chefs/repo-management
|
* Standardise files with files in sous-chefs/repo-management
|
||||||
|
|
||||||
## 7.3.1 - *2020-12-31*
|
## 7.3.1 - *2020-12-31*
|
||||||
|
|
||||||
- resolved cookstyle error: attributes/packages.rb:15:55 convention: `Layout/TrailingEmptyLines`
|
* resolved cookstyle error: attributes/packages.rb:15:55 convention: `Layout/TrailingEmptyLines`
|
||||||
- resolved cookstyle error: test/cookbooks/test/recipes/resource.rb:118:1 convention: `Layout/TrailingEmptyLines`
|
* resolved cookstyle error: test/cookbooks/test/recipes/resource.rb:118:1 convention: `Layout/TrailingEmptyLines`
|
||||||
- Enable builds for opensuse-leap-15
|
* Enable builds for opensuse-leap-15
|
||||||
- Add a library method test
|
* Add a library method test
|
||||||
|
|
||||||
## 7.3.0 (2020-10-21)
|
## 7.3.0 (2020-10-21)
|
||||||
|
|
||||||
- Add rspec tests for the library methods
|
* Add rspec tests for the library methods
|
||||||
- Update the url_invalid? method to return false if it detects an invalid uri
|
* Update the url_invalid? method to return false if it detects an invalid uri
|
||||||
- Add the auto_update option to the npm_package resource. Allows turning off auto_update of npm packages.
|
* Add the auto_update option to the npm_package resource. Allows turning off auto_update of npm packages.
|
||||||
- Allow actions and options for OS package installation to be specified as attributes
|
* Allow actions and options for OS package installation to be specified as attributes
|
||||||
- Add the live_stream parameter to the npm_package execution to get better installation diagnostics
|
* Add the live_stream parameter to the npm_package execution to get better installation diagnostics
|
||||||
- Add the auto_update option to the npm_package resource. Allows turning off auto_update of npm packages.
|
* Add the auto_update option to the npm_package resource. Allows turning off auto_update of npm packages.
|
||||||
- Update testing
|
* Update testing
|
||||||
|
|
||||||
## 7.2.0 (2020-10-07)
|
## 7.2.0 (2020-10-07)
|
||||||
|
|
||||||
- Verify the URI of installed packages to help determine if a good URI has been installed
|
* Verify the URI of installed packages to help determine if a good URI has been installed
|
||||||
- Add tests that verify npm-package installed packages
|
* Add tests that verify npm-package installed packages
|
||||||
- Get the example test cookbook working
|
* Get the example test cookbook working
|
||||||
- Add support for installing node on windows
|
* Add support for installing node on windows
|
||||||
|
|
||||||
## 7.1.0 (2020-10-01)
|
## 7.1.0 (2020-10-01)
|
||||||
|
|
||||||
- resolved cookstyle error: recipes/nodejs_from_binary.rb:19:1 refactor: `ChefCorrectness/IncorrectLibraryInjection`
|
* resolved cookstyle error: recipes/nodejs_from_binary.rb:19:1 refactor: `ChefCorrectness/IncorrectLibraryInjection`
|
||||||
- resolved cookstyle error: recipes/nodejs_from_source.rb:21:1 refactor: `ChefCorrectness/IncorrectLibraryInjection`
|
* resolved cookstyle error: recipes/nodejs_from_source.rb:21:1 refactor: `ChefCorrectness/IncorrectLibraryInjection`
|
||||||
- resolved cookstyle error: recipes/npm_from_source.rb:21:1 refactor: `ChefCorrectness/IncorrectLibraryInjection`
|
* resolved cookstyle error: recipes/npm_from_source.rb:21:1 refactor: `ChefCorrectness/IncorrectLibraryInjection`
|
||||||
- Have ark setup node and npm binaries into PATH
|
* Have ark setup node and npm binaries into PATH
|
||||||
- Add `node_env` to `npm_package` in order to set `NODE_ENV` (useful for some packages)
|
* Add `node_env` to `npm_package` in order to set `NODE_ENV` (useful for some packages)
|
||||||
- Include `npx` as a binary in addition to `npm`, it has been [included since `npm` v5.2.0](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b)
|
* Include `npx` as a binary in addition to `npm`, it has been [included since `npm` v5.2.0](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b)
|
||||||
|
|
||||||
## 7.0.1 (2020-06-04)
|
## 7.0.1 (2020-06-04)
|
||||||
|
|
||||||
- Minor readme fix
|
* Minor readme fix
|
||||||
|
|
||||||
## 7.0.0 (2020-06-04)
|
## 7.0.0 (2020-06-04)
|
||||||
|
|
||||||
- Require Chef Infra Client 14+ and remove the build-essential dependency
|
* Require Chef Infra Client 14+ and remove the build-essential dependency
|
||||||
- Updated the default to Node.js v10.16.3
|
* Updated the default to Node.js v10.16.3
|
||||||
- Added compatibility with Chef Infra Client 16.2+
|
* Added compatibility with Chef Infra Client 16.2+
|
||||||
- Removed Foodcritic testing
|
* Removed Foodcritic testing
|
||||||
- Updated ChefSpec and Kitchen platforms
|
* Updated ChefSpec and Kitchen platforms
|
||||||
- Resolved multiple minor cookstyle issues in the cookbook
|
* Resolved multiple minor cookstyle issues in the cookbook
|
||||||
- Added a vscode editor config
|
* Added a vscode editor config
|
||||||
|
|
||||||
## 6.0.0 (2018-10-11)
|
## 6.0.0 (2018-10-11)
|
||||||
|
|
||||||
- Use the build_essential resource in the source install recipe instead of the build-essential::default recipe. This way we can use the new built-in build_essential resource in Chef 14+
|
* Use the build_essential resource in the source install recipe instead of the build-essential::default recipe. This way we can use the new built-in build_essential resource in Chef 14+
|
||||||
- Set default version to Node.js v8.12.0
|
* Set default version to Node.js v8.12.0
|
||||||
|
|
||||||
## 5.0.0 (2017-11-15)
|
## 5.0.0 (2017-11-15)
|
||||||
|
|
||||||
- nodejs_npm resource has been converted to a custom resource and renamed to npm_package. The existing resource name will continue to function, but over time code should be updated for the new name. This name change has been made so we can eventually merge this resource into the chef-client.
|
* nodejs_npm resource has been converted to a custom resource and renamed to npm_package. The existing resource name will continue to function, but over time code should be updated for the new name. This name change has been made so we can eventually merge this resource into the chef-client.
|
||||||
- compat_resource cookbook dependency has been removed and this cookbook instead requires Chef 12.14 or later
|
* compat_resource cookbook dependency has been removed and this cookbook instead requires Chef 12.14 or later
|
||||||
- Chef 13 compatibility has been resolved
|
* Chef 13 compatibility has been resolved
|
||||||
- The npm_package resource now properly installs packages when the 'package' property is setA
|
* The npm_package resource now properly installs packages when the 'package' property is setA
|
||||||
- Speed up npm operations by only returning a list of the desired package instead of every npm package
|
* Speed up npm operations by only returning a list of the desired package instead of every npm package
|
||||||
- Speed up source installation by using multipackage install for the dependencies
|
* Speed up source installation by using multipackage install for the dependencies
|
||||||
- Remove the broken url_valid? helper which didn't work
|
* Remove the broken url_valid? helper which didn't work
|
||||||
|
|
||||||
## 4.0.0 (2017-07-11)
|
## 4.0.0 (2017-07-11)
|
||||||
|
|
||||||
- Updated the cookbook to require Chef 12.1+ and the compat_resource cookbook
|
* Updated the cookbook to require Chef 12.1+ and the compat_resource cookbook
|
||||||
- Removed support for io.js which has merged back into the node.js project
|
* Removed support for io.js which has merged back into the node.js project
|
||||||
- Removed the dependency on homebrew, yum-epel, and apt cookbooks
|
* Removed the dependency on homebrew, yum-epel, and apt cookbooks
|
||||||
- Added node['nodejs']['manage_node'] attribute to use only cookbook's LWRP (required to manage node by nvm)
|
* Added node['nodejs']['manage_node'] attribute to use only cookbook's LWRP (required to manage node by nvm)
|
||||||
- Updated the default repository URLs to be the 6.X repos
|
* Updated the default repository URLs to be the 6.X repos
|
||||||
- Added initial support for Suse and Amazon Linux
|
* Added initial support for Suse and Amazon Linux
|
||||||
- Improved architecture detection to support aarch64
|
* Improved architecture detection to support aarch64
|
||||||
- Improved readme with examples for fetching your own binaries
|
* Improved readme with examples for fetching your own binaries
|
||||||
- Added installation of openssl and xz utilities that are needed for the binary install recipe
|
* Added installation of openssl and xz utilities that are needed for the binary install recipe
|
||||||
- Updated the cookbook license string to be an SPDX compliant string
|
* Updated the cookbook license string to be an SPDX compliant string
|
||||||
- Set the minimum version of the ark cookbook to 2.0.2 in order to support Suse
|
* Set the minimum version of the ark cookbook to 2.0.2 in order to support Suse
|
||||||
- Updated the default version from 6.9.1 to 6.10.2
|
* Updated the default version from 6.9.1 to 6.10.2
|
||||||
- Switched to Delivery local mode for testing
|
* Switched to Delivery local mode for testing
|
||||||
- Added Integration testing in Travis CI with kitchen-dokken and ChefDK
|
* Added Integration testing in Travis CI with kitchen-dokken and ChefDK
|
||||||
|
|
||||||
## 3.0.0 (2016-11-02)
|
## 3.0.0 (2016-11-02)
|
||||||
|
|
||||||
- Updated the default release to the nodejs 6.9.1\. This requires C++11 extensions to compile, which are only present in GCC 4.8+. Due to this RHEL 5/6 and Ubuntu 12.04 are not supported if using this version.
|
* Updated the default release to the nodejs 6.9.1\. This requires C++11 extensions to compile, which are only present in GCC 4.8+. Due to this RHEL 5/6 and Ubuntu 12.04 are not supported if using this version.
|
||||||
- Switched the download URLs to the .xz packages since the .tar.gz packages are no longer being created
|
* Switched the download URLs to the .xz packages since the .tar.gz packages are no longer being created
|
||||||
- Improvements to the readme examples and requirements sections
|
* Improvements to the readme examples and requirements sections
|
||||||
- Removed installation of apt-transport-https and instead rely on an apt cookbook that will do the same
|
* Removed installation of apt-transport-https and instead rely on an apt cookbook that will do the same
|
||||||
- Fixed the ChefSpec matchers
|
* Fixed the ChefSpec matchers
|
||||||
- Added Scientific, Oracle, and Amazon as supported distros in the metadata
|
* Added Scientific, Oracle, and Amazon as supported distros in the metadata
|
||||||
- Added chef_version metadata
|
* Added chef_version metadata
|
||||||
- Removed conflicts and suggests metadata which aren't implemented or recommended for use
|
* Removed conflicts and suggests metadata which aren't implemented or recommended for use
|
||||||
- Removed Chef 10 compatibility code
|
* Removed Chef 10 compatibility code
|
||||||
- Switched Integration testing to Inspec from bats
|
* Switched Integration testing to Inspec from bats
|
||||||
- Added the Apache 2.0 license file to the repo
|
* Added the Apache 2.0 license file to the repo
|
||||||
- Expanded Test Kitchen testing
|
* Expanded Test Kitchen testing
|
||||||
- Switched from Rubocop to Cookstyle and resolved all warnings
|
* Switched from Rubocop to Cookstyle and resolved all warnings
|
||||||
- Switched Travis to testing using ChefDK
|
* Switched Travis to testing using ChefDK
|
||||||
|
|
||||||
## 2.4.4
|
## 2.4.4
|
||||||
|
|
||||||
- Use HTTPS prefix URLs for node download #98
|
* Use HTTPS prefix URLs for node download #98
|
||||||
- Update NPM symlink when installing from source #105
|
* Update NPM symlink when installing from source #105
|
||||||
- Add support for NPM private modules #107
|
* Add support for NPM private modules #107
|
||||||
|
|
||||||
## v2.4.2
|
## v2.4.2
|
||||||
|
|
||||||
- Fix check version
|
* Fix check version
|
||||||
- Support iojs package install
|
* Support iojs package install
|
||||||
|
|
||||||
## v2.4.0
|
## v2.4.0
|
||||||
|
|
||||||
- Move `npm_packages` to his own recipe
|
* Move `npm_packages` to his own recipe
|
||||||
- Fix different race conditions when using direct recipe call
|
* Fix different race conditions when using direct recipe call
|
||||||
- Fix npm recipe
|
* Fix npm recipe
|
||||||
|
|
||||||
## v2.3.2
|
## v2.3.2
|
||||||
|
|
||||||
- Fix package recipe
|
* Fix package recipe
|
||||||
|
|
||||||
## v2.3.0
|
## v2.3.0
|
||||||
|
|
||||||
- Support io.js. Use node['nodejs']['engine'].
|
* Support io.js. Use node['nodejs']['engine'].
|
||||||
- Add MacOS support via homebrew
|
* Add MacOS support via homebrew
|
||||||
|
|
||||||
## v2.2.0
|
## v2.2.0
|
||||||
|
|
||||||
- Add node['nodejs']['keyserver']
|
* Add node['nodejs']['keyserver']
|
||||||
- Update arm checksum
|
* Update arm checksum
|
||||||
- Fix `npm_packages` JSON
|
* Fix `npm_packages` JSON
|
||||||
|
|
||||||
## v2.1.0
|
## v2.1.0
|
||||||
|
|
||||||
- Use official nodesource repository
|
* Use official nodesource repository
|
||||||
- Add node['nodejs']['npm_packages'] to install npm package with `default` recipe
|
* Add node['nodejs']['npm_packages'] to install npm package with `default` recipe
|
||||||
|
|
||||||
## v2.0.0
|
## v2.0.0
|
||||||
|
|
||||||
- Travis integration
|
* Travis integration
|
||||||
- Gems updated
|
* Gems updated
|
||||||
- Rewrite cookbook dependencies
|
* Rewrite cookbook dependencies
|
||||||
- Added complete test-kitchen integration : Rake, rubocop, foodcritic, vagrant, bats testing ...
|
* Added complete test-kitchen integration : Rake, rubocop, foodcritic, vagrant, bats testing ...
|
||||||
- Added NodeJS `install_method` option (sources, bins or packages)
|
* Added NodeJS `install_method` option (sources, bins or packages)
|
||||||
- Added NPM `install_method` option (sources or packages)
|
* Added NPM `install_method` option (sources or packages)
|
||||||
- NPM version can now be chosen independently from nodejs' embedded version
|
* NPM version can now be chosen independently from nodejs' embedded version
|
||||||
- Added a `nodejs_npm` LWRP to manage, install and resolve NPM packages
|
* Added a `nodejs_npm` LWRP to manage, install and resolve NPM packages
|
||||||
|
|
||||||
## v1.3.0
|
## v1.3.0
|
||||||
|
|
||||||
- update default versions to the latest: node - v0.10.15 and npm - v1.3.5
|
* update default versions to the latest: node - v0.10.15 and npm - v1.3.5
|
||||||
- default to package installation of nodejs on smartos ([@wanelo-pair])
|
* default to package installation of nodejs on smartos ([@wanelo-pair])
|
||||||
- Add Raspberry pi support ([@robertkowalski])
|
* Add Raspberry pi support ([@robertkowalski])
|
||||||
|
|
||||||
## v1.2.0
|
## v1.2.0
|
||||||
|
|
||||||
- implement installation from package on RedHat - ([@vaskas])
|
* implement installation from package on RedHat - ([@vaskas])
|
||||||
|
|
||||||
## v1.1.3
|
## v1.1.3
|
||||||
|
|
||||||
- update default version of node to 0.10.13 - and npm - v1.3.4 ([@jodosha][])
|
* update default version of node to 0.10.13 - and npm - v1.3.4 ([@jodosha][])
|
||||||
|
|
||||||
## v1.1.2
|
## v1.1.2
|
||||||
|
|
||||||
- update default version of node to 0.10.2 - ([@bakins])
|
* update default version of node to 0.10.2 - ([@bakins])
|
||||||
- fully migrated to test-kitchen 1.alpha and vagrant 1.1.x/berkshelf 1.3.1
|
* fully migrated to test-kitchen 1.alpha and vagrant 1.1.x/berkshelf 1.3.1
|
||||||
|
|
||||||
## v1.1.1
|
## v1.1.1
|
||||||
|
|
||||||
- update default versions to the latest: node - v0.10.0 and npm - v1.2.14
|
* update default versions to the latest: node - v0.10.0 and npm - v1.2.14
|
||||||
- `make_thread` is now a real attribute - ([@ChrisLundquist])
|
* `make_thread` is now a real attribute - ([@ChrisLundquist])
|
||||||
|
|
||||||
## v1.1.0
|
## v1.1.0
|
||||||
|
|
||||||
- rewrite the package install; remove rpm support since there are no longer any packages available anywhere
|
* rewrite the package install; remove rpm support since there are no longer any packages available anywhere
|
||||||
- add support to install `legacy_packages` from ubuntu repo as well as the latest 0.10.x branch (this is default).
|
* add support to install `legacy_packages` from ubuntu repo as well as the latest 0.10.x branch (this is default).
|
||||||
|
|
||||||
## v1.0.4
|
## v1.0.4
|
||||||
|
|
||||||
- add support for binary installation method ([@JulesAU])
|
* add support for binary installation method ([@JulesAU])
|
||||||
|
|
||||||
## v1.0.3
|
## v1.0.3
|
||||||
|
|
||||||
- 7.3.1 - *2020-12-31*
|
* 7.3.1 - *2020-12-31*
|
||||||
|
|
||||||
## v1.0.2
|
## v1.0.2
|
||||||
|
|
||||||
- add smartos support for package install ([@sax])
|
* add smartos support for package install ([@sax])
|
||||||
- support to compile with all processors available (default 2 if unknown) - ([@ChrisLundquist])
|
* support to compile with all processors available (default 2 if unknown) - ([@ChrisLundquist])
|
||||||
- moved to `platform_family` syntax
|
* moved to `platform_family` syntax
|
||||||
- ensure npm recipe honours the 'source' or 'package' setting - ([@markbirbeck])
|
* ensure npm recipe honours the 'source' or 'package' setting - ([@markbirbeck])
|
||||||
- updated the default versions to the latest stable node/npm
|
* updated the default versions to the latest stable node/npm
|
||||||
|
|
||||||
## v1.0.1
|
## v1.0.1
|
||||||
|
|
||||||
- fixed bug that prevented overwritting the node/npm versions (moved the `src_url`s as local variables instead of attributes) - ([@johannesbecker])
|
* fixed bug that prevented overwritting the node/npm versions (moved the `src_url`s as local variables instead of attributes) - ([@johannesbecker])
|
||||||
- updated the default versions to the latest node/npm
|
* updated the default versions to the latest node/npm
|
||||||
|
|
||||||
## v1.0.0
|
## v1.0.0
|
||||||
|
|
||||||
- added packages installation support ([@smith])
|
* added packages installation support ([@smith])
|
||||||
|
|
||||||
[@bakins]: https://github.com/bakins
|
[@bakins]: <https://github.com/bakins>
|
||||||
[@chrislundquist]: https://github.com/ChrisLundquist
|
[@chrislundquist]: <https://github.com/ChrisLundquist>
|
||||||
[@gmccue]: https://github.com/gmccue
|
[@johannesbecker]: <https://github.com/johannesbecker>
|
||||||
[@johannesbecker]: https://github.com/johannesbecker
|
[@julesau]: <https://github.com/JulesAU>
|
||||||
[@julesau]: https://github.com/JulesAU
|
[@markbirbeck]: <https://github.com/markbirbeck>
|
||||||
[@markbirbeck]: https://github.com/markbirbeck
|
[@robertkowalski]: <https://github.com/robertkowalski>
|
||||||
[@predominant]: https://github.com/predominant
|
[@sax]: <https://github.com/sax>
|
||||||
[@robertkowalski]: https://github.com/robertkowalski
|
[@smith]: <https://github.com/smith>
|
||||||
[@sax]: https://github.com/sax
|
[@vaskas]: <https://github.com/vaskas>
|
||||||
[@sjlu]: https://github.com/sjlu
|
[@wanelo-pair]: <https://github.com/wanelo-pair>
|
||||||
[@smith]: https://github.com/smith
|
|
||||||
[@vaskas]: https://github.com/vaskas
|
|
||||||
[@wanelo-pair]: https://github.com/wanelo-pair
|
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
# Limitations
|
||||||
|
|
||||||
|
This cookbook defaults to Node.js 24 LTS, using Node.js v24.15.0 checksums from the official `SHASUMS256.txt` published for `latest-v24.x` on 2026-04-16.
|
||||||
|
|
||||||
|
Sources checked on 2026-04-29:
|
||||||
|
|
||||||
|
* Node.js release schedule: <https://github.com/nodejs/Release/blob/main/schedule.json>
|
||||||
|
* Node.js latest v24 artifacts: <https://nodejs.org/dist/latest-v24.x/>
|
||||||
|
* Node.js v24 checksums: <https://nodejs.org/dist/latest-v24.x/SHASUMS256.txt>
|
||||||
|
* NodeSource distributions page: <https://nodesource.com/products/distributions>
|
||||||
|
* NodeSource distributions repository: <https://github.com/nodesource/distributions>
|
||||||
|
|
||||||
|
## Package Availability
|
||||||
|
|
||||||
|
### APT (Debian/Ubuntu)
|
||||||
|
|
||||||
|
NodeSource documents Node 24 packages for:
|
||||||
|
|
||||||
|
* Ubuntu 20.04, 22.04, 24.04: `amd64`, `armhf`, `arm64`
|
||||||
|
* Debian 10, 11, 12: `amd64`, `armhf`, `arm64`
|
||||||
|
|
||||||
|
The cookbook only declares currently supported, non-EOL Debian/Ubuntu platforms in `metadata.rb`: Debian 12 or later and Ubuntu 22.04 or later. NodeSource packages use the `nodistro` repository distribution.
|
||||||
|
|
||||||
|
### DNF/YUM (RHEL family)
|
||||||
|
|
||||||
|
NodeSource documents RPM packages for RHEL 8/9, Fedora 29+, and Amazon Linux 2023 on `x86_64` and `arm64`. The repository URL pattern used by this cookbook is:
|
||||||
|
|
||||||
|
```text
|
||||||
|
<https://rpm.nodesource.com/pub_<major>>.x/nodistro/nodejs/$basearch
|
||||||
|
```
|
||||||
|
|
||||||
|
The cookbook declares AlmaLinux, Amazon Linux 2023, CentOS Stream, Fedora, Oracle Linux, Red Hat, and Rocky Linux where current test images are available.
|
||||||
|
|
||||||
|
### Zypper (SUSE)
|
||||||
|
|
||||||
|
NodeSource does not publish SUSE repository rows in the current distributions documentation. This migration does not declare SUSE/openSUSE support in `metadata.rb`.
|
||||||
|
|
||||||
|
### Windows and macOS
|
||||||
|
|
||||||
|
Windows support is limited to `nodejs_install` with `install_method 'chocolatey'`. macOS support is limited to package installation through the platform package provider where available. Dokken coverage is Linux-only.
|
||||||
|
|
||||||
|
## Architecture Limitations
|
||||||
|
|
||||||
|
Official Node.js v24.15.0 source and binary checksums pinned by this cookbook:
|
||||||
|
|
||||||
|
| Artifact | SHA256 |
|
||||||
|
| ---------------------------------- | ------------------------------------------------------------------ |
|
||||||
|
| `node-v24.15.0.tar.gz` | `729de494dd2872e5a3a6c32a1cd156a5413d4aca2772b2d873ee86bb5531bcd9` |
|
||||||
|
| `node-v24.15.0-linux-x64.tar.gz` | `44836872d9aec49f1e6b52a9a922872db9a2b02d235a616a5681b6a85fec8d89` |
|
||||||
|
| `node-v24.15.0-linux-arm64.tar.gz` | `73afc234d558c24919875f51c2d1ea002a2ada4ea6f83601a383869fefa64eed` |
|
||||||
|
|
||||||
|
The `nodejs_install` binary action currently models Linux `x64` and `arm64` checksums. Other official Node.js artifacts can be installed by passing `binary_url` and the matching checksum.
|
||||||
|
|
||||||
|
## Source/Compiled Installation
|
||||||
|
|
||||||
|
### Build Dependencies
|
||||||
|
|
||||||
|
| Platform Family | Packages |
|
||||||
|
| ------------------ | ---------------------------------------------------- |
|
||||||
|
| Debian | `build-essential`, `libssl-dev`, `python3` |
|
||||||
|
| RHEL/Fedora/Amazon | `build-essential`, `openssl-devel`, `python3`, `tar` |
|
||||||
|
| Other | `build-essential`, `python3` |
|
||||||
|
|
||||||
|
Source builds are much slower than package or binary installs and are not used as the default Kitchen smoke path.
|
||||||
|
|
||||||
|
## Known Issues
|
||||||
|
|
||||||
|
* Node.js 20 reaches end-of-life on 2026-04-30, so this migration does not keep old Node 20 defaults.
|
||||||
|
* NodeSource repository docs currently show some LTS/current labels that lag the official Node.js release schedule. The cookbook version defaults follow the official Node.js release schedule and official Node.js checksum artifacts.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
name 'nodejs'
|
||||||
|
|
||||||
|
default_source :supermarket
|
||||||
|
|
||||||
|
run_list 'recipe[test::default]'
|
||||||
|
|
||||||
|
cookbook 'nodejs', path: '.'
|
||||||
|
cookbook 'test', path: './test/cookbooks/test'
|
||||||
|
|
||||||
|
Dir.children('./test/cookbooks/test/recipes').grep(/\.rb\z/).sort.each do |recipe|
|
||||||
|
recipe_name = File.basename(recipe, '.rb')
|
||||||
|
|
||||||
|
named_run_list recipe_name.to_sym, "recipe[test::#{recipe_name}]"
|
||||||
|
end
|
||||||
+63
-174
@@ -1,220 +1,109 @@
|
|||||||
# [nodejs-cookbook](https://github.com/redguide/nodejs)
|
# [nodejs-cookbook](https://github.com/redguide/nodejs)
|
||||||
|
|
||||||
[](https://supermarket.chef.io/cookbooks/nodejs) [](https://travis-ci.org/redguide/nodejs)
|
[](https://supermarket.chef.io/cookbooks/nodejs)
|
||||||
|
[](https://github.com/sous-chefs/nodejs/actions?query=workflow%3Aci)
|
||||||
|
[](#backers)
|
||||||
|
[](#sponsors)
|
||||||
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
|
|
||||||
Installs node.js/npm and includes a resource for managing npm packages
|
Provides custom resources for installing Node.js/npm and managing npm packages.
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit [sous-chefs.org](https://sous-chefs.org/) or come chat with us on the Chef Community Slack in [#sous-chefs](https://chefcommunity.slack.com/messages/C2V7B88SF).
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
### Platforms
|
### Platforms
|
||||||
|
|
||||||
- Debian/Ubuntu
|
* Debian/Ubuntu
|
||||||
- RHEL/CentOS/Scientific/Amazon/Oracle
|
* RHEL family/Fedora/Amazon Linux
|
||||||
- openSUSE
|
* macOS where platform packages are available
|
||||||
- Windows
|
* Windows through Chocolatey
|
||||||
|
|
||||||
Note: Source installs require GCC 4.8+, which is not included on older distro releases
|
|
||||||
|
|
||||||
### Chef
|
### Chef
|
||||||
|
|
||||||
- Chef Infra Client 14+
|
* Chef Infra Client 15.3+
|
||||||
|
|
||||||
### Cookbooks
|
### Cookbooks
|
||||||
|
|
||||||
- ark
|
* ark
|
||||||
|
* chocolatey
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Include the nodejs recipe to install node on your system based on the default installation method:
|
Install Node.js with the default platform method:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
include_recipe "nodejs"
|
nodejs_install 'nodejs'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install methods
|
|
||||||
|
|
||||||
#### Package
|
|
||||||
|
|
||||||
Install node from packages:
|
Install node from packages:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
node['nodejs']['install_method'] = 'package' # Not necessary because it's the default
|
nodejs_install 'nodejs' do
|
||||||
include_recipe "nodejs"
|
install_method 'package'
|
||||||
# Or
|
version '24.15.0'
|
||||||
include_recipe "nodejs::nodejs_from_package"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
By default this will setup deb/rpm repositories from nodesource.com, which include up to date NodeJS packages. If you prefer to use distro provided package you can disable this behavior by setting `node['nodejs']['install_repo']` to `false`.
|
Install Node.js from official prebuilt binaries:
|
||||||
|
|
||||||
#### Binary
|
|
||||||
|
|
||||||
Install node from official prebuilt binaries:
|
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
node['nodejs']['install_method'] = 'binary'
|
nodejs_install 'nodejs' do
|
||||||
include_recipe "nodejs"
|
install_method 'binary'
|
||||||
|
|
||||||
# Or
|
|
||||||
include_recipe "nodejs::nodejs_from_binary"
|
|
||||||
|
|
||||||
# Or set a specific version of nodejs to be installed
|
|
||||||
node.default['nodejs']['install_method'] = 'binary'
|
|
||||||
node.default['nodejs']['version'] = '5.9.0'
|
|
||||||
node.default['nodejs']['binary']['checksum'] = '99c4136cf61761fac5ac57f80544140a3793b63e00a65d4a0e528c9db328bf40'
|
|
||||||
|
|
||||||
# Or fetch the binary from your own location
|
|
||||||
node.default['nodejs']['install_method'] = 'binary'
|
|
||||||
node.default['nodejs']['binary']['url'] = 'https://s3.amazonaws.com/my-bucket/node-v7.8.0-linux-x64.tar.gz'
|
|
||||||
node.default['nodejs']['binary']['checksum'] = '0bd86f2a39221b532172c7d1acb57f0b0cba88c7b82ea74ba9d1208b9f6f9697'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Source
|
Install Node.js from source:
|
||||||
|
|
||||||
Install node from sources:
|
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
node['nodejs']['install_method'] = 'source'
|
nodejs_install 'nodejs' do
|
||||||
include_recipe "nodejs"
|
install_method 'source'
|
||||||
# Or
|
end
|
||||||
include_recipe "nodejs::nodejs_from_source"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Chocolatey
|
Install npm packages:
|
||||||
|
|
||||||
Install node from chocolatey:
|
|
||||||
|
|
||||||
```chef
|
|
||||||
node['nodejs']['install_method'] = 'chocolatey'
|
|
||||||
include_recipe "nodejs"
|
|
||||||
# Or
|
|
||||||
include_recipe "nodejs::nodejs_from_chocolatey"
|
|
||||||
```
|
|
||||||
|
|
||||||
## NPM
|
|
||||||
|
|
||||||
Npm is included in nodejs installs by default. By default, we are using it and call it `embedded`. Adding recipe `nodejs::npm` assure you to have npm installed and let you choose install method with `node['nodejs']['npm']['install_method']`
|
|
||||||
|
|
||||||
```ruby
|
|
||||||
include_recipe "nodejs::npm"
|
|
||||||
```
|
|
||||||
|
|
||||||
_Warning:_ This recipe will include the `nodejs` recipe, which by default includes `nodejs::nodejs_from_package` if you did not set `node['nodejs']['install_method']`.
|
|
||||||
|
|
||||||
## Resources
|
|
||||||
|
|
||||||
### npm_package
|
|
||||||
|
|
||||||
note: This resource was previously named nodejs_npm. Calls to that resource name will still function, but cookbooks should be updated for the new npm_package resource name.
|
|
||||||
|
|
||||||
`npm_package` lets you install npm packages from various sources:
|
|
||||||
|
|
||||||
- npm registry:
|
|
||||||
|
|
||||||
- name: `property :package`
|
|
||||||
- version: `property :version` (optional)
|
|
||||||
|
|
||||||
- url: `property :url`
|
|
||||||
|
|
||||||
- for git use `git://{your_repo}`
|
|
||||||
|
|
||||||
- from a json (package.json by default): `property :json`
|
|
||||||
|
|
||||||
- use `true` for default
|
|
||||||
- use a `String` to specify json file
|
|
||||||
|
|
||||||
Packages can be installed globally (by default) or in a directory (by using `attribute :path`)
|
|
||||||
|
|
||||||
You can specify an `NPM_TOKEN` environment variable for accessing [NPM private modules](https://docs.npmjs.com/private-modules/intro) by using `attribute :npm_token`
|
|
||||||
|
|
||||||
You can specify a `NODE_ENV` environment variable, in the case that some element of your installation depends on this by using `attribute :node_env`. E.g., using [`node-config`](https://www.npmjs.com/package/config) as part of your postinstall script. Please note that adding the `--production` option will override this to `NODE_ENV=production`.
|
|
||||||
|
|
||||||
You can append more specific options to npm command with `attribute :options` array :
|
|
||||||
|
|
||||||
You can specify auto_update as false to stop the npm install command from running and updating an installed package. Running the command will update packages within restrictions imposed by a package.json file. The default behavior is to update automatically.
|
|
||||||
|
|
||||||
- use an array of options (w/ dash), they will be added to npm call.
|
|
||||||
- ex: `['--production','--force']` or `['--force-latest']`
|
|
||||||
|
|
||||||
You can specify live_stream true for the resource to have the package install information included in the chef-client log outout for better npm package diagnostics and trouble shooting.
|
|
||||||
|
|
||||||
This LWRP attempts to use vanilla npm as much as possible (no custom wrapper).
|
|
||||||
|
|
||||||
### Packages
|
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
npm_package 'express'
|
npm_package 'express'
|
||||||
|
|
||||||
npm_package 'async' do
|
nodejs_npm_packages 'application packages' do
|
||||||
version '0.6.2'
|
packages [
|
||||||
end
|
{ name: 'socket.io', version: '4.8.1' },
|
||||||
|
|
||||||
npm_package 'request' do
|
|
||||||
url 'github mikeal/request'
|
|
||||||
end
|
|
||||||
|
|
||||||
npm_package 'grunt' do
|
|
||||||
path '/home/random/grunt'
|
|
||||||
json true
|
|
||||||
user 'random'
|
|
||||||
node_env 'staging'
|
|
||||||
end
|
|
||||||
|
|
||||||
npm_package 'my_private_module' do
|
|
||||||
path '/home/random/myproject' # The root path to your project, containing a package.json file
|
|
||||||
json true
|
|
||||||
npm_token '12345-abcde-e5d4c3b2a1'
|
|
||||||
user 'random'
|
|
||||||
options ['--production'] # Only install dependencies. Skip devDependencies
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
[Working Examples](test/cookbooks/nodejs_test/recipes/npm.rb)
|
|
||||||
|
|
||||||
Or add packages via attributes (which accept the same attributes as the LWRP above):
|
|
||||||
|
|
||||||
```json
|
|
||||||
"nodejs": {
|
|
||||||
"npm_packages": [
|
|
||||||
{
|
|
||||||
"name": "express"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "async",
|
|
||||||
"version": "0.6.2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "request",
|
|
||||||
"url": "github mikeal/request"
|
|
||||||
}
|
|
||||||
{
|
|
||||||
"name": "grunt",
|
|
||||||
"path": "/home/random/grunt",
|
|
||||||
"json": true,
|
|
||||||
"user": "random"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
## License & Authors
|
See [migration.md](migration.md) for the breaking recipe/attribute migration guide.
|
||||||
|
|
||||||
**Author:** Marius Ducea (marius@promethost.com)
|
## Resources
|
||||||
**Author:** Nathan L Smith (nlloyds@gmail.com)
|
|
||||||
**Author:** Guilhem Lettron (guilhem@lettron.fr)
|
|
||||||
**Author:** Barthelemy Vessemont (bvessemont@gmail.com)
|
|
||||||
|
|
||||||
**Copyright:** Chef Software, Inc.
|
* [nodejs_install](documentation/nodejs_install.md)
|
||||||
|
* [nodejs_repository](documentation/nodejs_repository.md)
|
||||||
|
* [nodejs_npm_install](documentation/nodejs_npm_install.md)
|
||||||
|
* [nodejs_npm_packages](documentation/nodejs_npm_packages.md)
|
||||||
|
* [npm_package](documentation/nodejs_npm_package.md)
|
||||||
|
|
||||||
```
|
## Contributors
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
This project exists thanks to all the people who [contribute.](https://opencollective.com/sous-chefs/contributors.svg?width=890&button=false)
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
### Backers
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
Thank you to all our backers!
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|

|
||||||
```
|
|
||||||
|
### Sponsors
|
||||||
|
|
||||||
|
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
#
|
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Attributes:: nodejs
|
|
||||||
#
|
|
||||||
# Copyright:: 2010-2017, Promet Solutions
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
case node['platform_family']
|
|
||||||
when 'smartos', 'rhel', 'debian', 'fedora', 'mac_os_x', 'suse', 'amazon'
|
|
||||||
default['nodejs']['install_method'] = 'package'
|
|
||||||
when 'windows'
|
|
||||||
default['nodejs']['install_method'] = 'chocolatey'
|
|
||||||
else
|
|
||||||
default['nodejs']['install_method'] = 'source'
|
|
||||||
end
|
|
||||||
|
|
||||||
default['nodejs']['version'] = '10.16.3'
|
|
||||||
|
|
||||||
default['nodejs']['prefix_url']['node'] = 'https://nodejs.org/dist/'
|
|
||||||
|
|
||||||
default['nodejs']['tmpdir'] = '/tmp'
|
|
||||||
default['nodejs']['source']['url'] = nil # Auto generated
|
|
||||||
default['nodejs']['source']['checksum'] = 'db5a5e03a815b84a1266a4b48bb6a6d887175705f84fd2472f0d28e5e305a1f8'
|
|
||||||
|
|
||||||
default['nodejs']['binary']['url'] = nil # Auto generated
|
|
||||||
default['nodejs']['binary']['checksum']['linux_x64'] = '2f0397bb81c1d0c9901b9aff82a933257bf60f3992227b86107111a75b9030d9'
|
|
||||||
default['nodejs']['binary']['checksum']['linux_arm64'] = '3bab16e7107092e43426e082ee9fd88ef0a43a35816f662f14563bcc5152600d'
|
|
||||||
default['nodejs']['binary']['append_env_path'] = true
|
|
||||||
|
|
||||||
default['nodejs']['make_threads'] = node['cpu'] ? node['cpu']['total'].to_i : 2
|
|
||||||
|
|
||||||
default['nodejs']['manage_node'] = true
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
default['nodejs']['npm']['install_method'] = 'embedded'
|
|
||||||
default['nodejs']['npm']['version'] = 'latest'
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
include_attribute 'nodejs::default'
|
|
||||||
include_attribute 'nodejs::repo'
|
|
||||||
|
|
||||||
default['nodejs']['packages'] = value_for_platform_family(
|
|
||||||
'debian' => node['nodejs']['install_repo'] ? ['nodejs'] : %w(nodejs npm nodejs-dev),
|
|
||||||
%w(rhel fedora amazon) => node['nodejs']['install_repo'] ? %w(nodejs nodejs-devel) : %w(nodejs npm nodejs-dev),
|
|
||||||
'suse' => node['platform_version'].to_i < 42 ? %w(nodejs10 npm10 nodejs10-devel) : %w(nodejs4 npm4 nodejs4-devel),
|
|
||||||
'mac_os_x' => ['node'],
|
|
||||||
'freebsd' => %w(node npm),
|
|
||||||
'default' => ['nodejs']
|
|
||||||
)
|
|
||||||
|
|
||||||
# Add options and actions by package name
|
|
||||||
default['nodejs']['package_action'] = { default: :install }
|
|
||||||
default['nodejs']['package_options'] = { default: '' }
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
case node['platform_family']
|
|
||||||
when 'debian'
|
|
||||||
default['nodejs']['install_repo'] = true
|
|
||||||
default['nodejs']['repo'] = 'https://deb.nodesource.com/node_10.x'
|
|
||||||
default['nodejs']['keyserver'] = 'keyserver.ubuntu.com'
|
|
||||||
default['nodejs']['key'] = '1655a0ab68576280'
|
|
||||||
when 'rhel', 'fedora', 'amazon'
|
|
||||||
default['nodejs']['install_repo'] = true
|
|
||||||
release_ver = platform?('amazon') ? 6 : node['platform_version'].to_i
|
|
||||||
default['nodejs']['repo'] = "https://rpm.nodesource.com/pub_10.x/el/#{release_ver}/$basearch"
|
|
||||||
default['nodejs']['key'] = 'https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL'
|
|
||||||
end
|
|
||||||
@@ -61,7 +61,7 @@ Dangerfile
|
|||||||
examples/*
|
examples/*
|
||||||
features/*
|
features/*
|
||||||
Guardfile
|
Guardfile
|
||||||
kitchen.yml*
|
kitchen*.yml
|
||||||
mlc_config.json
|
mlc_config.json
|
||||||
Procfile
|
Procfile
|
||||||
Rakefile
|
Rakefile
|
||||||
@@ -83,10 +83,8 @@ test/*
|
|||||||
*/.hg/*
|
*/.hg/*
|
||||||
*/.svn/*
|
*/.svn/*
|
||||||
|
|
||||||
# Berkshelf #
|
# Dependency cache #
|
||||||
#############
|
####################
|
||||||
Berksfile
|
|
||||||
Berksfile.lock
|
|
||||||
cookbooks/*
|
cookbooks/*
|
||||||
tmp
|
tmp
|
||||||
|
|
||||||
@@ -98,7 +96,6 @@ Gemfile.lock
|
|||||||
|
|
||||||
# Policyfile #
|
# Policyfile #
|
||||||
##############
|
##############
|
||||||
Policyfile.rb
|
|
||||||
Policyfile.lock.json
|
Policyfile.lock.json
|
||||||
|
|
||||||
# Documentation #
|
# Documentation #
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
---
|
|
||||||
driver:
|
|
||||||
name: dokken
|
|
||||||
privileged: true # because Docker and SystemD
|
|
||||||
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
|
|
||||||
chef_license: accept-no-persist
|
|
||||||
|
|
||||||
transport:
|
|
||||||
name: dokken
|
|
||||||
|
|
||||||
provisioner:
|
|
||||||
name: dokken
|
|
||||||
deprecations_as_errors: true
|
|
||||||
|
|
||||||
verifier:
|
|
||||||
name: inspec
|
|
||||||
|
|
||||||
platforms:
|
|
||||||
- name: amazonlinux
|
|
||||||
driver:
|
|
||||||
image: dokken/amazonlinux
|
|
||||||
pid_one_command: /sbin/init
|
|
||||||
|
|
||||||
- name: amazonlinux-2
|
|
||||||
driver:
|
|
||||||
image: dokken/amazonlinux-2
|
|
||||||
pid_one_command: /usr/lib/systemd/systemd
|
|
||||||
|
|
||||||
- name: debian-8
|
|
||||||
driver:
|
|
||||||
image: dokken/debian-8
|
|
||||||
pid_one_command: /bin/systemd
|
|
||||||
intermediate_instructions:
|
|
||||||
- RUN /usr/bin/apt-get update
|
|
||||||
|
|
||||||
- name: debian-9
|
|
||||||
driver:
|
|
||||||
image: dokken/debian-9
|
|
||||||
pid_one_command: /bin/systemd
|
|
||||||
intermediate_instructions:
|
|
||||||
- RUN /usr/bin/apt-get update
|
|
||||||
|
|
||||||
- name: debian-10
|
|
||||||
driver:
|
|
||||||
image: dokken/debian-10
|
|
||||||
pid_one_command: /bin/systemd
|
|
||||||
intermediate_instructions:
|
|
||||||
- RUN /usr/bin/apt-get update
|
|
||||||
|
|
||||||
- name: centos-7
|
|
||||||
driver:
|
|
||||||
image: dokken/centos-7
|
|
||||||
pid_one_command: /usr/lib/systemd/systemd
|
|
||||||
|
|
||||||
- name: centos-8
|
|
||||||
driver:
|
|
||||||
image: dokken/centos-8
|
|
||||||
pid_one_command: /usr/lib/systemd/systemd
|
|
||||||
|
|
||||||
- name: fedora-latest
|
|
||||||
driver:
|
|
||||||
image: dokken/fedora-latest
|
|
||||||
pid_one_command: /usr/lib/systemd/systemd
|
|
||||||
|
|
||||||
- name: opensuse-leap-15
|
|
||||||
driver:
|
|
||||||
image: dokken/opensuse-leap-15
|
|
||||||
pid_one_command: /bin/systemd
|
|
||||||
|
|
||||||
- name: ubuntu-18.04
|
|
||||||
driver:
|
|
||||||
image: dokken/ubuntu-18.04
|
|
||||||
pid_one_command: /bin/systemd
|
|
||||||
intermediate_instructions:
|
|
||||||
- RUN /usr/bin/apt-get update
|
|
||||||
|
|
||||||
- name: ubuntu-20.04
|
|
||||||
driver:
|
|
||||||
image: dokken/ubuntu-20.04
|
|
||||||
pid_one_command: /bin/systemd
|
|
||||||
intermediate_instructions:
|
|
||||||
- RUN /usr/bin/apt-get update
|
|
||||||
- RUN /usr/bin/apt-get install python -y
|
|
||||||
|
|
||||||
- name: opensuse-leap-15
|
|
||||||
driver:
|
|
||||||
image: dokken/opensuse-leap-15
|
|
||||||
pid_one_command: /bin/systemd
|
|
||||||
@@ -1,19 +1,96 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module NodeJs
|
module NodeJs
|
||||||
module Helper
|
module Helper
|
||||||
def npm_dist
|
def default_install_method
|
||||||
if node['nodejs']['npm']['url']
|
case node['platform_family']
|
||||||
{ 'url' => node['nodejs']['npm']['url'] }
|
when 'debian', 'rhel', 'fedora', 'amazon', 'mac_os_x', 'suse'
|
||||||
|
'package'
|
||||||
|
when 'windows'
|
||||||
|
'chocolatey'
|
||||||
else
|
else
|
||||||
|
'source'
|
||||||
require 'open-uri'
|
|
||||||
require 'json'
|
|
||||||
result = JSON.parse(URI.parse("https://registry.npmjs.org/npm/#{node['nodejs']['npm']['version']}").read, max_nesting: false)
|
|
||||||
ret = { 'url' => result['dist']['tarball'], 'version' => result['_npmVersion'], 'shasum' => result['dist']['shasum'] }
|
|
||||||
Chef::Log.debug("Npm dist #{ret}")
|
|
||||||
ret
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def default_packages(install_repository)
|
||||||
|
case node['platform_family']
|
||||||
|
when 'debian'
|
||||||
|
install_repository ? ['nodejs'] : %w(nodejs npm nodejs-dev)
|
||||||
|
when 'rhel', 'fedora', 'amazon'
|
||||||
|
install_repository ? %w(nodejs nodejs-devel) : %w(nodejs npm nodejs-devel)
|
||||||
|
when 'suse'
|
||||||
|
%w(nodejs npm nodejs-devel)
|
||||||
|
when 'mac_os_x'
|
||||||
|
['node']
|
||||||
|
else
|
||||||
|
['nodejs']
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def default_build_packages
|
||||||
|
case node['platform_family']
|
||||||
|
when 'rhel', 'fedora', 'amazon'
|
||||||
|
%w(openssl-devel python3 tar)
|
||||||
|
when 'debian'
|
||||||
|
%w(libssl-dev python3)
|
||||||
|
else
|
||||||
|
%w(python3)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def dnf_python_package?(package_name)
|
||||||
|
package_name == 'python3' && platform_family?('rhel', 'fedora', 'amazon')
|
||||||
|
end
|
||||||
|
|
||||||
|
def default_make_threads
|
||||||
|
node['cpu'] ? node['cpu']['total'].to_i : 2
|
||||||
|
end
|
||||||
|
|
||||||
|
def node_major_from_version(version)
|
||||||
|
version.to_s.split('.').first
|
||||||
|
end
|
||||||
|
|
||||||
|
def nodejs_arch
|
||||||
|
machine = node['kernel']['machine']
|
||||||
|
|
||||||
|
case machine
|
||||||
|
when /armv6l/
|
||||||
|
'arm-pi'
|
||||||
|
when /aarch64/
|
||||||
|
'arm64'
|
||||||
|
when /x86_64/
|
||||||
|
'x64'
|
||||||
|
when /\d86/
|
||||||
|
'x86'
|
||||||
|
else
|
||||||
|
machine
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def nodejs_binary_checksum(checksums)
|
||||||
|
checksums["linux_#{nodejs_arch}"]
|
||||||
|
end
|
||||||
|
|
||||||
|
def nodejs_source_url(version, prefix_url, source_url)
|
||||||
|
source_url || ::URI.join(prefix_url, "v#{version}/", "node-v#{version}.tar.gz").to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
def nodejs_binary_url(version, prefix_url, binary_url)
|
||||||
|
binary_url || ::URI.join(prefix_url, "v#{version}/", "node-v#{version}-linux-#{nodejs_arch}.tar.gz").to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
def npm_dist(version, url = nil)
|
||||||
|
return { 'url' => url } if url
|
||||||
|
|
||||||
|
require 'open-uri'
|
||||||
|
require 'json'
|
||||||
|
result = JSON.parse(URI.parse("https://registry.npmjs.org/npm/#{version}").read, max_nesting: false)
|
||||||
|
ret = { 'url' => result['dist']['tarball'], 'version' => result['_npmVersion'], 'shasum' => result['dist']['shasum'] }
|
||||||
|
Chef::Log.debug("Npm dist #{ret}")
|
||||||
|
ret
|
||||||
|
end
|
||||||
|
|
||||||
def npm_list(package, path = nil, environment = {})
|
def npm_list(package, path = nil, environment = {})
|
||||||
require 'json'
|
require 'json'
|
||||||
cmd = if path
|
cmd = if path
|
||||||
@@ -47,9 +124,7 @@ module NodeJs
|
|||||||
(version ? list[package]['version'] == version : true)
|
(version ? list[package]['version'] == version : true)
|
||||||
end
|
end
|
||||||
|
|
||||||
def npm_package_installed?(package, version = nil, path = nil, npm_token = nil)
|
def npm_package_installed?(package, version = nil, path = nil, environment = {})
|
||||||
environment = { 'NPM_TOKEN' => npm_token } if npm_token
|
|
||||||
|
|
||||||
list = npm_list(package, path, environment)['dependencies']
|
list = npm_list(package, path, environment)['dependencies']
|
||||||
# Return true if package installed and installed to good version
|
# Return true if package installed and installed to good version
|
||||||
# see if we really want to add the url check
|
# see if we really want to add the url check
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
{
|
{
|
||||||
"name": "nodejs",
|
"name": "nodejs",
|
||||||
"description": "Installs/Configures node.js",
|
"description": "Provides resources for installing Node.js and managing npm packages",
|
||||||
"long_description": "",
|
"long_description": "",
|
||||||
"maintainer": "redguide",
|
"maintainer": "Sous Chefs",
|
||||||
"maintainer_email": "guilhem@lettron.fr",
|
"maintainer_email": "help@sous-chefs.org",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"platforms": {
|
"platforms": {
|
||||||
"debian": ">= 0.0.0",
|
"almalinux": ">= 8.0",
|
||||||
"ubuntu": ">= 0.0.0",
|
"amazon": ">= 2023.0",
|
||||||
"centos": ">= 0.0.0",
|
"centos_stream": ">= 9.0",
|
||||||
"redhat": ">= 0.0.0",
|
"debian": ">= 12.0",
|
||||||
"scientific": ">= 0.0.0",
|
"fedora": ">= 0.0.0",
|
||||||
"oracle": ">= 0.0.0",
|
|
||||||
"amazon": ">= 0.0.0",
|
|
||||||
"smartos": ">= 0.0.0",
|
|
||||||
"mac_os_x": ">= 0.0.0",
|
"mac_os_x": ">= 0.0.0",
|
||||||
"opensuseleap": ">= 0.0.0",
|
"oracle": ">= 8.0",
|
||||||
"suse": ">= 0.0.0",
|
"redhat": ">= 8.0",
|
||||||
|
"rocky": ">= 8.0",
|
||||||
|
"ubuntu": ">= 22.04",
|
||||||
"windows": ">= 0.0.0"
|
"windows": ">= 0.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ark": ">= 2.0.2",
|
"ark": ">= 2.0.2",
|
||||||
"chocolatey": ">= 3.0"
|
"chocolatey": ">= 3.0",
|
||||||
|
"yum": ">= 7.2"
|
||||||
},
|
},
|
||||||
"providing": {
|
"providing": {
|
||||||
|
|
||||||
@@ -29,13 +29,13 @@
|
|||||||
"recipes": {
|
"recipes": {
|
||||||
|
|
||||||
},
|
},
|
||||||
"version": "7.3.3",
|
"version": "11.0.1",
|
||||||
"source_url": "https://github.com/redguide/nodejs",
|
"source_url": "https://github.com/sous-chefs/nodejs",
|
||||||
"issues_url": "https://github.com/redguide/nodejs/issues",
|
"issues_url": "https://github.com/sous-chefs/nodejs/issues",
|
||||||
"privacy": false,
|
"privacy": false,
|
||||||
"chef_versions": [
|
"chef_versions": [
|
||||||
[
|
[
|
||||||
">= 14"
|
">= 15.3"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"ohai_versions": [
|
"ohai_versions": [
|
||||||
|
|||||||
@@ -1,16 +1,27 @@
|
|||||||
name 'nodejs'
|
# frozen_string_literal: true
|
||||||
maintainer 'redguide'
|
|
||||||
maintainer_email 'guilhem@lettron.fr'
|
name 'nodejs'
|
||||||
license 'Apache-2.0'
|
maintainer 'Sous Chefs'
|
||||||
description 'Installs/Configures node.js'
|
maintainer_email 'help@sous-chefs.org'
|
||||||
source_url 'https://github.com/redguide/nodejs'
|
license 'Apache-2.0'
|
||||||
issues_url 'https://github.com/redguide/nodejs/issues'
|
description 'Provides resources for installing Node.js and managing npm packages'
|
||||||
chef_version '>= 14'
|
version '11.0.1'
|
||||||
version '7.3.3'
|
source_url 'https://github.com/sous-chefs/nodejs'
|
||||||
|
issues_url 'https://github.com/sous-chefs/nodejs/issues'
|
||||||
|
chef_version '>= 15.3'
|
||||||
|
|
||||||
|
supports 'almalinux', '>= 8.0'
|
||||||
|
supports 'amazon', '>= 2023.0'
|
||||||
|
supports 'centos_stream', '>= 9.0'
|
||||||
|
supports 'debian', '>= 12.0'
|
||||||
|
supports 'fedora'
|
||||||
|
supports 'mac_os_x'
|
||||||
|
supports 'oracle', '>= 8.0'
|
||||||
|
supports 'redhat', '>= 8.0'
|
||||||
|
supports 'rocky', '>= 8.0'
|
||||||
|
supports 'ubuntu', '>= 22.04'
|
||||||
|
supports 'windows'
|
||||||
|
|
||||||
depends 'ark', '>= 2.0.2'
|
depends 'ark', '>= 2.0.2'
|
||||||
depends 'chocolatey', '>= 3.0'
|
depends 'chocolatey', '>= 3.0'
|
||||||
|
depends 'yum', '>= 7.2'
|
||||||
%w(debian ubuntu centos redhat scientific oracle amazon smartos mac_os_x opensuseleap suse windows).each do |os|
|
|
||||||
supports os
|
|
||||||
end
|
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# Migration Guide
|
||||||
|
|
||||||
|
This release is a breaking migration from recipes and node attributes to custom resources.
|
||||||
|
|
||||||
|
## What Changed
|
||||||
|
|
||||||
|
The cookbook no longer exposes `nodejs::default`, `nodejs::install`, `nodejs::repo`, `nodejs::npm`, `nodejs::npm_packages`, or the install-method recipes. The `attributes/` directory was removed. Configure Node.js through resource properties instead of `node['nodejs']` attributes.
|
||||||
|
|
||||||
|
## Recipe to Resource Mapping
|
||||||
|
|
||||||
|
| Before | After |
|
||||||
|
| ------------------------------------------------- | ------------------------------------------------------------- |
|
||||||
|
| `include_recipe 'nodejs::default'` | `nodejs_install 'nodejs'` plus optional `nodejs_npm_packages` |
|
||||||
|
| `include_recipe 'nodejs::repo'` | `nodejs_repository 'nodesource'` |
|
||||||
|
| `include_recipe 'nodejs::nodejs_from_package'` | `nodejs_install 'nodejs' do install_method 'package' end` |
|
||||||
|
| `include_recipe 'nodejs::nodejs_from_binary'` | `nodejs_install 'nodejs' do install_method 'binary' end` |
|
||||||
|
| `include_recipe 'nodejs::nodejs_from_source'` | `nodejs_install 'nodejs' do install_method 'source' end` |
|
||||||
|
| `include_recipe 'nodejs::nodejs_from_chocolatey'` | `nodejs_install 'nodejs' do install_method 'chocolatey' end` |
|
||||||
|
| `include_recipe 'nodejs::npm'` | `nodejs_npm_install 'npm'` |
|
||||||
|
| `node['nodejs']['npm_packages']` | `nodejs_npm_packages 'packages'` |
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Install Node.js from NodeSource packages:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
nodejs_install 'nodejs' do
|
||||||
|
install_method 'package'
|
||||||
|
version '24.15.0'
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
Install packages that used to be configured with `node['nodejs']['npm_packages']`:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
nodejs_npm_packages 'application packages' do
|
||||||
|
packages [
|
||||||
|
{ name: 'express' },
|
||||||
|
{ name: 'socket.io', version: '4.8.1' },
|
||||||
|
]
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
The `nodejs_npm` alias still works for the `npm_package` resource, but it no longer auto-includes any Node.js or npm recipes. Install Node.js first:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
nodejs_install 'nodejs'
|
||||||
|
|
||||||
|
nodejs_npm 'express'
|
||||||
|
```
|
||||||
|
|
||||||
|
See `test/cookbooks/test/recipes/` for runnable migration examples used by Kitchen.
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
|
|
||||||
# Author:: Marius Ducea (marius@promethost.com)
|
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Recipe:: default
|
|
||||||
#
|
|
||||||
# Copyright:: 2010-2017, Promet Solutions
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
include_recipe 'nodejs::install' if node['nodejs']['manage_node']
|
|
||||||
include_recipe 'nodejs::npm' if node['nodejs']['manage_node']
|
|
||||||
include_recipe 'nodejs::npm_packages' if node['nodejs']['manage_node']
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#
|
|
||||||
# Author:: Marius Ducea (marius@promethost.com)
|
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Recipe:: install
|
|
||||||
#
|
|
||||||
# Copyright:: 2010-2017, Promet Solutions
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
include_recipe "nodejs::nodejs_from_#{node['nodejs']['install_method']}"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Chef::Log.fatal('The nodejs::iojs recipe has been deprecated. If you need iojs installation pin to cookbook version 3.0.1.')
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#
|
|
||||||
# Author:: Marius Ducea (marius@promethost.com)
|
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Recipe:: nodejs
|
|
||||||
#
|
|
||||||
# Copyright:: 2010-2017, Promet Solutions
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
Chef::Log.fatal('The nodejs::nodejs recipe is no longer used. Use nodejs::install to install nodejs instead.')
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
#
|
|
||||||
# Author:: Julian Wilde (jules@jules.com.au)
|
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Recipe:: install_from_binary
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
Chef::DSL::Recipe.include NodeJs::Helper
|
|
||||||
|
|
||||||
# Shamelessly borrowed from http://docs.chef.io/dsl_recipe_method_platform.html
|
|
||||||
# Surely there's a more canonical way to get arch?
|
|
||||||
arch = if node['kernel']['machine'] =~ /armv6l/
|
|
||||||
# FIXME: This should really check the version of node we're looking for
|
|
||||||
# as it seems that they haven't build an `arm-pi` version in a while...
|
|
||||||
# if it's old, return this, otherwise just return `node['kernel']['machine']`
|
|
||||||
'arm-pi' # assume a raspberry pi
|
|
||||||
elsif node['kernel']['machine'] =~ /aarch64/
|
|
||||||
'arm64'
|
|
||||||
elsif node['kernel']['machine'] =~ /x86_64/
|
|
||||||
'x64'
|
|
||||||
elsif node['kernel']['machine'] =~ /\d86/
|
|
||||||
'x86'
|
|
||||||
else
|
|
||||||
node['kernel']['machine']
|
|
||||||
end
|
|
||||||
|
|
||||||
# needed to uncompress the binary
|
|
||||||
package 'tar' if platform_family?('rhel', 'fedora', 'amazon', 'suse')
|
|
||||||
|
|
||||||
# package_stub is for example: "node-v6.9.1-linux-x64.tar.gz"
|
|
||||||
version = "v#{node['nodejs']['version']}/"
|
|
||||||
prefix = node['nodejs']['prefix_url']['node']
|
|
||||||
|
|
||||||
filename = "node-v#{node['nodejs']['version']}-linux-#{arch}.tar.gz"
|
|
||||||
archive_name = 'nodejs-binary'
|
|
||||||
binaries = ['bin/node']
|
|
||||||
|
|
||||||
binaries.push('bin/npm') if node['nodejs']['npm']['install_method'] == 'embedded'
|
|
||||||
binaries.push('bin/npx') if node['nodejs']['npm']['install_method'] == 'embedded'
|
|
||||||
|
|
||||||
if node['nodejs']['binary']['url']
|
|
||||||
nodejs_bin_url = node['nodejs']['binary']['url']
|
|
||||||
checksum = node['nodejs']['binary']['checksum']
|
|
||||||
else
|
|
||||||
nodejs_bin_url = ::URI.join(prefix, version, filename).to_s
|
|
||||||
checksum = node['nodejs']['binary']['checksum']["linux_#{arch}"]
|
|
||||||
end
|
|
||||||
|
|
||||||
ark archive_name do
|
|
||||||
url nodejs_bin_url
|
|
||||||
version node['nodejs']['version']
|
|
||||||
checksum checksum
|
|
||||||
has_binaries binaries
|
|
||||||
append_env_path node['nodejs']['binary']['append_env_path']
|
|
||||||
action :install
|
|
||||||
end
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#
|
|
||||||
# Author:: Hossein Margani (hossein@margani.dev)
|
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Recipe:: install_from_chocolatey
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
include_recipe 'chocolatey'
|
|
||||||
|
|
||||||
chocolatey_package 'nodejs-lts' do
|
|
||||||
version node['nodejs']['version'] if node['nodejs']['version']
|
|
||||||
action :upgrade
|
|
||||||
end
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
#
|
|
||||||
# Author:: Nathan L Smith (nlloyds@gmail.com)
|
|
||||||
# Author:: Marius Ducea (marius@promethost.com)
|
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Recipe:: package
|
|
||||||
#
|
|
||||||
# Copyright:: 2012-2017, Cramer Development, Inc.
|
|
||||||
# Copyright:: 2013-2017, Opscale
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
include_recipe 'nodejs::repo' if node['nodejs']['install_repo']
|
|
||||||
|
|
||||||
unless node['nodejs']['packages']
|
|
||||||
Chef::Log.error 'No package for nodejs'
|
|
||||||
Chef::Log.warn 'Please use the source or binary method to install node'
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
node['nodejs']['packages'].each do |node_pkg|
|
|
||||||
package node_pkg do
|
|
||||||
action node['nodejs']['package_action'][node_pkg] if node['nodejs']['package_action'][node_pkg]
|
|
||||||
options node['nodejs']['package_options'][node_pkg] if node['nodejs']['package_options'][node_pkg]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#
|
|
||||||
# Author:: Marius Ducea (marius@promethost.com)
|
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Recipe:: source
|
|
||||||
#
|
|
||||||
# Copyright:: 2010-2017, Promet Solutions
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
Chef::DSL::Recipe.include NodeJs::Helper
|
|
||||||
|
|
||||||
build_essential 'install build tools'
|
|
||||||
|
|
||||||
case node['platform_family']
|
|
||||||
when 'rhel', 'fedora', 'amazon'
|
|
||||||
# The ark resource uses and requires python2 for builds
|
|
||||||
package %w(openssl-devel python2 tar)
|
|
||||||
when 'debian'
|
|
||||||
package %w(libssl-dev python)
|
|
||||||
when 'suse'
|
|
||||||
package %w(python)
|
|
||||||
end
|
|
||||||
|
|
||||||
version = "v#{node['nodejs']['version']}/"
|
|
||||||
prefix = node['nodejs']['prefix_url']['node']
|
|
||||||
filename = "node-v#{node['nodejs']['version']}.tar.gz"
|
|
||||||
archive_name = 'nodejs-source'
|
|
||||||
|
|
||||||
nodejs_src_url = node['nodejs']['source']['url'] || ::URI.join(prefix, version, filename).to_s
|
|
||||||
|
|
||||||
ark archive_name do
|
|
||||||
url nodejs_src_url
|
|
||||||
version node['nodejs']['version']
|
|
||||||
checksum node['nodejs']['source']['checksum']
|
|
||||||
make_opts ["-j #{node['nodejs']['make_threads']}"]
|
|
||||||
action :install_with_make
|
|
||||||
environment(PYTHON: 'python2')
|
|
||||||
end
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#
|
|
||||||
# Author:: Marius Ducea (marius@promethost.com)
|
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Recipe:: npm
|
|
||||||
#
|
|
||||||
# Copyright:: 2010-2017, Promet Solutions
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
case node['nodejs']['npm']['install_method']
|
|
||||||
when 'embedded'
|
|
||||||
include_recipe 'nodejs::install'
|
|
||||||
when 'source'
|
|
||||||
include_recipe 'nodejs::npm_from_source'
|
|
||||||
else
|
|
||||||
Chef::Log.error('No install method found for npm')
|
|
||||||
end
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#
|
|
||||||
# Author:: Marius Ducea (marius@promethost.com)
|
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Recipe:: npm
|
|
||||||
#
|
|
||||||
# Copyright:: 2010-2017, Promet Solutions
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
Chef::DSL::Recipe.include NodeJs::Helper
|
|
||||||
|
|
||||||
include_recipe 'nodejs::nodejs_from_source'
|
|
||||||
|
|
||||||
dist = npm_dist
|
|
||||||
|
|
||||||
ark 'npm' do
|
|
||||||
url dist['url']
|
|
||||||
checksum dist['checksum']
|
|
||||||
version dist['version']
|
|
||||||
action :install_with_make
|
|
||||||
end
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
if node['nodejs'].key?('npm_packages')
|
|
||||||
node['nodejs']['npm_packages'].each do |pkg|
|
|
||||||
pkg_action = pkg.key?('action') ? pkg['action'] : :install
|
|
||||||
f = npm_package "nodejs_npm-#{pkg['name']}-#{pkg_action}" do
|
|
||||||
action :nothing
|
|
||||||
package pkg['name']
|
|
||||||
end
|
|
||||||
pkg.each do |key, value|
|
|
||||||
f.send(key, value) unless key == 'name' || key == 'action'
|
|
||||||
end
|
|
||||||
f.action(pkg_action)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
case node['platform_family']
|
|
||||||
when 'debian'
|
|
||||||
package 'nodejs-apt-transport-https' do
|
|
||||||
package_name 'apt-transport-https'
|
|
||||||
end
|
|
||||||
|
|
||||||
apt_repository 'node.js' do
|
|
||||||
uri node['nodejs']['repo']
|
|
||||||
components ['main']
|
|
||||||
keyserver node['nodejs']['keyserver']
|
|
||||||
key node['nodejs']['key']
|
|
||||||
end
|
|
||||||
when 'rhel', 'fedora', 'amazon'
|
|
||||||
yum_repository 'node.js' do
|
|
||||||
description 'nodesource.com nodejs repository'
|
|
||||||
baseurl node['nodejs']['repo']
|
|
||||||
gpgkey node['nodejs']['key']
|
|
||||||
end
|
|
||||||
end
|
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"packages": {
|
"packages": {
|
||||||
".": {
|
".": {
|
||||||
"package-name": "prometheus",
|
"package-name": "nodejs",
|
||||||
"changelog-path": "CHANGELOG.md",
|
"changelog-path": "CHANGELOG.md",
|
||||||
"release-type": "ruby",
|
"release-type": "ruby",
|
||||||
"include-component-in-tag": false,
|
"include-component-in-tag": false,
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
property :version, String, default: '24.15.0'
|
||||||
|
property :prefix_url, String, default: 'https://nodejs.org/dist/'
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
provides :nodejs_install
|
||||||
|
unified_mode true
|
||||||
|
|
||||||
|
use '_partial/_nodejs'
|
||||||
|
|
||||||
|
property :install_method, String, equal_to: %w(package binary source chocolatey)
|
||||||
|
property :install_repository, [true, false], default: true
|
||||||
|
property :packages, [Array, nil], default: nil
|
||||||
|
property :package_action, [Symbol, String], default: :install
|
||||||
|
property :package_options, [String, nil]
|
||||||
|
property :disable_dnf_module, [true, false], default: true
|
||||||
|
property :source_url, [String, nil]
|
||||||
|
property :source_checksum, [String, nil], default: '729de494dd2872e5a3a6c32a1cd156a5413d4aca2772b2d873ee86bb5531bcd9'
|
||||||
|
property :binary_url, [String, nil]
|
||||||
|
property :binary_checksums, Hash,
|
||||||
|
default: {
|
||||||
|
'linux_x64' => '44836872d9aec49f1e6b52a9a922872db9a2b02d235a616a5681b6a85fec8d89',
|
||||||
|
'linux_arm64' => '73afc234d558c24919875f51c2d1ea002a2ada4ea6f83601a383869fefa64eed',
|
||||||
|
}
|
||||||
|
property :append_env_path, [true, false], default: true
|
||||||
|
property :make_threads, [Integer, String, nil], default: nil
|
||||||
|
property :build_packages, [Array, nil], default: nil
|
||||||
|
property :chocolatey_package_name, String, default: 'nodejs-lts'
|
||||||
|
|
||||||
|
default_action :install
|
||||||
|
|
||||||
|
action :install do
|
||||||
|
case requested_install_method
|
||||||
|
when 'package'
|
||||||
|
nodejs_repository 'nodesource' do
|
||||||
|
node_major node_major_from_version(new_resource.version)
|
||||||
|
action :create
|
||||||
|
only_if { new_resource.install_repository }
|
||||||
|
end
|
||||||
|
|
||||||
|
dnf_module 'nodejs' do
|
||||||
|
action :disable
|
||||||
|
only_if { disable_dnf_module? }
|
||||||
|
end
|
||||||
|
|
||||||
|
resolved_packages.each do |pkg|
|
||||||
|
package pkg do
|
||||||
|
action new_resource.package_action.to_sym
|
||||||
|
options new_resource.package_options if new_resource.package_options
|
||||||
|
end
|
||||||
|
end
|
||||||
|
when 'binary'
|
||||||
|
package 'tar' if platform_family?('rhel', 'fedora', 'amazon', 'suse')
|
||||||
|
|
||||||
|
ark 'nodejs-binary' do
|
||||||
|
url nodejs_binary_url(new_resource.version, new_resource.prefix_url, new_resource.binary_url)
|
||||||
|
version new_resource.version
|
||||||
|
checksum nodejs_binary_checksum(new_resource.binary_checksums) unless new_resource.binary_url
|
||||||
|
has_binaries %w(bin/node bin/npm bin/npx)
|
||||||
|
append_env_path new_resource.append_env_path
|
||||||
|
action :install
|
||||||
|
end
|
||||||
|
when 'source'
|
||||||
|
build_essential 'install build tools'
|
||||||
|
|
||||||
|
(new_resource.build_packages || default_build_packages).each do |pkg|
|
||||||
|
if dnf_python_package?(pkg)
|
||||||
|
execute 'install python3 build package' do
|
||||||
|
command 'dnf -y install python3'
|
||||||
|
not_if 'command -v python3'
|
||||||
|
only_if 'command -v dnf'
|
||||||
|
end
|
||||||
|
else
|
||||||
|
package pkg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
link '/usr/local/bin/python' do
|
||||||
|
to '/usr/bin/python3'
|
||||||
|
not_if { ::File.exist?('/usr/bin/python') || ::File.exist?('/usr/local/bin/python') }
|
||||||
|
only_if { ::File.exist?('/usr/bin/python3') }
|
||||||
|
end
|
||||||
|
|
||||||
|
ark 'nodejs-source' do
|
||||||
|
url nodejs_source_url(new_resource.version, new_resource.prefix_url, new_resource.source_url)
|
||||||
|
version new_resource.version
|
||||||
|
checksum new_resource.source_checksum if new_resource.source_checksum
|
||||||
|
make_opts ["-j #{new_resource.make_threads || default_make_threads}"]
|
||||||
|
environment(PYTHON: 'python3')
|
||||||
|
action :install_with_make
|
||||||
|
end
|
||||||
|
when 'chocolatey'
|
||||||
|
chocolatey_package new_resource.chocolatey_package_name do
|
||||||
|
version new_resource.version if new_resource.version
|
||||||
|
action :upgrade
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
action :remove do
|
||||||
|
case requested_install_method
|
||||||
|
when 'package'
|
||||||
|
resolved_packages.each do |pkg|
|
||||||
|
package pkg do
|
||||||
|
action :remove
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
nodejs_repository 'nodesource' do
|
||||||
|
action :remove
|
||||||
|
only_if { new_resource.install_repository }
|
||||||
|
end
|
||||||
|
when 'binary'
|
||||||
|
ark 'nodejs-binary' do
|
||||||
|
action :remove
|
||||||
|
end
|
||||||
|
when 'source'
|
||||||
|
ark 'nodejs-source' do
|
||||||
|
action :remove
|
||||||
|
end
|
||||||
|
when 'chocolatey'
|
||||||
|
chocolatey_package new_resource.chocolatey_package_name do
|
||||||
|
action :remove
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
action_class do
|
||||||
|
include NodeJs::Helper
|
||||||
|
|
||||||
|
def requested_install_method
|
||||||
|
new_resource.install_method || default_install_method
|
||||||
|
end
|
||||||
|
|
||||||
|
def resolved_packages
|
||||||
|
new_resource.packages || default_packages(new_resource.install_repository)
|
||||||
|
end
|
||||||
|
|
||||||
|
def disable_dnf_module?
|
||||||
|
new_resource.disable_dnf_module &&
|
||||||
|
platform_family?('rhel', 'fedora') &&
|
||||||
|
node['platform_version'].to_i >= 8 &&
|
||||||
|
dnf_module_available?('nodejs')
|
||||||
|
end
|
||||||
|
|
||||||
|
def dnf_module_available?(module_name)
|
||||||
|
shell_out!("dnf -q module list #{module_name}", returns: [0, 1]).stdout.match?(/^#{Regexp.escape(module_name)}\s/m)
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
provides :nodejs_npm_install
|
||||||
|
unified_mode true
|
||||||
|
|
||||||
|
use '_partial/_nodejs'
|
||||||
|
|
||||||
|
property :install_method, String, equal_to: %w(embedded source), default: 'embedded'
|
||||||
|
property :install_node, [true, false], default: true
|
||||||
|
property :node_install_method, String, equal_to: %w(package binary source chocolatey), default: 'package'
|
||||||
|
property :npm_version, String, default: 'latest'
|
||||||
|
property :npm_url, [String, nil]
|
||||||
|
property :npm_checksum, [String, nil]
|
||||||
|
property :make_threads, [Integer, String, nil], default: nil
|
||||||
|
|
||||||
|
default_action :install
|
||||||
|
|
||||||
|
action :install do
|
||||||
|
nodejs_install 'nodejs for npm' do
|
||||||
|
install_method new_resource.node_install_method
|
||||||
|
version new_resource.version
|
||||||
|
prefix_url new_resource.prefix_url
|
||||||
|
action :install
|
||||||
|
only_if { new_resource.install_node }
|
||||||
|
end
|
||||||
|
|
||||||
|
ark 'npm' do
|
||||||
|
url lazy { npm_dist(new_resource.npm_version, new_resource.npm_url)['url'] }
|
||||||
|
checksum new_resource.npm_checksum if new_resource.npm_checksum
|
||||||
|
version lazy { npm_dist(new_resource.npm_version, new_resource.npm_url)['version'] || new_resource.npm_version }
|
||||||
|
make_opts ["-j #{new_resource.make_threads || default_make_threads}"]
|
||||||
|
action :install_with_make
|
||||||
|
only_if { new_resource.install_method == 'source' }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
action :remove do
|
||||||
|
ark 'npm' do
|
||||||
|
action :remove
|
||||||
|
only_if { new_resource.install_method == 'source' }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
action_class do
|
||||||
|
include NodeJs::Helper
|
||||||
|
end
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
provides :nodejs_npm_packages
|
||||||
|
unified_mode true
|
||||||
|
|
||||||
|
property :packages, Array, default: []
|
||||||
|
|
||||||
|
default_action :install
|
||||||
|
|
||||||
|
action :install do
|
||||||
|
new_resource.packages.each do |pkg|
|
||||||
|
package_properties = normalize_package(pkg)
|
||||||
|
pkg_action = package_properties.delete(:action) || :install
|
||||||
|
pkg_name = package_properties.delete(:package)
|
||||||
|
|
||||||
|
npm_package "nodejs_npm-#{pkg_name}-#{pkg_action}" do
|
||||||
|
package pkg_name
|
||||||
|
package_properties.each do |property_name, property_value|
|
||||||
|
send(property_name, property_value)
|
||||||
|
end
|
||||||
|
action pkg_action.to_sym
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
action :remove do
|
||||||
|
new_resource.packages.each do |pkg|
|
||||||
|
package_properties = normalize_package(pkg)
|
||||||
|
pkg_name = package_properties[:package]
|
||||||
|
|
||||||
|
npm_package "nodejs_npm-#{pkg_name}-remove" do
|
||||||
|
package pkg_name
|
||||||
|
action :remove
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
action_class do
|
||||||
|
def normalize_package(pkg)
|
||||||
|
pkg.each_with_object({}) do |(key, value), memo|
|
||||||
|
property_name = key.to_sym
|
||||||
|
property_name = :package if property_name == :name
|
||||||
|
memo[property_name] = value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
provides :nodejs_repository
|
||||||
|
unified_mode true
|
||||||
|
|
||||||
|
property :repo_name, String, name_property: true
|
||||||
|
property :node_major, [String, Integer], default: '24'
|
||||||
|
property :apt_uri, String
|
||||||
|
property :apt_distribution, String, default: 'nodistro'
|
||||||
|
property :apt_components, Array, default: ['main']
|
||||||
|
property :apt_key, String, default: 'https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key'
|
||||||
|
property :apt_keyring, String, default: '/etc/apt/keyrings/nodesource.asc'
|
||||||
|
property :apt_pin_priority, String, default: '600'
|
||||||
|
property :yum_baseurl, String
|
||||||
|
property :yum_gpgkey, String, default: 'https://rpm.nodesource.com/gpgkey/ns-operations-public.key'
|
||||||
|
property :yum_priority, String, default: '9'
|
||||||
|
property :enabled, [true, false], default: true
|
||||||
|
property :gpgcheck, [true, false], default: true
|
||||||
|
|
||||||
|
default_action :create
|
||||||
|
|
||||||
|
action :create do
|
||||||
|
case node['platform_family']
|
||||||
|
when 'debian'
|
||||||
|
package %w(ca-certificates curl gnupg apt-transport-https)
|
||||||
|
|
||||||
|
directory ::File.dirname(new_resource.apt_keyring) do
|
||||||
|
recursive true
|
||||||
|
mode '0755'
|
||||||
|
end
|
||||||
|
|
||||||
|
remote_file new_resource.apt_keyring do
|
||||||
|
source new_resource.apt_key
|
||||||
|
mode '0644'
|
||||||
|
end
|
||||||
|
|
||||||
|
apt_preference new_resource.repo_name do
|
||||||
|
glob '*'
|
||||||
|
pin 'origin deb.nodesource.com'
|
||||||
|
pin_priority new_resource.apt_pin_priority
|
||||||
|
end
|
||||||
|
|
||||||
|
apt_repository new_resource.repo_name do
|
||||||
|
uri lazy { new_resource.apt_uri || "https://deb.nodesource.com/node_#{new_resource.node_major}.x" }
|
||||||
|
components new_resource.apt_components
|
||||||
|
signed_by new_resource.apt_keyring
|
||||||
|
distribution new_resource.apt_distribution
|
||||||
|
end
|
||||||
|
when 'rhel', 'fedora', 'amazon'
|
||||||
|
yum_repository "#{new_resource.repo_name}-nodejs" do
|
||||||
|
description 'nodesource.com nodejs repository'
|
||||||
|
baseurl lazy { new_resource.yum_baseurl || "https://rpm.nodesource.com/pub_#{new_resource.node_major}.x/nodistro/nodejs/$basearch" }
|
||||||
|
gpgkey new_resource.yum_gpgkey
|
||||||
|
priority new_resource.yum_priority
|
||||||
|
enabled new_resource.enabled
|
||||||
|
gpgcheck new_resource.gpgcheck
|
||||||
|
options(module_hotfixes: 1)
|
||||||
|
action :create
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
action :remove do
|
||||||
|
case node['platform_family']
|
||||||
|
when 'debian'
|
||||||
|
apt_repository new_resource.repo_name do
|
||||||
|
action :remove
|
||||||
|
end
|
||||||
|
|
||||||
|
file new_resource.apt_keyring do
|
||||||
|
action :delete
|
||||||
|
end
|
||||||
|
when 'rhel', 'fedora', 'amazon'
|
||||||
|
yum_repository "#{new_resource.repo_name}-nodejs" do
|
||||||
|
action :remove
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,28 +1,8 @@
|
|||||||
#
|
# frozen_string_literal: true
|
||||||
# Cookbook:: nodejs
|
|
||||||
# Resource:: npm
|
|
||||||
#
|
|
||||||
# Author:: Sergey Balbeko <sergey@balbeko.com>
|
|
||||||
#
|
|
||||||
# Copyright:: 2012-2017, Sergey Balbeko
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
resource_name :npm_package
|
|
||||||
provides :npm_package
|
provides :npm_package
|
||||||
|
unified_mode true
|
||||||
|
|
||||||
# backwards compatibility for the old resource name
|
|
||||||
provides :nodejs_npm
|
provides :nodejs_npm
|
||||||
|
|
||||||
property :package, String, name_property: true
|
property :package, String, name_property: true
|
||||||
@@ -30,7 +10,7 @@ property :version, String
|
|||||||
property :path, String
|
property :path, String
|
||||||
property :url, String
|
property :url, String
|
||||||
property :json, [String, true, false]
|
property :json, [String, true, false]
|
||||||
property :npm_token, String
|
property :npm_token, String, sensitive: true
|
||||||
property :options, Array, default: []
|
property :options, Array, default: []
|
||||||
property :user, String
|
property :user, String
|
||||||
property :group, String
|
property :group, String
|
||||||
@@ -38,10 +18,7 @@ property :live_stream, [false, true], default: false
|
|||||||
property :node_env, String
|
property :node_env, String
|
||||||
property :auto_update, [true, false], default: true
|
property :auto_update, [true, false], default: true
|
||||||
|
|
||||||
def initialize(*args)
|
default_action :install
|
||||||
super
|
|
||||||
@run_context.include_recipe 'nodejs::npm' if node['nodejs']['manage_node']
|
|
||||||
end
|
|
||||||
|
|
||||||
action :install do
|
action :install do
|
||||||
execute "install NPM package #{new_resource.package}" do
|
execute "install NPM package #{new_resource.package}" do
|
||||||
@@ -51,7 +28,8 @@ action :install do
|
|||||||
group new_resource.group
|
group new_resource.group
|
||||||
environment npm_env_vars
|
environment npm_env_vars
|
||||||
live_stream new_resource.live_stream
|
live_stream new_resource.live_stream
|
||||||
not_if { package_installed? && no_auto_update? }
|
sensitive true if new_resource.npm_token
|
||||||
|
not_if { no_auto_update? && package_installed? }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -63,6 +41,20 @@ action :uninstall do
|
|||||||
group new_resource.group
|
group new_resource.group
|
||||||
environment npm_env_vars
|
environment npm_env_vars
|
||||||
live_stream new_resource.live_stream
|
live_stream new_resource.live_stream
|
||||||
|
sensitive true if new_resource.npm_token
|
||||||
|
only_if { package_installed? }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
action :remove do
|
||||||
|
execute "uninstall NPM package #{new_resource.package}" do
|
||||||
|
cwd new_resource.path
|
||||||
|
command "npm uninstall #{npm_options}"
|
||||||
|
user new_resource.user
|
||||||
|
group new_resource.group
|
||||||
|
environment npm_env_vars
|
||||||
|
live_stream new_resource.live_stream
|
||||||
|
sensitive true if new_resource.npm_token
|
||||||
only_if { package_installed? }
|
only_if { package_installed? }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -75,13 +67,19 @@ action_class do
|
|||||||
env_vars['HOME'] = ::Dir.home(new_resource.user) if new_resource.user
|
env_vars['HOME'] = ::Dir.home(new_resource.user) if new_resource.user
|
||||||
env_vars['USER'] = new_resource.user if new_resource.user
|
env_vars['USER'] = new_resource.user if new_resource.user
|
||||||
env_vars['NPM_TOKEN'] = new_resource.npm_token if new_resource.npm_token
|
env_vars['NPM_TOKEN'] = new_resource.npm_token if new_resource.npm_token
|
||||||
env_vars['NODE_ENV'] = new_resource.node_env if new_resource.node_env
|
env_vars['NODE_ENV'] = new_resource.node_env if new_resource.node_env
|
||||||
|
|
||||||
env_vars
|
env_vars
|
||||||
end
|
end
|
||||||
|
|
||||||
def package_installed?
|
def package_installed?
|
||||||
new_resource.package && npm_package_installed?(new_resource.package, new_resource.version, new_resource.path, new_resource.npm_token)
|
return package_json_installed? if new_resource.json == true
|
||||||
|
|
||||||
|
new_resource.package && npm_package_installed?(new_resource.package, new_resource.version, new_resource.path, npm_env_vars)
|
||||||
|
end
|
||||||
|
|
||||||
|
def package_json_installed?
|
||||||
|
new_resource.path && ::File.exist?(::File.join(new_resource.path, 'node_modules'))
|
||||||
end
|
end
|
||||||
|
|
||||||
def no_auto_update?
|
def no_auto_update?
|
||||||
@@ -89,7 +87,7 @@ action_class do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def npm_options
|
def npm_options
|
||||||
options = ''
|
options = +''
|
||||||
options << ' -global' unless new_resource.path
|
options << ' -global' unless new_resource.path
|
||||||
new_resource.options.each do |option|
|
new_resource.options.each do |option|
|
||||||
options << " #{option}"
|
options << " #{option}"
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
ruby:
|
|
||||||
config_file: .rubocop.yml
|
|
||||||
|
|
||||||
java_script:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
scss:
|
|
||||||
enabled: false
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
".": "1.0.0"
|
|
||||||
}
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
# Change Log
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
|
||||||
|
|
||||||
## [1.0.0](https://github.com/sous-chefs/prometheus/compare/v0.7.6...v1.0.0) (2026-04-29)
|
|
||||||
|
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
|
||||||
|
|
||||||
* migrate prometheus resources ([#36](https://github.com/sous-chefs/prometheus/issues/36))
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* migrate prometheus resources ([#36](https://github.com/sous-chefs/prometheus/issues/36)) ([6698649](https://github.com/sous-chefs/prometheus/commit/66986492fe0f069bc69474e19423b16e21563c16))
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **ci:** Update workflows to use release pipeline ([#29](https://github.com/sous-chefs/prometheus/issues/29)) ([b991214](https://github.com/sous-chefs/prometheus/commit/b991214225164d55694966e535478a38e720a8f0))
|
|
||||||
|
|
||||||
## [0.7.6](https://github.com/sous-chefs/prometheus/compare/0.7.5...v0.7.6) (2025-10-16)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **ci:** Update workflows to use release pipeline ([#29](https://github.com/sous-chefs/prometheus/issues/29)) ([b991214](https://github.com/sous-chefs/prometheus/commit/b991214225164d55694966e535478a38e720a8f0))
|
|
||||||
|
|
||||||
## 0.7.2 - *2022-02-08*
|
|
||||||
|
|
||||||
* Remove delivery folder
|
|
||||||
|
|
||||||
Standardise files with files in sous-chefs/repo-management
|
|
||||||
|
|
||||||
## 0.7.1 - *2021-06-01*
|
|
||||||
|
|
||||||
* resolved cookstyle error: Thorfile:1:1 convention: `Style/Encoding`
|
|
||||||
* resolved cookstyle error: test/shared/spec_helper.rb:6:10 convention: `Style/ExpandPathArguments`
|
|
||||||
|
|
||||||
## [0.7.1 - *2021-06-01*][0.7.1 - *2021-06-01*]
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Updated attributes and templates for Prometheus 0.15 release.
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
* Added upstart init for ubuntu platform.
|
|
||||||
|
|
||||||
## [0.5.1] - 2015-03-25
|
|
||||||
|
|
||||||
Changed
|
|
||||||
|
|
||||||
* Updated documentation.
|
|
||||||
|
|
||||||
## [0.5.0] - 2015-03-25
|
|
||||||
|
|
||||||
Added
|
|
||||||
|
|
||||||
* Added systemd init for redhat platform family version 7 or greater.
|
|
||||||
* Default init style per platform.
|
|
||||||
* Install Prometheus via pre-compiled binary.
|
|
||||||
* Added the prometheus_job resource for defining Prometheus scraping jobs.
|
|
||||||
* Attribute flag to externally manage prometheus.conf file.
|
|
||||||
|
|
||||||
Changed
|
|
||||||
|
|
||||||
* Removed flags that were deprecated in the prometheus 0.12.0 release.
|
|
||||||
|
|
||||||
### Contributors for this release
|
|
||||||
|
|
||||||
* [Eric Richardson](https://github.com/ewr) - External jobs config and prometheus job resource.
|
|
||||||
|
|
||||||
Thank You!
|
|
||||||
|
|
||||||
## [0.4.0] - 2015-03-12
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
* Fix init template path bug on chef 11.x.
|
|
||||||
|
|
||||||
## [0.3.0] - 2015-03-11
|
|
||||||
|
|
||||||
Fixed
|
|
||||||
|
|
||||||
* Fixed cookbook badge in README
|
|
||||||
|
|
||||||
## [0.2.0] - 2015-03-11
|
|
||||||
|
|
||||||
Fixed
|
|
||||||
|
|
||||||
* License defined in metadata.
|
|
||||||
|
|
||||||
## 0.1.0 - 2015-03-11
|
|
||||||
|
|
||||||
Changed
|
|
||||||
|
|
||||||
* Initial release of prometheus cookbook
|
|
||||||
|
|
||||||
[0.7.1 - *2021-06-01*]: https://github.com/rayrod2030/chef-prometheus/compare/0.5.1...HEAD
|
|
||||||
[0.5.1]: https://github.com/rayrod2030/chef-prometheus/compare/0.5.0...0.5.1
|
|
||||||
[0.5.0]: https://github.com/rayrod2030/chef-prometheus/compare/0.4.0...0.5.0
|
|
||||||
[0.4.0]: https://github.com/rayrod2030/chef-prometheus/compare/0.3.0...0.4.0
|
|
||||||
[0.3.0]: https://github.com/rayrod2030/chef-prometheus/compare/0.2.0...0.3.0
|
|
||||||
[0.2.0]: https://github.com/rayrod2030/chef-prometheus/compare/0.1.0...0.2.0
|
|
||||||
@@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
# Limitations
|
|
||||||
|
|
||||||
This cookbook manages Prometheus and Alertmanager from upstream release archives or source builds.
|
|
||||||
|
|
||||||
## Upstream Support
|
|
||||||
|
|
||||||
Prometheus publishes precompiled archives for Prometheus and Alertmanager from the official download page and GitHub releases. As of April 28, 2026, the cookbook defaults to:
|
|
||||||
|
|
||||||
* Prometheus 3.11.2 `linux-amd64` and `linux-arm64`
|
|
||||||
* Alertmanager 0.32.0 `linux-amd64` and `linux-arm64`
|
|
||||||
|
|
||||||
The upstream projects also publish Docker images and archives for other operating systems. This cookbook only supports Linux systemd hosts.
|
|
||||||
|
|
||||||
## Platform Support
|
|
||||||
|
|
||||||
Supported platforms are modern systemd Linux distributions declared in `metadata.rb`:
|
|
||||||
|
|
||||||
* AlmaLinux 8+
|
|
||||||
* Amazon Linux 2023+
|
|
||||||
* CentOS Stream 9+
|
|
||||||
* Debian 12+
|
|
||||||
* Fedora
|
|
||||||
* Oracle Linux 8+
|
|
||||||
* Red Hat Enterprise Linux 8+
|
|
||||||
* Rocky Linux 8+
|
|
||||||
* Ubuntu 20.04+
|
|
||||||
|
|
||||||
Legacy init systems are not supported. The cookbook no longer manages runit, upstart, or SysV init services.
|
|
||||||
|
|
||||||
## Installation Constraints
|
|
||||||
|
|
||||||
The default binary installation path uses official Linux tarballs for `amd64` or `arm64`. Override `architecture`, `binary_url`, `checksum`, and `file_extension` when using another upstream artifact or a private mirror.
|
|
||||||
|
|
||||||
Source installs require build tooling, Git, and the upstream Go build chain expected by the selected Prometheus or Alertmanager version. Source builds are retained for compatibility but binary installs are the primary supported path.
|
|
||||||
|
|
||||||
Prometheus and Alertmanager are not installed from operating system package repositories by these resources.
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
# prometheus Cookbook
|
|
||||||
|
|
||||||
This cookbook provides custom resources for installing and configuring [Prometheus][] and Alertmanager.
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
* Chef Infra Client 16.0 or later
|
|
||||||
* A systemd Linux platform listed in [LIMITATIONS.md](LIMITATIONS.md)
|
|
||||||
|
|
||||||
See [LIMITATIONS.md](LIMITATIONS.md) for upstream platform and installation constraints.
|
|
||||||
|
|
||||||
## Resources
|
|
||||||
|
|
||||||
* [prometheus_install](documentation/prometheus_install.md)
|
|
||||||
* [prometheus_config](documentation/prometheus_config.md)
|
|
||||||
* [prometheus_service](documentation/prometheus_service.md)
|
|
||||||
* [prometheus_job](documentation/prometheus_job.md)
|
|
||||||
* [prometheus_alertmanager_install](documentation/prometheus_alertmanager_install.md)
|
|
||||||
* [prometheus_alertmanager_config](documentation/prometheus_alertmanager_config.md)
|
|
||||||
* [prometheus_alertmanager_service](documentation/prometheus_alertmanager_service.md)
|
|
||||||
|
|
||||||
See [migration.md](migration.md) for migration notes from the legacy recipe and attribute interface.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```ruby
|
|
||||||
prometheus_install 'prometheus'
|
|
||||||
|
|
||||||
prometheus_config 'prometheus'
|
|
||||||
|
|
||||||
prometheus_job 'prometheus' do
|
|
||||||
scrape_interval '15s'
|
|
||||||
target 'localhost:9090'
|
|
||||||
end
|
|
||||||
|
|
||||||
prometheus_service 'prometheus'
|
|
||||||
```
|
|
||||||
|
|
||||||
Alertmanager:
|
|
||||||
|
|
||||||
```ruby
|
|
||||||
prometheus_alertmanager_install 'alertmanager'
|
|
||||||
prometheus_alertmanager_config 'alertmanager'
|
|
||||||
prometheus_alertmanager_service 'alertmanager'
|
|
||||||
```
|
|
||||||
|
|
||||||
## License & Authors
|
|
||||||
|
|
||||||
* Author: Ray Rodriguez <rayrod2030@gmail.com>
|
|
||||||
* Author: kristian järvenpää <kristian.jarvenpaa@gmail.com>
|
|
||||||
* Maintainer: Sous Chefs
|
|
||||||
|
|
||||||
```text
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
```
|
|
||||||
|
|
||||||
[Prometheus]: https://github.com/prometheus/prometheus
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
require 'bundler'
|
|
||||||
require 'bundler/setup'
|
|
||||||
require 'berkshelf/thor'
|
|
||||||
|
|
||||||
begin
|
|
||||||
require 'kitchen/thor_tasks'
|
|
||||||
Kitchen::ThorTasks.new
|
|
||||||
rescue LoadError
|
|
||||||
puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
|
|
||||||
end
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
# Put files/directories that should be ignored in this file when uploading
|
|
||||||
# to a Chef Infra Server or Supermarket.
|
|
||||||
# Lines that start with '# ' are comments.
|
|
||||||
|
|
||||||
# OS generated files #
|
|
||||||
######################
|
|
||||||
.DS_Store
|
|
||||||
ehthumbs.db
|
|
||||||
Icon?
|
|
||||||
nohup.out
|
|
||||||
Thumbs.db
|
|
||||||
.envrc
|
|
||||||
|
|
||||||
# EDITORS #
|
|
||||||
###########
|
|
||||||
.#*
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
*_flymake
|
|
||||||
*_flymake.*
|
|
||||||
*.bak
|
|
||||||
*.sw[a-z]
|
|
||||||
*.tmproj
|
|
||||||
*~
|
|
||||||
\#*
|
|
||||||
REVISION
|
|
||||||
TAGS*
|
|
||||||
tmtags
|
|
||||||
.vscode
|
|
||||||
.editorconfig
|
|
||||||
|
|
||||||
## COMPILED ##
|
|
||||||
##############
|
|
||||||
*.class
|
|
||||||
*.com
|
|
||||||
*.dll
|
|
||||||
*.exe
|
|
||||||
*.o
|
|
||||||
*.pyc
|
|
||||||
*.so
|
|
||||||
*/rdoc/
|
|
||||||
a.out
|
|
||||||
mkmf.log
|
|
||||||
|
|
||||||
# Testing #
|
|
||||||
###########
|
|
||||||
.circleci/*
|
|
||||||
.codeclimate.yml
|
|
||||||
.delivery/*
|
|
||||||
.foodcritic
|
|
||||||
.kitchen*
|
|
||||||
.mdlrc
|
|
||||||
.overcommit.yml
|
|
||||||
.rspec
|
|
||||||
.rubocop.yml
|
|
||||||
.travis.yml
|
|
||||||
.watchr
|
|
||||||
.yamllint
|
|
||||||
azure-pipelines.yml
|
|
||||||
Dangerfile
|
|
||||||
examples/*
|
|
||||||
features/*
|
|
||||||
Guardfile
|
|
||||||
kitchen*.yml
|
|
||||||
mlc_config.json
|
|
||||||
Procfile
|
|
||||||
Rakefile
|
|
||||||
spec/*
|
|
||||||
test/*
|
|
||||||
|
|
||||||
# SCM #
|
|
||||||
#######
|
|
||||||
.git
|
|
||||||
.gitattributes
|
|
||||||
.gitconfig
|
|
||||||
.github/*
|
|
||||||
.gitignore
|
|
||||||
.gitkeep
|
|
||||||
.gitmodules
|
|
||||||
.svn
|
|
||||||
*/.bzr/*
|
|
||||||
*/.git
|
|
||||||
*/.hg/*
|
|
||||||
*/.svn/*
|
|
||||||
|
|
||||||
# Berkshelf #
|
|
||||||
#############
|
|
||||||
Berksfile
|
|
||||||
Berksfile.lock
|
|
||||||
cookbooks/*
|
|
||||||
tmp
|
|
||||||
|
|
||||||
# Bundler #
|
|
||||||
###########
|
|
||||||
vendor/*
|
|
||||||
Gemfile
|
|
||||||
Gemfile.lock
|
|
||||||
|
|
||||||
# Policyfile #
|
|
||||||
##############
|
|
||||||
Policyfile.rb
|
|
||||||
Policyfile.lock.json
|
|
||||||
|
|
||||||
# Documentation #
|
|
||||||
#############
|
|
||||||
CODE_OF_CONDUCT*
|
|
||||||
CONTRIBUTING*
|
|
||||||
documentation/*
|
|
||||||
TESTING*
|
|
||||||
UPGRADING*
|
|
||||||
|
|
||||||
# Vagrant #
|
|
||||||
###########
|
|
||||||
.vagrant
|
|
||||||
Vagrantfile
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'uri'
|
|
||||||
|
|
||||||
module PrometheusCookbook
|
|
||||||
module Helpers
|
|
||||||
def archive_name(component, version, url)
|
|
||||||
basename = ::File.basename(URI.parse(url).path)
|
|
||||||
basename.sub(/(?:\.tar\.gz|\.tgz|\.tar\.bz2|\.tar\.xz|\.zip)\z/, '')
|
|
||||||
rescue URI::InvalidURIError
|
|
||||||
"#{component}-#{version}"
|
|
||||||
end
|
|
||||||
|
|
||||||
def install_dir_parent(install_dir)
|
|
||||||
::File.dirname(install_dir)
|
|
||||||
end
|
|
||||||
|
|
||||||
def install_dir_name(install_dir)
|
|
||||||
::File.basename(install_dir)
|
|
||||||
end
|
|
||||||
|
|
||||||
def prometheus_flags(resource)
|
|
||||||
flag_pairs = if Gem::Version.new(resource.version) < Gem::Version.new('2.0.0-alpha.0')
|
|
||||||
resource.flags.map { |key, value| "-#{key}=#{value}" unless value == '' }
|
|
||||||
else
|
|
||||||
resource.cli_options.map { |key, value| "--#{key}=#{value}" unless value == '' } +
|
|
||||||
resource.cli_flags.map { |flag| "--#{flag}" unless flag == '' }
|
|
||||||
end
|
|
||||||
|
|
||||||
flag_pairs.compact.join(' ')
|
|
||||||
end
|
|
||||||
|
|
||||||
def prometheus_unit_content(resource)
|
|
||||||
{
|
|
||||||
Unit: {
|
|
||||||
Description: 'Prometheus',
|
|
||||||
After: 'network.target auditd.service',
|
|
||||||
},
|
|
||||||
Service: {
|
|
||||||
Type: 'simple',
|
|
||||||
Environment: "GOMAXPROCS=#{node['cpu']['total'] || 1}",
|
|
||||||
User: resource.user,
|
|
||||||
Group: resource.group,
|
|
||||||
ExecStart: "#{resource.binary} #{prometheus_flags(resource)}",
|
|
||||||
ExecReload: '/bin/kill -HUP $MAINPID',
|
|
||||||
Restart: 'always',
|
|
||||||
},
|
|
||||||
Install: {
|
|
||||||
WantedBy: 'multi-user.target',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def alertmanager_unit_content(resource)
|
|
||||||
{
|
|
||||||
Unit: {
|
|
||||||
Description: 'Prometheus Alertmanager',
|
|
||||||
After: 'network.target',
|
|
||||||
},
|
|
||||||
Service: {
|
|
||||||
User: resource.user,
|
|
||||||
Group: resource.group,
|
|
||||||
ExecStart: [
|
|
||||||
resource.binary,
|
|
||||||
"--log.level=#{resource.log_level}",
|
|
||||||
"--storage.path=#{resource.storage_path}",
|
|
||||||
"--config.file=#{resource.config_file}",
|
|
||||||
"--web.external-url=#{resource.external_url}",
|
|
||||||
].join(' '),
|
|
||||||
Restart: 'always',
|
|
||||||
},
|
|
||||||
Install: {
|
|
||||||
WantedBy: 'multi-user.target',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "prometheus",
|
|
||||||
"description": "Provides custom resources for installing and configuring Prometheus and Alertmanager",
|
|
||||||
"long_description": "",
|
|
||||||
"maintainer": "Sous Chefs",
|
|
||||||
"maintainer_email": "help@sous-chefs.org",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"platforms": {
|
|
||||||
"almalinux": ">= 8.0",
|
|
||||||
"amazon": ">= 2023.0",
|
|
||||||
"centos_stream": ">= 9.0",
|
|
||||||
"debian": ">= 12.0",
|
|
||||||
"fedora": ">= 0.0.0",
|
|
||||||
"oracle": ">= 8.0",
|
|
||||||
"redhat": ">= 8.0",
|
|
||||||
"rocky": ">= 8.0",
|
|
||||||
"ubuntu": ">= 20.04"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"ark": ">= 0.0.0"
|
|
||||||
},
|
|
||||||
"providing": {
|
|
||||||
|
|
||||||
},
|
|
||||||
"recipes": {
|
|
||||||
|
|
||||||
},
|
|
||||||
"version": "1.0.0",
|
|
||||||
"source_url": "https://github.com/sous-chefs/prometheus",
|
|
||||||
"issues_url": "https://github.com/sous-chefs/prometheus/issues",
|
|
||||||
"privacy": false,
|
|
||||||
"chef_versions": [
|
|
||||||
[
|
|
||||||
">= 16.0"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"ohai_versions": [
|
|
||||||
|
|
||||||
],
|
|
||||||
"gems": [
|
|
||||||
|
|
||||||
],
|
|
||||||
"eager_load_libraries": true
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
name 'prometheus'
|
|
||||||
maintainer 'Sous Chefs'
|
|
||||||
maintainer_email 'help@sous-chefs.org'
|
|
||||||
license 'Apache-2.0'
|
|
||||||
description 'Provides custom resources for installing and configuring Prometheus and Alertmanager'
|
|
||||||
version '1.0.0'
|
|
||||||
source_url 'https://github.com/sous-chefs/prometheus'
|
|
||||||
issues_url 'https://github.com/sous-chefs/prometheus/issues'
|
|
||||||
chef_version '>= 16.0'
|
|
||||||
|
|
||||||
depends 'ark'
|
|
||||||
|
|
||||||
supports 'almalinux', '>= 8.0'
|
|
||||||
supports 'amazon', '>= 2023.0'
|
|
||||||
supports 'centos_stream', '>= 9.0'
|
|
||||||
supports 'debian', '>= 12.0'
|
|
||||||
supports 'fedora'
|
|
||||||
supports 'oracle', '>= 8.0'
|
|
||||||
supports 'redhat', '>= 8.0'
|
|
||||||
supports 'rocky', '>= 8.0'
|
|
||||||
supports 'ubuntu', '>= 20.04'
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
# Migration
|
|
||||||
|
|
||||||
This cookbook has been migrated from recipes and attributes to custom resources.
|
|
||||||
|
|
||||||
## Removed Entry Points
|
|
||||||
|
|
||||||
The `recipes/` and `attributes/` directories were removed. Wrapper cookbooks should call the resources directly and pass property values instead of overriding `node['prometheus']` attributes.
|
|
||||||
|
|
||||||
Legacy runit, upstart, and SysV init behavior was removed. Services are managed with Chef's `systemd_unit` resource.
|
|
||||||
|
|
||||||
## Resource Mapping
|
|
||||||
|
|
||||||
Use these resources in place of the old recipes:
|
|
||||||
|
|
||||||
* `prometheus_install` replaces `prometheus::binary`, `prometheus::shell_binary`, and `prometheus::source`.
|
|
||||||
* `prometheus_config` replaces the Prometheus configuration portion of `prometheus::default`.
|
|
||||||
* `prometheus_service` replaces `prometheus::service`.
|
|
||||||
* `prometheus_alertmanager_install` replaces `prometheus::alertmanager_binary` and `prometheus::alertmanager_source`.
|
|
||||||
* `prometheus_alertmanager_config` replaces the Alertmanager configuration portion of `prometheus::alertmanager`.
|
|
||||||
* `prometheus_alertmanager_service` replaces the Alertmanager service portion of `prometheus::alertmanager`.
|
|
||||||
* `prometheus_job` remains available and now uses explicit properties instead of node attributes.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```ruby
|
|
||||||
prometheus_install 'prometheus'
|
|
||||||
|
|
||||||
prometheus_config 'prometheus'
|
|
||||||
|
|
||||||
prometheus_job 'prometheus' do
|
|
||||||
scrape_interval '15s'
|
|
||||||
target 'localhost:9090'
|
|
||||||
end
|
|
||||||
|
|
||||||
prometheus_service 'prometheus'
|
|
||||||
```
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
property :version, String, default: '0.32.0'
|
|
||||||
property :binary, String, default: '/opt/prometheus/alertmanager'
|
|
||||||
property :architecture, String, equal_to: %w(amd64 arm64), default: lazy {
|
|
||||||
node['kernel']['machine'] == 'aarch64' ? 'arm64' : 'amd64'
|
|
||||||
}
|
|
||||||
property :binary_url, String, default: lazy { "https://github.com/prometheus/alertmanager/releases/download/v#{version}/alertmanager-#{version}.linux-#{architecture}.tar.gz" }
|
|
||||||
property :checksum, String, default: lazy {
|
|
||||||
{
|
|
||||||
'amd64' => 'be72f50f6124ec53d944c0f100f8ec8108d969bade02fcc9f06a3068ff6c726f',
|
|
||||||
'arm64' => '7812e12699694974f57ecc0b0400913c6c0d90190630d4332a7994a44982b1ed',
|
|
||||||
}[architecture]
|
|
||||||
}
|
|
||||||
property :file_extension, String, default: ''
|
|
||||||
property :source_repository, String, default: 'https://github.com/prometheus/alertmanager.git'
|
|
||||||
property :source_revision, String, default: lazy { "v#{version}" }
|
|
||||||
property :config_file, String, default: '/opt/prometheus/alertmanager.yml'
|
|
||||||
property :storage_path, String, default: '/opt/prometheus/data'
|
|
||||||
property :external_url, String, default: 'http://127.0.0.1/alert-manager/'
|
|
||||||
property :log_level, String, default: 'debug'
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
property :install_dir, String, default: '/opt/prometheus'
|
|
||||||
property :log_dir, String, default: '/var/log/prometheus'
|
|
||||||
property :user, String, default: 'prometheus'
|
|
||||||
property :group, String, default: 'prometheus'
|
|
||||||
property :use_existing_user, [true, false], default: false
|
|
||||||
property :install_method, String, equal_to: %w(binary shell_binary source), default: 'binary'
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
property :version, String, default: '3.11.2'
|
|
||||||
property :binary, String, default: '/opt/prometheus/prometheus'
|
|
||||||
property :architecture, String, equal_to: %w(amd64 arm64), default: lazy {
|
|
||||||
node['kernel']['machine'] == 'aarch64' ? 'arm64' : 'amd64'
|
|
||||||
}
|
|
||||||
property :binary_url, String, default: lazy { "https://github.com/prometheus/prometheus/releases/download/v#{version}/prometheus-#{version}.linux-#{architecture}.tar.gz" }
|
|
||||||
property :checksum, String, default: lazy {
|
|
||||||
{
|
|
||||||
'amd64' => 'f643ea1ee90d109329302d27bddb1fb2e52655b1fa84e9e26f9a6f340da144a6',
|
|
||||||
'arm64' => '4e40f115655a3021744137f49287846bc5a59e02835565748ff66b23e776a73d',
|
|
||||||
}[architecture]
|
|
||||||
}
|
|
||||||
property :file_extension, String, default: ''
|
|
||||||
property :source_repository, String, default: 'https://github.com/prometheus/prometheus.git'
|
|
||||||
property :source_revision, String, default: lazy { "v#{version}" }
|
|
||||||
property :config_file, String, default: '/opt/prometheus/prometheus.yml'
|
|
||||||
property :storage_path, String, default: '/var/lib/prometheus'
|
|
||||||
property :flags, Hash, default: lazy {
|
|
||||||
legacy_flags = {
|
|
||||||
'config.file' => config_file,
|
|
||||||
'log.level' => 'info',
|
|
||||||
'alertmanager.timeout' => '10s',
|
|
||||||
'alertmanager.notification-queue-capacity' => 100,
|
|
||||||
'alertmanager.url' => 'http://127.0.0.1/alert-manager/',
|
|
||||||
'query.max-concurrency' => 20,
|
|
||||||
'query.staleness-delta' => '5m',
|
|
||||||
'query.timeout' => '2m',
|
|
||||||
'storage.local.checkpoint-dirty-series-limit' => 5000,
|
|
||||||
'storage.local.checkpoint-interval' => '5m',
|
|
||||||
'storage.local.dirty' => false,
|
|
||||||
'storage.local.index-cache-size.fingerprint-to-metric' => 10_485_760,
|
|
||||||
'storage.local.index-cache-size.fingerprint-to-timerange' => 5_242_880,
|
|
||||||
'storage.local.index-cache-size.label-name-to-label-values' => 10_485_760,
|
|
||||||
'storage.local.index-cache-size.label-pair-to-fingerprints' => 20_971_520,
|
|
||||||
'storage.local.memory-chunks' => 1_048_576,
|
|
||||||
'storage.local.path' => storage_path,
|
|
||||||
'storage.local.pedantic-checks' => false,
|
|
||||||
'storage.local.retention' => '360h0m0s',
|
|
||||||
'storage.local.series-sync-strategy' => 'adaptive',
|
|
||||||
'storage.remote.influxdb-url' => '',
|
|
||||||
'storage.remote.influxdb.database' => 'prometheus',
|
|
||||||
'storage.remote.influxdb.retention-policy' => 'default',
|
|
||||||
'storage.remote.opentsdb-url' => '',
|
|
||||||
'storage.remote.timeout' => '30s',
|
|
||||||
'web.console.libraries' => 'console_libraries',
|
|
||||||
'web.console.templates' => 'consoles',
|
|
||||||
'web.enable-remote-shutdown' => false,
|
|
||||||
'web.external-url' => '',
|
|
||||||
'web.listen-address' => ':9090',
|
|
||||||
'web.telemetry-path' => '/metrics',
|
|
||||||
'web.user-assets' => '',
|
|
||||||
}
|
|
||||||
legacy_flags['web.use-local-assets'] = false if Gem::Version.new(version) <= Gem::Version.new('0.16.2')
|
|
||||||
legacy_flags
|
|
||||||
}
|
|
||||||
property :cli_options, Hash, default: lazy {
|
|
||||||
{
|
|
||||||
'config.file' => config_file,
|
|
||||||
'log.level' => 'info',
|
|
||||||
'query.max-concurrency' => 20,
|
|
||||||
'query.lookback-delta' => '5m',
|
|
||||||
'query.timeout' => '2m',
|
|
||||||
'storage.tsdb.path' => storage_path,
|
|
||||||
'storage.tsdb.retention.time' => '15d',
|
|
||||||
'web.listen-address' => ':9090',
|
|
||||||
'web.telemetry-path' => '/metrics',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
property :cli_flags, Array, default: ['web.enable-lifecycle']
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
provides :prometheus_alertmanager_config
|
|
||||||
unified_mode true
|
|
||||||
|
|
||||||
use '_partial/_common'
|
|
||||||
use '_partial/_alertmanager'
|
|
||||||
|
|
||||||
property :template_cookbook, String, default: 'prometheus'
|
|
||||||
property :template_source, String, default: 'alertmanager.yml.erb'
|
|
||||||
property :notification_config, Hash, default: {}
|
|
||||||
|
|
||||||
default_action :create
|
|
||||||
|
|
||||||
action :create do
|
|
||||||
template new_resource.config_file do
|
|
||||||
cookbook new_resource.template_cookbook
|
|
||||||
source new_resource.template_source
|
|
||||||
mode '0644'
|
|
||||||
owner new_resource.user
|
|
||||||
group new_resource.group
|
|
||||||
variables(notification_config: new_resource.notification_config)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :delete do
|
|
||||||
file new_resource.config_file do
|
|
||||||
action :delete
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
provides :prometheus_alertmanager_install
|
|
||||||
unified_mode true
|
|
||||||
|
|
||||||
use '_partial/_common'
|
|
||||||
use '_partial/_alertmanager'
|
|
||||||
|
|
||||||
default_action :install
|
|
||||||
|
|
||||||
action_class do
|
|
||||||
include PrometheusCookbook::Helpers
|
|
||||||
end
|
|
||||||
|
|
||||||
action :install do
|
|
||||||
user new_resource.user do
|
|
||||||
system true
|
|
||||||
shell '/bin/false'
|
|
||||||
home new_resource.install_dir
|
|
||||||
not_if { new_resource.use_existing_user || new_resource.user == 'root' }
|
|
||||||
end
|
|
||||||
|
|
||||||
directory new_resource.install_dir do
|
|
||||||
owner new_resource.user
|
|
||||||
group new_resource.group
|
|
||||||
mode '0755'
|
|
||||||
recursive true
|
|
||||||
end
|
|
||||||
|
|
||||||
directory new_resource.log_dir do
|
|
||||||
owner new_resource.user
|
|
||||||
group new_resource.group
|
|
||||||
mode '0755'
|
|
||||||
recursive true
|
|
||||||
end
|
|
||||||
|
|
||||||
directory new_resource.storage_path do
|
|
||||||
owner new_resource.user
|
|
||||||
group new_resource.group
|
|
||||||
mode '0755'
|
|
||||||
recursive true
|
|
||||||
end
|
|
||||||
|
|
||||||
case new_resource.install_method
|
|
||||||
when 'binary'
|
|
||||||
package %w(tar bzip2)
|
|
||||||
|
|
||||||
ark install_dir_name(new_resource.install_dir) do
|
|
||||||
url new_resource.binary_url
|
|
||||||
checksum new_resource.checksum
|
|
||||||
version new_resource.version
|
|
||||||
prefix_root Chef::Config['file_cache_path']
|
|
||||||
path install_dir_parent(new_resource.install_dir)
|
|
||||||
owner new_resource.user
|
|
||||||
group new_resource.group
|
|
||||||
extension new_resource.file_extension unless new_resource.file_extension.empty?
|
|
||||||
action :put
|
|
||||||
end
|
|
||||||
when 'shell_binary'
|
|
||||||
package %w(tar bzip2)
|
|
||||||
|
|
||||||
remote_file "#{Chef::Config[:file_cache_path]}/alertmanager-#{new_resource.version}.tar.gz" do
|
|
||||||
source new_resource.binary_url
|
|
||||||
checksum new_resource.checksum
|
|
||||||
action :create
|
|
||||||
notifies :run, 'execute[install_alertmanager_archive]', :immediately
|
|
||||||
end
|
|
||||||
|
|
||||||
execute 'install_alertmanager_archive' do
|
|
||||||
command "tar -xzf #{Chef::Config[:file_cache_path]}/alertmanager-#{new_resource.version}.tar.gz -C #{new_resource.install_dir} --strip-components=1"
|
|
||||||
action :nothing
|
|
||||||
end
|
|
||||||
when 'source'
|
|
||||||
build_essential 'install compilation tools'
|
|
||||||
|
|
||||||
package %w(curl git-core mercurial gzip sed)
|
|
||||||
|
|
||||||
git "#{Chef::Config[:file_cache_path]}/alertmanager-#{new_resource.version}" do
|
|
||||||
repository new_resource.source_repository
|
|
||||||
revision new_resource.source_revision
|
|
||||||
action :checkout
|
|
||||||
end
|
|
||||||
|
|
||||||
bash 'compile_alertmanager_source' do
|
|
||||||
cwd "#{Chef::Config[:file_cache_path]}/alertmanager-#{new_resource.version}"
|
|
||||||
code "make && mv alertmanager #{new_resource.install_dir}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
provides :prometheus_alertmanager_service
|
|
||||||
unified_mode true
|
|
||||||
|
|
||||||
use '_partial/_common'
|
|
||||||
use '_partial/_alertmanager'
|
|
||||||
|
|
||||||
default_action :create
|
|
||||||
|
|
||||||
action_class do
|
|
||||||
include PrometheusCookbook::Helpers
|
|
||||||
end
|
|
||||||
|
|
||||||
action :create do
|
|
||||||
systemd_unit 'alertmanager.service' do
|
|
||||||
content alertmanager_unit_content(new_resource)
|
|
||||||
action [:create, :enable, :start]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :enable do
|
|
||||||
systemd_unit 'alertmanager.service' do
|
|
||||||
action :enable
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :start do
|
|
||||||
systemd_unit 'alertmanager.service' do
|
|
||||||
action :start
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :restart do
|
|
||||||
systemd_unit 'alertmanager.service' do
|
|
||||||
action :restart
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :reload do
|
|
||||||
systemd_unit 'alertmanager.service' do
|
|
||||||
action :reload
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :stop do
|
|
||||||
systemd_unit 'alertmanager.service' do
|
|
||||||
action [:stop, :disable]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :delete do
|
|
||||||
systemd_unit 'alertmanager.service' do
|
|
||||||
action [:stop, :disable, :delete]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
provides :prometheus_config
|
|
||||||
unified_mode true
|
|
||||||
|
|
||||||
use '_partial/_common'
|
|
||||||
use '_partial/_prometheus'
|
|
||||||
|
|
||||||
property :template_cookbook, String, default: 'prometheus'
|
|
||||||
property :template_source, String, default: 'prometheus.yml.erb'
|
|
||||||
property :rule_filenames, [Array, nil], default: nil
|
|
||||||
property :global_config, Hash, default: {
|
|
||||||
'scrape_interval' => '60s',
|
|
||||||
'evaluation_interval' => '60s',
|
|
||||||
}
|
|
||||||
property :allow_external_config, [true, false], default: false
|
|
||||||
|
|
||||||
default_action :create
|
|
||||||
|
|
||||||
action :create do
|
|
||||||
config_resource = new_resource
|
|
||||||
|
|
||||||
with_run_context :root do
|
|
||||||
template config_resource.config_file do
|
|
||||||
cookbook config_resource.template_cookbook
|
|
||||||
source config_resource.template_source
|
|
||||||
mode '0644'
|
|
||||||
owner config_resource.user
|
|
||||||
group config_resource.group
|
|
||||||
variables(
|
|
||||||
global_config: config_resource.global_config,
|
|
||||||
jobs: {},
|
|
||||||
rule_filenames: config_resource.rule_filenames
|
|
||||||
)
|
|
||||||
not_if { config_resource.allow_external_config }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :delete do
|
|
||||||
file new_resource.config_file do
|
|
||||||
action :delete
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
provides :prometheus_install
|
|
||||||
unified_mode true
|
|
||||||
|
|
||||||
use '_partial/_common'
|
|
||||||
use '_partial/_prometheus'
|
|
||||||
|
|
||||||
default_action :install
|
|
||||||
|
|
||||||
action_class do
|
|
||||||
include PrometheusCookbook::Helpers
|
|
||||||
end
|
|
||||||
|
|
||||||
action :install do
|
|
||||||
user new_resource.user do
|
|
||||||
system true
|
|
||||||
shell '/bin/false'
|
|
||||||
home new_resource.install_dir
|
|
||||||
not_if { new_resource.use_existing_user || new_resource.user == 'root' }
|
|
||||||
end
|
|
||||||
|
|
||||||
directory new_resource.install_dir do
|
|
||||||
owner new_resource.user
|
|
||||||
group new_resource.group
|
|
||||||
mode '0755'
|
|
||||||
recursive true
|
|
||||||
end
|
|
||||||
|
|
||||||
directory new_resource.log_dir do
|
|
||||||
owner new_resource.user
|
|
||||||
group new_resource.group
|
|
||||||
mode '0755'
|
|
||||||
recursive true
|
|
||||||
end
|
|
||||||
|
|
||||||
directory new_resource.storage_path do
|
|
||||||
owner new_resource.user
|
|
||||||
group new_resource.group
|
|
||||||
mode '0755'
|
|
||||||
recursive true
|
|
||||||
end
|
|
||||||
|
|
||||||
case new_resource.install_method
|
|
||||||
when 'binary'
|
|
||||||
package %w(tar bzip2)
|
|
||||||
|
|
||||||
ark install_dir_name(new_resource.install_dir) do
|
|
||||||
url new_resource.binary_url
|
|
||||||
checksum new_resource.checksum
|
|
||||||
version new_resource.version
|
|
||||||
prefix_root Chef::Config['file_cache_path']
|
|
||||||
path install_dir_parent(new_resource.install_dir)
|
|
||||||
owner new_resource.user
|
|
||||||
group new_resource.group
|
|
||||||
extension new_resource.file_extension unless new_resource.file_extension.empty?
|
|
||||||
action :put
|
|
||||||
end
|
|
||||||
when 'shell_binary'
|
|
||||||
package %w(tar bzip2)
|
|
||||||
|
|
||||||
remote_file "#{Chef::Config[:file_cache_path]}/prometheus-#{new_resource.version}.tar.gz" do
|
|
||||||
source new_resource.binary_url
|
|
||||||
checksum new_resource.checksum
|
|
||||||
action :create
|
|
||||||
notifies :run, 'execute[install_prometheus_archive]', :immediately
|
|
||||||
end
|
|
||||||
|
|
||||||
execute 'install_prometheus_archive' do
|
|
||||||
command "tar -xzf #{Chef::Config[:file_cache_path]}/prometheus-#{new_resource.version}.tar.gz -C #{new_resource.install_dir} --strip-components=1"
|
|
||||||
action :nothing
|
|
||||||
end
|
|
||||||
when 'source'
|
|
||||||
build_essential 'install compilation tools'
|
|
||||||
|
|
||||||
package %w(curl git-core mercurial gzip sed)
|
|
||||||
|
|
||||||
git "#{Chef::Config[:file_cache_path]}/prometheus-#{new_resource.version}" do
|
|
||||||
repository new_resource.source_repository
|
|
||||||
revision new_resource.source_revision
|
|
||||||
action :checkout
|
|
||||||
end
|
|
||||||
|
|
||||||
bash 'compile_prometheus_source' do
|
|
||||||
cwd "#{Chef::Config[:file_cache_path]}/prometheus-#{new_resource.version}"
|
|
||||||
environment(
|
|
||||||
'PATH' => "/usr/local/go/bin:#{ENV.fetch('PATH', nil)}",
|
|
||||||
'GOPATH' => '/opt/go:/opt/go/src/github.com/prometheus/promu/vendor'
|
|
||||||
)
|
|
||||||
code <<~EOH
|
|
||||||
make build
|
|
||||||
mv prometheus #{new_resource.install_dir}
|
|
||||||
cp -R console_libraries #{new_resource.install_dir}
|
|
||||||
cp -R consoles #{new_resource.install_dir}
|
|
||||||
EOH
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
provides :prometheus_job
|
|
||||||
unified_mode true
|
|
||||||
|
|
||||||
property :scrape_interval, String
|
|
||||||
property :scrape_timeout, String
|
|
||||||
property :labels, Hash
|
|
||||||
property :target, [Array, String], required: true
|
|
||||||
property :metrics_path, String, default: '/metrics'
|
|
||||||
property :config_file, String, default: '/opt/prometheus/prometheus.yml'
|
|
||||||
property :allow_external_config, [true, false], default: false
|
|
||||||
|
|
||||||
default_action :create
|
|
||||||
|
|
||||||
action :create do
|
|
||||||
job_resource = new_resource
|
|
||||||
|
|
||||||
with_run_context :root do
|
|
||||||
edit_resource(:template, job_resource.config_file) do
|
|
||||||
variables[:jobs] ||= {}
|
|
||||||
variables[:jobs][job_resource.name] ||= {}
|
|
||||||
variables[:jobs][job_resource.name]['scrape_interval'] = job_resource.scrape_interval
|
|
||||||
variables[:jobs][job_resource.name]['scrape_timeout'] = job_resource.scrape_timeout
|
|
||||||
variables[:jobs][job_resource.name]['target'] = job_resource.target
|
|
||||||
variables[:jobs][job_resource.name]['metrics_path'] = job_resource.metrics_path
|
|
||||||
variables[:jobs][job_resource.name]['labels'] = job_resource.labels
|
|
||||||
|
|
||||||
action :nothing
|
|
||||||
delayed_action :create
|
|
||||||
|
|
||||||
not_if { job_resource.allow_external_config }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :delete do
|
|
||||||
file new_resource.config_file do
|
|
||||||
action :delete
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
provides :prometheus_service
|
|
||||||
unified_mode true
|
|
||||||
|
|
||||||
use '_partial/_common'
|
|
||||||
use '_partial/_prometheus'
|
|
||||||
|
|
||||||
default_action :create
|
|
||||||
|
|
||||||
action_class do
|
|
||||||
include PrometheusCookbook::Helpers
|
|
||||||
end
|
|
||||||
|
|
||||||
action :create do
|
|
||||||
systemd_unit 'prometheus.service' do
|
|
||||||
content prometheus_unit_content(new_resource)
|
|
||||||
action [:create, :enable, :start]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :enable do
|
|
||||||
systemd_unit 'prometheus.service' do
|
|
||||||
action :enable
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :start do
|
|
||||||
systemd_unit 'prometheus.service' do
|
|
||||||
action :start
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :restart do
|
|
||||||
systemd_unit 'prometheus.service' do
|
|
||||||
action :restart
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :reload do
|
|
||||||
systemd_unit 'prometheus.service' do
|
|
||||||
action :reload
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :stop do
|
|
||||||
systemd_unit 'prometheus.service' do
|
|
||||||
action [:stop, :disable]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
action :delete do
|
|
||||||
systemd_unit 'prometheus.service' do
|
|
||||||
action [:stop, :disable, :delete]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
global:
|
|
||||||
# The smarthost and SMTP sender used for mail notifications.
|
|
||||||
smtp_smarthost: 'localhost:25'
|
|
||||||
smtp_from: 'alertmanager@example.org'
|
|
||||||
|
|
||||||
# The root route on which each incoming alert enters.
|
|
||||||
route:
|
|
||||||
# The root route must not have any matchers as it is the entry point for
|
|
||||||
# all alerts. It needs to have a receiver configured so alerts that do not
|
|
||||||
# match any of the sub-routes are sent to someone.
|
|
||||||
receiver: 'team-X-mails'
|
|
||||||
|
|
||||||
# The labels by which incoming alerts are grouped together. For example,
|
|
||||||
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
|
|
||||||
# be batched into a single group.
|
|
||||||
group_by: ['alertname', 'cluster']
|
|
||||||
|
|
||||||
# When a new group of alerts is created by an incoming alert, wait at
|
|
||||||
# least 'group_wait' to send the initial notification.
|
|
||||||
# This way ensures that you get multiple alerts for the same group that start
|
|
||||||
# firing shortly after another are batched together on the first
|
|
||||||
# notification.
|
|
||||||
group_wait: 30s
|
|
||||||
|
|
||||||
# When the first notification was sent, wait 'group_interval' to send a batch
|
|
||||||
# of new alerts that started firing for that group.
|
|
||||||
group_interval: 5m
|
|
||||||
|
|
||||||
# If an alert has successfully been sent, wait 'repeat_interval' to
|
|
||||||
# resend them.
|
|
||||||
repeat_interval: 3h
|
|
||||||
|
|
||||||
# All the above attributes are inherited by all child routes and can
|
|
||||||
# overwritten on each.
|
|
||||||
|
|
||||||
# The child route trees.
|
|
||||||
routes:
|
|
||||||
# This routes performs a regular expression match on alert labels to
|
|
||||||
# catch alerts that are related to a list of services.
|
|
||||||
- match_re:
|
|
||||||
service: ^(foo1|foo2|baz)$
|
|
||||||
receiver: team-X-mails
|
|
||||||
|
|
||||||
# The service has a sub-route for critical alerts, any alerts
|
|
||||||
# that do not match, i.e. severity != critical, fall-back to the
|
|
||||||
# parent node and are sent to 'team-X-mails'
|
|
||||||
routes:
|
|
||||||
- match:
|
|
||||||
severity: critical
|
|
||||||
receiver: team-X-pager
|
|
||||||
|
|
||||||
- match:
|
|
||||||
service: files
|
|
||||||
receiver: team-Y-mails
|
|
||||||
|
|
||||||
routes:
|
|
||||||
- match:
|
|
||||||
severity: critical
|
|
||||||
receiver: team-Y-pager
|
|
||||||
|
|
||||||
# This route handles all alerts coming from a database service. If there's
|
|
||||||
# no team to handle it, it defaults to the DB team.
|
|
||||||
- match:
|
|
||||||
service: database
|
|
||||||
|
|
||||||
receiver: team-DB-pager
|
|
||||||
# Also group alerts by affected database.
|
|
||||||
group_by: [alertname, cluster, database]
|
|
||||||
|
|
||||||
routes:
|
|
||||||
- match:
|
|
||||||
owner: team-X
|
|
||||||
receiver: team-X-pager
|
|
||||||
|
|
||||||
- match:
|
|
||||||
owner: team-Y
|
|
||||||
receiver: team-Y-pager
|
|
||||||
|
|
||||||
|
|
||||||
# Inhibition rules allow to mute a set of alerts given that another alert is
|
|
||||||
# firing.
|
|
||||||
# We use this to mute any warning-level notifications if the same alert is
|
|
||||||
# already critical.
|
|
||||||
inhibit_rules:
|
|
||||||
- source_match:
|
|
||||||
severity: 'critical'
|
|
||||||
target_match:
|
|
||||||
severity: 'warning'
|
|
||||||
# Apply inhibition if the alertname is the same.
|
|
||||||
equal: ['alertname']
|
|
||||||
|
|
||||||
|
|
||||||
receivers:
|
|
||||||
- name: 'team-X-mails'
|
|
||||||
email_configs:
|
|
||||||
- to: 'team-X+alerts@example.org'
|
|
||||||
|
|
||||||
- name: 'team-X-pager'
|
|
||||||
email_configs:
|
|
||||||
- to: 'team-X+alerts-critical@example.org'
|
|
||||||
pagerduty_configs:
|
|
||||||
- service_key: <team-X-key>
|
|
||||||
|
|
||||||
- name: 'team-Y-mails'
|
|
||||||
email_configs:
|
|
||||||
- to: 'team-Y+alerts@example.org'
|
|
||||||
|
|
||||||
- name: 'team-Y-pager'
|
|
||||||
pagerduty_configs:
|
|
||||||
- service_key: <team-Y-key>
|
|
||||||
|
|
||||||
- name: 'team-DB-pager'
|
|
||||||
pagerduty_configs:
|
|
||||||
- service_key: <team-DB-key>
|
|
||||||
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
# Global default settings.
|
|
||||||
global:
|
|
||||||
<% @global_config.each do |k,v| %>
|
|
||||||
<%=k%>: "<%=v%>"
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
scrape_configs:
|
|
||||||
<% @jobs.each do |name, job| %>
|
|
||||||
- job_name: "<%= name %>"
|
|
||||||
<% if job['scrape_interval'] %>
|
|
||||||
scrape_interval: "<%= job['scrape_interval'] %>"
|
|
||||||
<% end %>
|
|
||||||
<% if job['scrape_timeout'] %>
|
|
||||||
scrape_timeout: "<%= job['scrape_timeout'] %>"
|
|
||||||
<% end %>
|
|
||||||
metrics_path: "<%= job['metrics_path'] %>"
|
|
||||||
static_configs:
|
|
||||||
- targets: <%= Array(job['target']) %>
|
|
||||||
<%if job['labels'] %>
|
|
||||||
labels:
|
|
||||||
<% job['labels'].each do |label,label_config| %>
|
|
||||||
<%=label%>: <%=label_config%>
|
|
||||||
<%end%>
|
|
||||||
<%end%>
|
|
||||||
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if @rule_filenames %>
|
|
||||||
rule_files:
|
|
||||||
<% @rule_filenames.each do |filename| %>
|
|
||||||
- <%= filename %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"id": "sentry",
|
||||||
|
"launchpad_rpc_shared_secret": {
|
||||||
|
"encrypted_data": "Y8BFYM4YZjz/nv4zHEAkyheAVB18HdNi1KzvqJrRXXnnYI5bC8fVO9g=\n",
|
||||||
|
"iv": "1txuL+Uy+HIIs6CF\n",
|
||||||
|
"auth_tag": "aVHnUaVRo/xXeZRh0Z1pbw==\n",
|
||||||
|
"version": 3,
|
||||||
|
"cipher": "aes-256-gcm"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "kare",
|
"id": "kare",
|
||||||
"ssh_keys": [
|
"ssh_keys": [
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCw0I82gT8R4tpsqWGovLyjm2SR2F863MqNz224h3h/wl0xA5Eu0eRro+ELLv2hoebqQbcMsb89X5+7ObhDRar+b7tzDlXq4x+ECkAy6WbDSmBp3kNVd7muT4c9Zw7UxKsIvIm1ven1TkJ3UG80o6PyGiAUlBj4puIQwhp7OVknVutBBe8Rpp4f6BEuWluwpnPxc3KSaGhhr9p10xeX69cfspH40r8vHpI0zp19O5GpfYSOEH64UbwRpN2QypNB8ISmDHFsNGwdz0Ba4qrEOSGU9GveyOcsvEtt630/0fHqtbPBovOYu/FJISQZya2tofDig4EngBCJNfsPCbXFHtlp greg@karekinian.com"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE0mZjhqMeoA//SFg8i8XvXIaiUwXXjoCiBTloe7HPQH greg+2026@kosmos.org"
|
||||||
],
|
],
|
||||||
"groups": ["sysadmin", "systemd-journal"],
|
"groups": ["sysadmin", "systemd-journal"],
|
||||||
"shell": "\/bin\/bash"
|
"shell": "\/bin\/bash"
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
"garage-",
|
"garage-",
|
||||||
"lq-",
|
"lq-",
|
||||||
"rsk-",
|
"rsk-",
|
||||||
"postgres-6"
|
"postgres-11"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Submodule
+1
Submodule nodes added at 2535a79036
@@ -1,88 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "akkounts-1",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.144"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "akkounts-1",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-223-generic",
|
|
||||||
"hostname": "akkounts-1",
|
|
||||||
"ipaddress": "192.168.122.160",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"ldap_client",
|
|
||||||
"sentry_client",
|
|
||||||
"garage_gateway",
|
|
||||||
"akkounts",
|
|
||||||
"postgresql_client"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos-dirsrv::hostsfile",
|
|
||||||
"kosmos_sentry::client",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_postgresql::hostsfile",
|
|
||||||
"kosmos-akkounts",
|
|
||||||
"kosmos-akkounts::default",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default",
|
|
||||||
"redisio::default",
|
|
||||||
"redisio::_install_prereqs",
|
|
||||||
"redisio::install",
|
|
||||||
"redisio::ulimit",
|
|
||||||
"redisio::disable_os_default",
|
|
||||||
"redisio::configure",
|
|
||||||
"redisio::enable",
|
|
||||||
"kosmos-nodejs::default",
|
|
||||||
"nodejs::nodejs_from_package",
|
|
||||||
"nodejs::repo",
|
|
||||||
"nodejs::npm",
|
|
||||||
"nodejs::install"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.10.17",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.2.13",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[ldap_client]",
|
|
||||||
"role[sentry_client]",
|
|
||||||
"role[garage_gateway]",
|
|
||||||
"role[akkounts]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "bitcoin-2",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.163"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "bitcoin-2",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-216-generic",
|
|
||||||
"hostname": "bitcoin-2",
|
|
||||||
"ipaddress": "192.168.122.148",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"sentry_client",
|
|
||||||
"bitcoind",
|
|
||||||
"lnd",
|
|
||||||
"lndhub",
|
|
||||||
"postgresql_client",
|
|
||||||
"btcpay"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_sentry::client",
|
|
||||||
"tor-full",
|
|
||||||
"tor-full::default",
|
|
||||||
"kosmos-bitcoin::bitcoind",
|
|
||||||
"kosmos-bitcoin::lnd",
|
|
||||||
"kosmos-bitcoin::lnd-scb-s3",
|
|
||||||
"kosmos-bitcoin::rtl",
|
|
||||||
"kosmos-bitcoin::peerswap-lnd",
|
|
||||||
"kosmos_postgresql::hostsfile",
|
|
||||||
"kosmos-bitcoin::lndhub-go",
|
|
||||||
"kosmos-bitcoin::dotnet",
|
|
||||||
"kosmos-bitcoin::nbxplorer",
|
|
||||||
"kosmos-bitcoin::btcpay",
|
|
||||||
"kosmos-bitcoin::price_tracking",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"ark::default",
|
|
||||||
"kosmos-bitcoin::user",
|
|
||||||
"kosmos-bitcoin::blocksdir-mount",
|
|
||||||
"kosmos-bitcoin::firewall",
|
|
||||||
"git::default",
|
|
||||||
"git::package",
|
|
||||||
"kosmos-bitcoin::golang",
|
|
||||||
"golang::default",
|
|
||||||
"backup::default",
|
|
||||||
"logrotate::default",
|
|
||||||
"kosmos-bitcoin::aws-client",
|
|
||||||
"kosmos-nodejs::default",
|
|
||||||
"nodejs::nodejs_from_package",
|
|
||||||
"nodejs::repo",
|
|
||||||
"firewall::default",
|
|
||||||
"kosmos-nginx::default",
|
|
||||||
"nginx::default",
|
|
||||||
"nginx::package",
|
|
||||||
"nginx::ohai_plugin",
|
|
||||||
"nginx::repo",
|
|
||||||
"nginx::commons",
|
|
||||||
"nginx::commons_dir",
|
|
||||||
"nginx::commons_script",
|
|
||||||
"nginx::commons_conf",
|
|
||||||
"kosmos-nginx::firewall",
|
|
||||||
"kosmos-base::letsencrypt"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.2.7",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.4",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.4/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[sentry_client]",
|
|
||||||
"recipe[tor-full]",
|
|
||||||
"role[bitcoind]",
|
|
||||||
"role[lnd]",
|
|
||||||
"role[lndhub]",
|
|
||||||
"role[btcpay]",
|
|
||||||
"recipe[kosmos-bitcoin::price_tracking]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "discourse-2",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.35"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "discourse-2",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-1087-kvm",
|
|
||||||
"hostname": "discourse-2",
|
|
||||||
"ipaddress": "192.168.122.104",
|
|
||||||
"roles": [
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_gateway",
|
|
||||||
"kosmos_discourse"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos-dirsrv::hostsfile",
|
|
||||||
"kosmos_discourse",
|
|
||||||
"kosmos_discourse::default",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default",
|
|
||||||
"chef-sugar::default",
|
|
||||||
"discourse::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "17.9.52",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.9.52/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "17.9.0",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.9.0/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"recipe[kosmos-base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_gateway]",
|
|
||||||
"role[kosmos_discourse]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "draco.kosmos.org",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.167"
|
|
||||||
},
|
|
||||||
"kosmos_kvm": {
|
|
||||||
"backup": {
|
|
||||||
"schedule": "0/3:55"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"openresty": {
|
|
||||||
"listen_ip": "148.251.237.111",
|
|
||||||
"listen_ipv6": "2a01:4f8:202:804a::2",
|
|
||||||
"log_formats": {
|
|
||||||
"json": "{\"ip\":\"$remote_addr\",\"time\":\"$time_local\",\"host\":\"$host\",\"method\":\"$request_method\",\"uri\":\"$uri\",\"status\":$status,\"size\":$body_bytes_sent,\"referer\":\"$http_referer\",\"upstream_addr\":\"$upstream_addr\",\"upstream_response_time\":\"$upstream_response_time\",\"ua\":\"$http_user_agent\"}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "draco.kosmos.org",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-187-generic",
|
|
||||||
"hostname": "draco",
|
|
||||||
"ipaddress": "148.251.237.73",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_host",
|
|
||||||
"email_proxy",
|
|
||||||
"openresty_proxy",
|
|
||||||
"openresty",
|
|
||||||
"garage_gateway",
|
|
||||||
"tor_proxy"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::host",
|
|
||||||
"kosmos_kvm::backup",
|
|
||||||
"kosmos_email::firewall",
|
|
||||||
"kosmos_openresty",
|
|
||||||
"kosmos_openresty::default",
|
|
||||||
"kosmos_openresty::firewall",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_assets::nginx_site",
|
|
||||||
"kosmos_blossom::nginx",
|
|
||||||
"kosmos_discourse::nginx",
|
|
||||||
"kosmos_drone::nginx",
|
|
||||||
"kosmos_garage::nginx_web",
|
|
||||||
"kosmos_garage::nginx_s3",
|
|
||||||
"kosmos_gitea::nginx",
|
|
||||||
"kosmos_gitea::nginx_ssh",
|
|
||||||
"kosmos_liquor-cabinet::nginx",
|
|
||||||
"kosmos_rsk::nginx_testnet",
|
|
||||||
"kosmos_rsk::nginx_mainnet",
|
|
||||||
"kosmos_strfry::nginx",
|
|
||||||
"kosmos_website",
|
|
||||||
"kosmos_website::default",
|
|
||||||
"kosmos_website::redirects",
|
|
||||||
"kosmos-akkounts::nginx",
|
|
||||||
"kosmos-akkounts::nginx_api",
|
|
||||||
"kosmos-bitcoin::nginx_lndhub",
|
|
||||||
"kosmos-hubot::nginx_botka_irc-libera-chat",
|
|
||||||
"kosmos-hubot::nginx_hal8000_xmpp",
|
|
||||||
"kosmos-ipfs::nginx_public_gateway",
|
|
||||||
"kosmos-mastodon::nginx",
|
|
||||||
"remotestorage_discourse::nginx",
|
|
||||||
"kosmos-base::tor_services",
|
|
||||||
"tor-full",
|
|
||||||
"tor-full::default",
|
|
||||||
"kosmos_encfs",
|
|
||||||
"kosmos_encfs::default",
|
|
||||||
"kosmos-ejabberd::firewall",
|
|
||||||
"kosmos-ipfs::firewall_swarm",
|
|
||||||
"kosmos-bitcoin::firewall",
|
|
||||||
"kosmos_zerotier::firewall",
|
|
||||||
"sockethub::firewall",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"openresty::apt_package",
|
|
||||||
"openresty::ohai_plugin",
|
|
||||||
"openresty::commons_cleanup",
|
|
||||||
"openresty::commons_user",
|
|
||||||
"openresty::commons_dir",
|
|
||||||
"openresty::commons_script",
|
|
||||||
"openresty::commons_conf",
|
|
||||||
"logrotate::default",
|
|
||||||
"openresty::luarocks",
|
|
||||||
"firewall::default",
|
|
||||||
"git::default",
|
|
||||||
"git::package",
|
|
||||||
"kosmos-base::letsencrypt",
|
|
||||||
"fail2ban::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.10.17",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.2.13",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_host]",
|
|
||||||
"role[email_proxy]",
|
|
||||||
"role[openresty_proxy]",
|
|
||||||
"recipe[kosmos_encfs]",
|
|
||||||
"recipe[kosmos-ejabberd::firewall]",
|
|
||||||
"recipe[kosmos-ipfs::firewall_swarm]",
|
|
||||||
"recipe[kosmos-bitcoin::firewall]",
|
|
||||||
"recipe[kosmos_zerotier::firewall]",
|
|
||||||
"recipe[sockethub::firewall]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "drone-1",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.128"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "drone-1",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-1133-kvm",
|
|
||||||
"hostname": "drone-1",
|
|
||||||
"ipaddress": "192.168.122.200",
|
|
||||||
"roles": [
|
|
||||||
"kvm_guest",
|
|
||||||
"drone",
|
|
||||||
"postgresql_client"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_postgresql::hostsfile",
|
|
||||||
"kosmos_drone",
|
|
||||||
"kosmos_drone::default",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.7.10",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.7.10/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.2.5",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.5/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"recipe[kosmos-base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[drone]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "ejabberd-4",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.113"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "ejabberd-4",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-1073-kvm",
|
|
||||||
"hostname": "ejabberd-4",
|
|
||||||
"ipaddress": "192.168.122.39",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"ldap_client",
|
|
||||||
"ejabberd",
|
|
||||||
"postgresql_client",
|
|
||||||
"garage_gateway"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos-dirsrv::hostsfile",
|
|
||||||
"kosmos_postgresql::hostsfile",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos-ejabberd::letsencrypt",
|
|
||||||
"kosmos-ejabberd",
|
|
||||||
"kosmos-ejabberd::default",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default",
|
|
||||||
"kosmos-base::letsencrypt",
|
|
||||||
"kosmos-ejabberd::firewall"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.3.0",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.4",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.4/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[ldap_client]",
|
|
||||||
"role[ejabberd]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "ejabberd-8",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.123"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "ejabberd-8",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-1063-kvm",
|
|
||||||
"hostname": "ejabberd-8",
|
|
||||||
"ipaddress": "192.168.122.27",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"ldap_client",
|
|
||||||
"ejabberd",
|
|
||||||
"postgresql_client",
|
|
||||||
"garage_gateway"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos-dirsrv::hostsfile",
|
|
||||||
"kosmos_postgresql::hostsfile",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos-ejabberd::letsencrypt",
|
|
||||||
"kosmos-ejabberd",
|
|
||||||
"kosmos-ejabberd::default",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default",
|
|
||||||
"kosmos-base::letsencrypt",
|
|
||||||
"kosmos-ejabberd::firewall"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.3.0",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.4",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.4/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[ldap_client]",
|
|
||||||
"role[ejabberd]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "fornax.kosmos.org",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.147"
|
|
||||||
},
|
|
||||||
"kosmos_kvm": {
|
|
||||||
"backup": {
|
|
||||||
"schedule": "0/3:00"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "fornax.kosmos.org",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-88-generic",
|
|
||||||
"hostname": "fornax",
|
|
||||||
"ipaddress": "148.251.83.201",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_host",
|
|
||||||
"openresty_proxy",
|
|
||||||
"openresty",
|
|
||||||
"garage_gateway",
|
|
||||||
"tor_proxy",
|
|
||||||
"zerotier_controller",
|
|
||||||
"turn_server"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::host",
|
|
||||||
"kosmos_kvm::backup",
|
|
||||||
"kosmos_openresty",
|
|
||||||
"kosmos_openresty::default",
|
|
||||||
"kosmos_openresty::firewall",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_assets::nginx_site",
|
|
||||||
"kosmos_blossom::nginx",
|
|
||||||
"kosmos_discourse::nginx",
|
|
||||||
"kosmos_drone::nginx",
|
|
||||||
"kosmos_garage::nginx_web",
|
|
||||||
"kosmos_garage::nginx_s3",
|
|
||||||
"kosmos_gitea::nginx",
|
|
||||||
"kosmos_gitea::nginx_ssh",
|
|
||||||
"kosmos_liquor-cabinet::nginx",
|
|
||||||
"kosmos_rsk::nginx_testnet",
|
|
||||||
"kosmos_rsk::nginx_mainnet",
|
|
||||||
"kosmos_strfry::nginx",
|
|
||||||
"kosmos_website",
|
|
||||||
"kosmos_website::default",
|
|
||||||
"kosmos_website::redirects",
|
|
||||||
"kosmos-akkounts::nginx",
|
|
||||||
"kosmos-akkounts::nginx_api",
|
|
||||||
"kosmos-bitcoin::nginx_lndhub",
|
|
||||||
"kosmos-hubot::nginx_botka_irc-libera-chat",
|
|
||||||
"kosmos-hubot::nginx_hal8000_xmpp",
|
|
||||||
"kosmos-ipfs::nginx_public_gateway",
|
|
||||||
"kosmos-mastodon::nginx",
|
|
||||||
"remotestorage_discourse::nginx",
|
|
||||||
"kosmos-base::tor_services",
|
|
||||||
"tor-full",
|
|
||||||
"tor-full::default",
|
|
||||||
"kosmos_zerotier::controller",
|
|
||||||
"kosmos_zerotier::firewall",
|
|
||||||
"kosmos_zerotier::zncui",
|
|
||||||
"kosmos-ejabberd::coturn",
|
|
||||||
"kosmos-ejabberd::firewall",
|
|
||||||
"kosmos-ipfs::firewall_swarm",
|
|
||||||
"sockethub::firewall",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"openresty::apt_package",
|
|
||||||
"openresty::ohai_plugin",
|
|
||||||
"openresty::commons_cleanup",
|
|
||||||
"openresty::commons_user",
|
|
||||||
"openresty::commons_dir",
|
|
||||||
"openresty::commons_script",
|
|
||||||
"openresty::commons_conf",
|
|
||||||
"logrotate::default",
|
|
||||||
"openresty::luarocks",
|
|
||||||
"firewall::default",
|
|
||||||
"git::default",
|
|
||||||
"git::package",
|
|
||||||
"kosmos-base::letsencrypt",
|
|
||||||
"fail2ban::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.10.17",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.2.13",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_host]",
|
|
||||||
"role[openresty_proxy]",
|
|
||||||
"role[zerotier_controller]",
|
|
||||||
"role[turn_server]",
|
|
||||||
"recipe[kosmos-ejabberd::firewall]",
|
|
||||||
"recipe[kosmos-ipfs::firewall_swarm]",
|
|
||||||
"recipe[kosmos_zerotier::firewall]",
|
|
||||||
"recipe[sockethub::firewall]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-10",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.27"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-10",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-1090-kvm",
|
|
||||||
"hostname": "garage-10",
|
|
||||||
"ipaddress": "192.168.122.70",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.5.0",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.5.0/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.11",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.11/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-11",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.165"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-11",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.15.0-1059-kvm",
|
|
||||||
"hostname": "garage-11",
|
|
||||||
"ipaddress": "192.168.122.9",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "22.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.5.0",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.5.0/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.11",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.11/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-12",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.224"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-12",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.15.0-1059-kvm",
|
|
||||||
"hostname": "garage-12",
|
|
||||||
"ipaddress": "192.168.122.173",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "22.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.7.10",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.7.10/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.2.5",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.5/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-13",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.179"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-13",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.15.0-1059-kvm",
|
|
||||||
"hostname": "garage-13",
|
|
||||||
"ipaddress": "192.168.122.27",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "22.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.7.10",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.7.10/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.2.5",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.5/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-14",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.151"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-14",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.15.0-1095-kvm",
|
|
||||||
"hostname": "garage-14",
|
|
||||||
"ipaddress": "192.168.122.36",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "22.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.10.17",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.2.13",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-15",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.82"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-15",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.15.0-1095-kvm",
|
|
||||||
"hostname": "garage-15",
|
|
||||||
"ipaddress": "192.168.122.57",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "22.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.10.17",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.2.13",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-16",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.153"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-16",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "6.8.0-106-generic",
|
|
||||||
"hostname": "garage-16",
|
|
||||||
"ipaddress": "192.168.122.182",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "24.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.10.17",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.2.13",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-2",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.40"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-2",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-132-generic",
|
|
||||||
"hostname": "garage-2",
|
|
||||||
"ipaddress": "192.168.122.241",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.3.0",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.4",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.4/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-7",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.182"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-7",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-1090-kvm",
|
|
||||||
"hostname": "garage-7",
|
|
||||||
"ipaddress": "192.168.122.86",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.3.0",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.4",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.4/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-8",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.61"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-8",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-1090-kvm",
|
|
||||||
"hostname": "garage-8",
|
|
||||||
"ipaddress": "192.168.122.207",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.4.2",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.4.2/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.11",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.11/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "garage-9",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.223"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "garage-9",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-1090-kvm",
|
|
||||||
"hostname": "garage-9",
|
|
||||||
"ipaddress": "192.168.122.21",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"garage_node"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_garage::firewall_apis",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.5.0",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.5.0/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.11",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.11/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[garage_node]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "gitea-2",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.21"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "gitea-2",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.4.0-1123-kvm",
|
|
||||||
"hostname": "gitea-2",
|
|
||||||
"ipaddress": "192.168.122.189",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_guest",
|
|
||||||
"ldap_client",
|
|
||||||
"garage_gateway",
|
|
||||||
"gitea",
|
|
||||||
"postgresql_client",
|
|
||||||
"gitea_actions_runner"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::guest",
|
|
||||||
"kosmos-dirsrv::hostsfile",
|
|
||||||
"kosmos_garage",
|
|
||||||
"kosmos_garage::default",
|
|
||||||
"kosmos_garage::firewall_rpc",
|
|
||||||
"kosmos_postgresql::hostsfile",
|
|
||||||
"kosmos_gitea",
|
|
||||||
"kosmos_gitea::default",
|
|
||||||
"kosmos_gitea::backup",
|
|
||||||
"kosmos_gitea::runner",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::journald_conf",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default",
|
|
||||||
"firewall::default",
|
|
||||||
"backup::default",
|
|
||||||
"logrotate::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "20.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.2.7",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.2.7/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.4",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.4/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_guest]",
|
|
||||||
"role[ldap_client]",
|
|
||||||
"role[garage_gateway]",
|
|
||||||
"role[gitea]",
|
|
||||||
"role[gitea_actions_runner]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "her",
|
|
||||||
"chef_environment": "production",
|
|
||||||
"normal": {
|
|
||||||
"knife_zero": {
|
|
||||||
"host": "10.1.1.222"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"automatic": {
|
|
||||||
"fqdn": "her",
|
|
||||||
"os": "linux",
|
|
||||||
"os_version": "5.15.0-84-generic",
|
|
||||||
"hostname": "her",
|
|
||||||
"ipaddress": "192.168.30.172",
|
|
||||||
"roles": [
|
|
||||||
"base",
|
|
||||||
"kvm_host"
|
|
||||||
],
|
|
||||||
"recipes": [
|
|
||||||
"kosmos-base",
|
|
||||||
"kosmos-base::default",
|
|
||||||
"kosmos_kvm::host",
|
|
||||||
"kosmos_kvm::backup",
|
|
||||||
"apt::default",
|
|
||||||
"timezone_iii::default",
|
|
||||||
"timezone_iii::debian",
|
|
||||||
"ntp::default",
|
|
||||||
"ntp::apparmor",
|
|
||||||
"kosmos-base::systemd_emails",
|
|
||||||
"apt::unattended-upgrades",
|
|
||||||
"kosmos-base::firewall",
|
|
||||||
"kosmos-postfix::default",
|
|
||||||
"postfix::default",
|
|
||||||
"postfix::_common",
|
|
||||||
"postfix::_attributes",
|
|
||||||
"postfix::sasl_auth",
|
|
||||||
"hostname::default"
|
|
||||||
],
|
|
||||||
"platform": "ubuntu",
|
|
||||||
"platform_version": "22.04",
|
|
||||||
"cloud": null,
|
|
||||||
"chef_packages": {
|
|
||||||
"chef": {
|
|
||||||
"version": "18.3.0",
|
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib",
|
|
||||||
"chef_effortless": null
|
|
||||||
},
|
|
||||||
"ohai": {
|
|
||||||
"version": "18.1.4",
|
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.4/lib/ohai"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"run_list": [
|
|
||||||
"role[base]",
|
|
||||||
"role[kvm_host]"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user