85 Commits

Author SHA1 Message Date
raucao 8d0c6bc301 Update backup ignorelist 2026-07-24 19:16:41 +02:00
raucao 80766f2473 Update nodes 2026-07-24 19:16:41 +02:00
raucao d9a59e064e Merge pull request 'Make create_vm work on all OS versions in use' (#653) from bugfix/create_vm into master
Reviewed-on: #653
Reviewed-by: Greg <greg@kosmos.org>
2026-07-24 17:14:44 +00:00
raucao 16cb333991 Merge branch 'master' into bugfix/create_vm 2026-07-24 15:27:28 +02:00
raucao 7386de86d7 Make create_vm work on all OS versions in use
Makes it work with the same cloudinit code on Ubuntu 20.04 by mounting
it from a custom ISO as CD-ROM
2026-07-24 15:19:59 +02:00
raucao 5ff6046169 Add new Redis node 2026-07-24 15:19:43 +02:00
raucao 093a98b753 Add new Redis node 2026-07-23 17:48:15 +02:00
raucao 7b76fc1579 Merge pull request 'Split user creation into separate base recipe; add script for mass-converging nodes' (#652) from chore/split_users_recipe into master
Reviewed-on: #652
2026-07-23 15:47:52 +00:00
raucao 527603bd63 Add script for mass-converging
E.g. just the new users recipe
2026-07-23 17:43:36 +02:00
greg 6bb23e70d6 Split users creation to its own recipe 2026-07-23 15:45:46 +02:00
raucao bd3e8d8c26 Merge pull request 'Replace my SSH key' (#651) from chore/greg_ssh_key into master
Reviewed-on: #651
2026-07-20 11:24:37 +00:00
greg b2aa902421 Replace my SSH key 2026-07-20 13:12:39 +02:00
raucao 3c740a0b92 Merge pull request 'Move node configs to submodule from private repo' (#650) from chore/nodes_submodule into master
Reviewed-on: #650
2026-07-13 15:24:26 +00:00
raucao 4e0131597f Re-add nodes as submodule from private repo 2026-07-13 17:20:16 +02:00
raucao 742ca590f2 Remove node configs 2026-07-13 17:19:07 +02:00
raucao 4ecfb8fc7f Merge pull request 'Add default tmux config with plugins, plus custom user configs' (#648) from feature/tmux into master
Reviewed-on: #648
Reviewed-by: Greg <greg@kosmos.org>
2026-07-13 15:14:04 +00:00
raucao 66481aa4c4 Merge pull request 'Upgrade Sentry to 26.6.0' (#649) from chore/upgrade_sentry into master
Reviewed-on: #649
Reviewed-by: Greg <greg@kosmos.org>
2026-07-13 15:08:14 +00:00
raucao 626662a7ff Merge pull request 'Add a recipe to install the zerotier ohai plugin' (#647) from feature/ohai_zerotier into master
Reviewed-on: #647
Reviewed-by: Râu Cao <raucao@kosmos.org>
2026-07-13 15:00:47 +00:00
greg f2e0a0929a Update garage-16 node file after Chef run 2026-07-13 16:59:19 +02:00
greg 12948be193 Do not manually save node data
It is not needed
2026-07-13 16:58:47 +02:00
greg df4f1236de Clean up white list attributes in client.rb
Both old and new styles. We define our allow list in the client.d file
2026-07-13 16:57:24 +02:00
raucao 875b23c746 Upgrade Sentry to 26.6.0 2026-07-13 16:00:05 +02:00
raucao b34c3ad20b Add default tmux config and plugins 2026-07-13 15:39:47 +02:00
greg db69e437d5 Remove sanitize node script and pre-commit hook
This is no longer needed with the properly set allowed attributes
2026-07-11 20:08:58 +02:00
greg 663c4da0a0 Update the prometheus-1 node after running Chef
It now contains the attributes from the ohai plugin
2026-07-11 17:35:04 +02:00
greg 010e2d0d64 Add zerotier ohai plugin to the base role 2026-07-11 17:34:39 +02:00
greg 065eac06b1 Add a recipe to install the zerotier ohai plugin
The attributes are saved as "automatic" attributes and look like this:

  "zerotier": {
    "version": "1.16.2",
    "node_id": "NODEID",
    "networks": {
      "NETWORKID": {
        "network_name": "networkname",
        "mac": "ff:ff:ff:ff:ff:ff",
        "status": "OK",
        "type": "PRIVATE",
        "interface": "abcdefg",
        "addresses": [
          "10.1.1.255/24"
        ]
      }
    }
  }

Refs #263
2026-07-11 17:29:31 +02:00
greg 1759af98b8 Simplify and improve chef attribute handling
Set the attributes in a Ruby file under /etc/chef/client.d/ instead of
editing /etc/chef/client.rb
Now uses the new whitelist attribute:
https://docs.chef.io/client/19/cookbooks/attributes/attribute_persistence/

Local chef config also uses the same file. That means there is no longer
a need to use the sanitize script to remove override and default
attributes from nodes.
2026-07-11 17:28:03 +02:00
raucao 736d4effa4 Upgrade RS discourse, increase service timeouts 2026-07-10 11:30:11 +02:00
raucao 1ebe0e4074 Merge pull request 'Update akkounts cookbook, deploy new akkounts VM' (#645) from chore/akkounts into master
Reviewed-on: #645
2026-07-10 09:29:44 +00:00
raucao 9250b2c726 Deploy new akkounts node, remove old one 2026-07-10 11:27:01 +02:00
raucao 6807b8f5bc Update akkounts cookbook, deploy new akkounts VM
* Fix: add missing directory resource
* New nodejs cookbook usage
* Remove Redis entirely (not using local Redis anymore)
2026-07-10 11:24:42 +02:00
raucao 0338e56d4c Merge pull request 'Upgrade nodejs cookbook from 7.3 to 11.0' (#644) from chore/upgrade_nodejs_cookbook into master
Reviewed-on: #644
2026-07-10 09:23:02 +00:00
raucao bd193567ca Upgrade nodejs cookbook from 7.3 to 11.0 2026-07-10 11:19:43 +02:00
raucao 86f7b68726 Merge pull request 'Set up Prometheus and Alertmanager' (#632) from feature/prometheus_cookbook into master
Reviewed-on: #632
2026-07-09 13:33:38 +00:00
greg 51af9c76e0 Fix node attribute 2026-07-09 15:30:38 +02:00
greg f15d5cb958 Move the alertmanager port to an attribute 2026-07-09 15:23:46 +02:00
greg ae14a1f353 Move the node_exporter port to an attribute 2026-07-09 15:18:06 +02:00
raucao b700baac37 Configure alerts for disk/filesystem usage, memory, CPU 2026-07-09 14:04:27 +02:00
raucao 6f93820936 Update node configs 2026-07-07 16:58:36 +02:00
raucao 9fca5386f3 Increase padding for NodeDown rule 2026-07-07 16:57:22 +02:00
raucao b6ba5ba679 Update node configs 2026-07-07 15:20:48 +02:00
raucao 4976888358 Remove unnecessary include 2026-07-07 15:20:33 +02:00
raucao e4ad52d413 Update dirsrv node configs 2026-07-07 15:05:25 +02:00
raucao 94a3c41964 Show severity for new alerts, number of firing vs resolved 2026-07-07 14:26:21 +02:00
raucao 704d0bca0e Document upgrading Chef client 2026-07-06 18:50:07 +02:00
raucao 02dc95b7de Update node configs 2026-07-06 18:47:51 +02:00
raucao 2a14837f64 WIP Add prometheus rules, improve alerts 2026-07-06 18:01:22 +02:00
raucao 1ae5210813 Send critical alerts via email (in addition to XMPP) 2026-07-06 14:52:17 +02:00
raucao 20f67d7261 Change prometheus scrape/eval intervals 2026-07-06 14:52:10 +02:00
raucao 4ce77e1a6e Fix postfix relay sending (on newer Ubuntu versions)
Requires relay restrictions to be configured explicitly
2026-07-06 14:50:49 +02:00
raucao 21513e6d10 Critical icon only for critical severity 2026-07-06 13:53:52 +02:00
raucao 33987402e3 Fix port attribute 2026-07-06 13:16:10 +02:00
raucao 81aae3d1bb Add icons to visualize alert severity 2026-07-06 12:38:07 +02:00
raucao 65c1933a99 WIP Add default alertmanager route and receiver 2026-07-06 12:38:07 +02:00
greg 5e7a0c07b0 Move web port to an attribute 2026-07-05 18:16:18 +02:00
greg 8601e33764 Fix year in license file 2026-07-05 18:03:12 +02:00
raucao c736468259 Merge branch 'master' into feature/prometheus_cookbook 2026-07-05 17:39:08 +02:00
raucao 6370069e9d Add new vm_host attribute/value to all VM nodes 2026-07-05 17:32:43 +02:00
raucao 0e9bcca72d Add vm_host label to prometheus targets 2026-07-05 17:32:14 +02:00
raucao c762dfe8c1 Merge pull request 'Sanitize node configs via script, and do it automatically in a Git hook' (#635) from dev/sanitize_node_configs into feature/prometheus_cookbook
Reviewed-on: #635
2026-07-05 15:26:30 +00:00
raucao 53cf95c4e7 Remove decommissioned nodes 2026-07-05 17:22:48 +02:00
raucao 959d506cfb Remove newline from all node files
Was actually added by manually editing the files, but Chef writes them
without newline, so our sanitization script also does it that way
2026-07-05 17:22:39 +02:00
raucao 8c71261fc9 Add pre-commit hook for sanitizing node configs 2026-07-05 17:22:34 +02:00
raucao 6c3da8a711 Add util script for sanitizing nodes
Deletes the "override" and "default" properties, which may contain
sensitive data
2026-07-05 17:22:26 +02:00
raucao 53de8ea119 Merge branch 'master' into feature/prometheus_cookbook 2026-07-05 17:20:48 +02:00
raucao 639800a838 Remove decommissioned node 2026-07-05 17:19:16 +02:00
raucao 1e2ff76797 Merge pull request 'Move allowed node attrs to config file, apply automatically' (#634) from dev/allowed_node_attrs into master
Reviewed-on: #634
2026-07-05 15:11:22 +00:00
raucao 301565b910 Move allowed node attrs to config file, apply automatically
This moves the whitelist for nodes' "normal" attributes to a config
file, which is loaded live during every run and applied in memory in
case the node's local file hasn't been updated before the client run.

Fixes allowed attributes being overwritten/removed in the node info
JSON files.
2026-07-05 17:07:56 +02:00
raucao 171db0fb7c Add altermanager section to prometheus config 2026-07-05 13:19:18 +02:00
raucao 821b56e6ab Set node name as prometheus instance name
And DRY up the recipe so it's easy and expressive to add more
metrics/targets
2026-07-05 12:41:46 +02:00
raucao e29d90d3d0 Use full domain as fqdn for leo 2026-07-05 12:40:50 +02:00
raucao f2ebda4a1a Update node configs 2026-07-04 16:30:15 +02:00
raucao 67f62ebd6c Scrape garage metrics 2026-07-04 16:14:36 +02:00
raucao 7dc4895da3 Remove old garage nodes 2026-07-04 15:51:39 +02:00
raucao 153b1e77c5 Add all nodes with base role as node exporter targets 2026-07-04 15:46:41 +02:00
raucao ea69c7cec6 Add prometheus node exporter to base role 2026-07-04 15:45:57 +02:00
raucao 5813a45987 Use base role instead of recipe in all runlists 2026-07-04 15:45:23 +02:00
raucao 63534e1cf5 Remove upstream prometheus cookbook, migrate to our own 2026-07-04 15:27:18 +02:00
raucao 2d835335b5 Re-add global config, change values 2026-07-04 14:15:55 +02:00
raucao e21797b402 Apply changed configs to prometheus and alertmanager 2026-07-04 14:15:38 +02:00
raucao 7396af5ca4 WIP Add node exporter 2026-07-04 14:15:33 +02:00
raucao df8c8d1742 Remove obsolete CLI option
Was left over from trying to overwrite the defaults before
2026-07-04 13:31:20 +02:00
raucao 3e6faf34c4 Use private IP for ejabber Tor proxy targets 2026-07-04 13:28:25 +02:00
raucao 13b61a3639 Remove node 2026-07-04 12:45:16 +02:00
161 changed files with 1995 additions and 5604 deletions
+2 -20
View File
@@ -8,25 +8,7 @@ data_bag_path "data_bags"
encrypted_data_bag_secret "#{current_dir}/encrypted_data_bag_secret"
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
# https://docs.chef.io/attribute_persistence/
knife[:normal_attribute_allowlist] = ['knife_zero', 'kosmos_kvm', 'kosmos-ejabberd', 'openresty']
knife[:allowed_normal_attributes] = ['knife_zero', 'kosmos_kvm', 'kosmos-ejabberd', 'openresty']
# Source of truth: site-cookbooks/kosmos-base/files/default/chef_attributes.rb
client_d_dir(File.expand_path("../site-cookbooks/kosmos-base/files/default/chef_attributes.rb"))
+3
View File
@@ -13,3 +13,6 @@
[submodule "site-cookbooks/blossom"]
path = site-cookbooks/blossom
url = git@gitea.kosmos.org:kosmos/blossom-cookbook.git
[submodule "nodes"]
path = nodes
url = git@gitea.kosmos.org:kosmos/chef-nodes.git
+1 -2
View File
@@ -31,7 +31,7 @@ cookbook 'java', '~> 4.3.0'
cookbook 'logrotate', '= 2.2.0'
cookbook 'mysql', '~> 8.7.3'
cookbook 'nginx', '= 9.0.0'
cookbook 'nodejs', '~> 7.3.1'
cookbook 'nodejs', '~> 11.0.1'
cookbook 'ntp', '= 3.4.0'
cookbook 'ohai', '~> 5.2.5'
cookbook 'openssl', '~> 8.5.5'
@@ -41,7 +41,6 @@ cookbook 'ulimit', '~> 1.0.0'
cookbook 'users', '~> 5.3.1'
cookbook 'zerotier', '~> 1.0.7'
cookbook 'unbound', '~> 3.0.2'
cookbook 'prometheus', '~> 1.0.0'
# openresty dependency
cookbook 'jemalloc', '~> 0.1.7'
+3 -5
View File
@@ -24,7 +24,7 @@ DEPENDENCIES
ref: nginx
mysql (~> 8.7.3)
nginx (= 9.0.0)
nodejs (~> 7.3.1)
nodejs (~> 11.0.1)
ntp (= 3.4.0)
ohai (~> 5.2.5)
openssl (~> 8.5.5)
@@ -33,7 +33,6 @@ DEPENDENCIES
git: https://gitea.kosmos.org/kosmos/postfix-cookbook.git
revision: dd6598572a775ae73f17527260ec8097b52d385b
ref: bugfix/
prometheus (~> 1.0.0)
redisio (~> 6.4.1)
ruby_build (~> 2.5.0)
timezone_iii (= 1.0.4)
@@ -87,17 +86,16 @@ GRAPH
build-essential (>= 5.0)
ohai (>= 4.1.0)
yum-epel (>= 0.0.0)
nodejs (7.3.3)
nodejs (11.0.1)
ark (>= 2.0.2)
chocolatey (>= 3.0)
yum (>= 7.2)
ntp (3.4.0)
ohai (5.2.5)
openssl (8.5.5)
php (8.0.1)
yum-epel (>= 0.0.0)
postfix (6.4.1)
prometheus (1.0.0)
ark (>= 0.0.0)
redisio (6.4.1)
selinux (>= 0.0.0)
ruby_build (2.5.0)
+4
View File
@@ -54,6 +54,10 @@ Clone this repository, `cd` into it, and run:
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
Cookbooks are managed via Berkshelf. Run `berks --help` for command help.
-4
View File
@@ -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"
}
+4
View File
@@ -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"
}
-4
View File
@@ -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"
}
-4
View File
@@ -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"
}
-4
View File
@@ -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"
}
-4
View File
@@ -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"
}
+4
View File
@@ -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"
}
+4
View File
@@ -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"
}
-4
View File
@@ -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"
}
-4
View File
@@ -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,7 +3,10 @@ config:
line-length: false # MD013
no-duplicate-heading: false # MD024
reference-links-images: false # MD052
ul-style:
style: asterisk
no-multiple-blanks:
maximum: 2
ignores:
- .github/copilot-instructions.md
- .windsurf/**
@@ -0,0 +1,3 @@
{
".": "11.0.1"
}
+261 -126
View File
@@ -1,221 +1,356 @@
# 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*
- Standardise files with files in sous-chefs/repo-management
* Standardise files with files in sous-chefs/repo-management
## 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*
- 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`
- Enable builds for opensuse-leap-15
- Add a library method test
* 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`
* Enable builds for opensuse-leap-15
* Add a library method test
## 7.3.0 (2020-10-21)
- Add rspec tests for the library methods
- 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.
- 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 auto_update option to the npm_package resource. Allows turning off auto_update of npm packages.
- Update testing
* Add rspec tests for the library methods
* 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.
* 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 auto_update option to the npm_package resource. Allows turning off auto_update of npm packages.
* Update testing
## 7.2.0 (2020-10-07)
- Verify the URI of installed packages to help determine if a good URI has been installed
- Add tests that verify npm-package installed packages
- Get the example test cookbook working
- Add support for installing node on windows
* Verify the URI of installed packages to help determine if a good URI has been installed
* Add tests that verify npm-package installed packages
* Get the example test cookbook working
* Add support for installing node on windows
## 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_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
- 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)
* 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/npm_from_source.rb:21:1 refactor: `ChefCorrectness/IncorrectLibraryInjection`
* 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)
* 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)
- Minor readme fix
* Minor readme fix
## 7.0.0 (2020-06-04)
- Require Chef Infra Client 14+ and remove the build-essential dependency
- Updated the default to Node.js v10.16.3
- Added compatibility with Chef Infra Client 16.2+
- Removed Foodcritic testing
- Updated ChefSpec and Kitchen platforms
- Resolved multiple minor cookstyle issues in the cookbook
- Added a vscode editor config
* Require Chef Infra Client 14+ and remove the build-essential dependency
* Updated the default to Node.js v10.16.3
* Added compatibility with Chef Infra Client 16.2+
* Removed Foodcritic testing
* Updated ChefSpec and Kitchen platforms
* Resolved multiple minor cookstyle issues in the cookbook
* Added a vscode editor config
## 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+
- Set default version to Node.js v8.12.0
* 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
## 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.
- compat_resource cookbook dependency has been removed and this cookbook instead requires Chef 12.14 or later
- Chef 13 compatibility has been resolved
- 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 source installation by using multipackage install for the dependencies
- Remove the broken url_valid? helper which didn't work
* 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
* Chef 13 compatibility has been resolved
* 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 source installation by using multipackage install for the dependencies
* Remove the broken url_valid? helper which didn't work
## 4.0.0 (2017-07-11)
- 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 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)
- Updated the default repository URLs to be the 6.X repos
- Added initial support for Suse and Amazon Linux
- Improved architecture detection to support aarch64
- Improved readme with examples for fetching your own binaries
- 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
- 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
- Switched to Delivery local mode for testing
- Added Integration testing in Travis CI with kitchen-dokken and ChefDK
* 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 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)
* Updated the default repository URLs to be the 6.X repos
* Added initial support for Suse and Amazon Linux
* Improved architecture detection to support aarch64
* Improved readme with examples for fetching your own binaries
* 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
* 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
* Switched to Delivery local mode for testing
* Added Integration testing in Travis CI with kitchen-dokken and ChefDK
## 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.
- 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
- Removed installation of apt-transport-https and instead rely on an apt cookbook that will do the same
- Fixed the ChefSpec matchers
- Added Scientific, Oracle, and Amazon as supported distros in the metadata
- Added chef_version metadata
- Removed conflicts and suggests metadata which aren't implemented or recommended for use
- Removed Chef 10 compatibility code
- Switched Integration testing to Inspec from bats
- Added the Apache 2.0 license file to the repo
- Expanded Test Kitchen testing
- Switched from Rubocop to Cookstyle and resolved all warnings
- Switched Travis to testing using ChefDK
* 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
* 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
* Fixed the ChefSpec matchers
* Added Scientific, Oracle, and Amazon as supported distros in the metadata
* Added chef_version metadata
* Removed conflicts and suggests metadata which aren't implemented or recommended for use
* Removed Chef 10 compatibility code
* Switched Integration testing to Inspec from bats
* Added the Apache 2.0 license file to the repo
* Expanded Test Kitchen testing
* Switched from Rubocop to Cookstyle and resolved all warnings
* Switched Travis to testing using ChefDK
## 2.4.4
- Use HTTPS prefix URLs for node download #98
- Update NPM symlink when installing from source #105
- Add support for NPM private modules #107
* Use HTTPS prefix URLs for node download #98
* Update NPM symlink when installing from source #105
* Add support for NPM private modules #107
## v2.4.2
- Fix check version
- Support iojs package install
* Fix check version
* Support iojs package install
## v2.4.0
- Move `npm_packages` to his own recipe
- Fix different race conditions when using direct recipe call
- Fix npm recipe
* Move `npm_packages` to his own recipe
* Fix different race conditions when using direct recipe call
* Fix npm recipe
## v2.3.2
- Fix package recipe
* Fix package recipe
## v2.3.0
- Support io.js. Use node['nodejs']['engine'].
- Add MacOS support via homebrew
* Support io.js. Use node['nodejs']['engine'].
* Add MacOS support via homebrew
## v2.2.0
- Add node['nodejs']['keyserver']
- Update arm checksum
- Fix `npm_packages` JSON
* Add node['nodejs']['keyserver']
* Update arm checksum
* Fix `npm_packages` JSON
## v2.1.0
- Use official nodesource repository
- Add node['nodejs']['npm_packages'] to install npm package with `default` recipe
* Use official nodesource repository
* Add node['nodejs']['npm_packages'] to install npm package with `default` recipe
## v2.0.0
- Travis integration
- Gems updated
- Rewrite cookbook dependencies
- Added complete test-kitchen integration : Rake, rubocop, foodcritic, vagrant, bats testing ...
- Added NodeJS `install_method` option (sources, bins or packages)
- Added NPM `install_method` option (sources or packages)
- NPM version can now be chosen independently from nodejs' embedded version
- Added a `nodejs_npm` LWRP to manage, install and resolve NPM packages
* Travis integration
* Gems updated
* Rewrite cookbook dependencies
* Added complete test-kitchen integration : Rake, rubocop, foodcritic, vagrant, bats testing ...
* Added NodeJS `install_method` option (sources, bins or packages)
* Added NPM `install_method` option (sources or packages)
* NPM version can now be chosen independently from nodejs' embedded version
* Added a `nodejs_npm` LWRP to manage, install and resolve NPM packages
## v1.3.0
- 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])
- Add Raspberry pi support ([@robertkowalski])
* 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])
* Add Raspberry pi support ([@robertkowalski])
## v1.2.0
- implement installation from package on RedHat - ([@vaskas])
* implement installation from package on RedHat - ([@vaskas])
## 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
- 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
* 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
## v1.1.1
- update default versions to the latest: node - v0.10.0 and npm - v1.2.14
- `make_thread` is now a real attribute - ([@ChrisLundquist])
* update default versions to the latest: node - v0.10.0 and npm - v1.2.14
* `make_thread` is now a real attribute - ([@ChrisLundquist])
## v1.1.0
- 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).
* 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).
## v1.0.4
- add support for binary installation method ([@JulesAU])
* add support for binary installation method ([@JulesAU])
## v1.0.3
- 7.3.1 - *2020-12-31*
* 7.3.1 - *2020-12-31*
## v1.0.2
- add smartos support for package install ([@sax])
- support to compile with all processors available (default 2 if unknown) - ([@ChrisLundquist])
- moved to `platform_family` syntax
- ensure npm recipe honours the 'source' or 'package' setting - ([@markbirbeck])
- updated the default versions to the latest stable node/npm
* add smartos support for package install ([@sax])
* support to compile with all processors available (default 2 if unknown) - ([@ChrisLundquist])
* moved to `platform_family` syntax
* ensure npm recipe honours the 'source' or 'package' setting - ([@markbirbeck])
* updated the default versions to the latest stable node/npm
## v1.0.1
- 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
* 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
## v1.0.0
- added packages installation support ([@smith])
* added packages installation support ([@smith])
[@bakins]: https://github.com/bakins
[@chrislundquist]: https://github.com/ChrisLundquist
[@gmccue]: https://github.com/gmccue
[@johannesbecker]: https://github.com/johannesbecker
[@julesau]: https://github.com/JulesAU
[@markbirbeck]: https://github.com/markbirbeck
[@predominant]: https://github.com/predominant
[@robertkowalski]: https://github.com/robertkowalski
[@sax]: https://github.com/sax
[@sjlu]: https://github.com/sjlu
[@smith]: https://github.com/smith
[@vaskas]: https://github.com/vaskas
[@wanelo-pair]: https://github.com/wanelo-pair
[@bakins]: <https://github.com/bakins>
[@chrislundquist]: <https://github.com/ChrisLundquist>
[@johannesbecker]: <https://github.com/johannesbecker>
[@julesau]: <https://github.com/JulesAU>
[@markbirbeck]: <https://github.com/markbirbeck>
[@robertkowalski]: <https://github.com/robertkowalski>
[@sax]: <https://github.com/sax>
[@smith]: <https://github.com/smith>
[@vaskas]: <https://github.com/vaskas>
[@wanelo-pair]: <https://github.com/wanelo-pair>
+69
View File
@@ -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.
+16
View File
@@ -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
View File
@@ -1,220 +1,109 @@
# [nodejs-cookbook](https://github.com/redguide/nodejs)
[![CK Version](http://img.shields.io/cookbook/v/nodejs.svg?branch=master)](https://supermarket.chef.io/cookbooks/nodejs) [![Build Status](https://img.shields.io/travis/redguide/nodejs.svg)](https://travis-ci.org/redguide/nodejs)
[![Cookbook Version](https://img.shields.io/cookbook/v/nodejs.svg)](https://supermarket.chef.io/cookbooks/nodejs)
[![CI State](https://github.com/sous-chefs/nodejs/workflows/ci/badge.svg)](https://github.com/sous-chefs/nodejs/actions?query=workflow%3Aci)
[![OpenCollective](https://opencollective.com/sous-chefs/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/sous-chefs/sponsors/badge.svg)](#sponsors)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](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 youd 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
### Platforms
- Debian/Ubuntu
- RHEL/CentOS/Scientific/Amazon/Oracle
- openSUSE
- Windows
Note: Source installs require GCC 4.8+, which is not included on older distro releases
* Debian/Ubuntu
* RHEL family/Fedora/Amazon Linux
* macOS where platform packages are available
* Windows through Chocolatey
### Chef
- Chef Infra Client 14+
* Chef Infra Client 15.3+
### Cookbooks
- ark
* ark
* chocolatey
## 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
include_recipe "nodejs"
nodejs_install 'nodejs'
```
### Install methods
#### Package
Install node from packages:
```ruby
node['nodejs']['install_method'] = 'package' # Not necessary because it's the default
include_recipe "nodejs"
# Or
include_recipe "nodejs::nodejs_from_package"
nodejs_install 'nodejs' do
install_method 'package'
version '24.15.0'
```
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`.
#### Binary
Install node from official prebuilt binaries:
Install Node.js from official prebuilt binaries:
```ruby
node['nodejs']['install_method'] = 'binary'
include_recipe "nodejs"
# 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'
nodejs_install 'nodejs' do
install_method 'binary'
```
#### Source
Install node from sources:
Install Node.js from source:
```ruby
node['nodejs']['install_method'] = 'source'
include_recipe "nodejs"
# Or
include_recipe "nodejs::nodejs_from_source"
nodejs_install 'nodejs' do
install_method 'source'
end
```
#### Chocolatey
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
Install npm packages:
```ruby
npm_package 'express'
npm_package 'async' do
version '0.6.2'
end
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"
}
nodejs_npm_packages 'application packages' do
packages [
{ name: 'socket.io', version: '4.8.1' },
]
}
end
```
## License & Authors
See [migration.md](migration.md) for the breaking recipe/attribute migration guide.
**Author:** Marius Ducea (marius@promethost.com)
**Author:** Nathan L Smith (nlloyds@gmail.com)
**Author:** Guilhem Lettron (guilhem@lettron.fr)
**Author:** Barthelemy Vessemont (bvessemont@gmail.com)
## Resources
**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)
```
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
## Contributors
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
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.
```
### Backers
Thank you to all our backers!
![<https://opencollective.com/sous-chefs#backers](https://opencollective.com/sous-chefs/backers.svg?width=600&avatarHeight=40>)
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
![<https://opencollective.com/sous-chefs/sponsor/0/website](https://opencollective.com/sous-chefs/sponsor/0/avatar.svg?avatarHeight=100>)
![<https://opencollective.com/sous-chefs/sponsor/1/website](https://opencollective.com/sous-chefs/sponsor/1/avatar.svg?avatarHeight=100>)
![<https://opencollective.com/sous-chefs/sponsor/2/website](https://opencollective.com/sous-chefs/sponsor/2/avatar.svg?avatarHeight=100>)
![<https://opencollective.com/sous-chefs/sponsor/3/website](https://opencollective.com/sous-chefs/sponsor/3/avatar.svg?avatarHeight=100>)
![<https://opencollective.com/sous-chefs/sponsor/4/website](https://opencollective.com/sous-chefs/sponsor/4/avatar.svg?avatarHeight=100>)
![<https://opencollective.com/sous-chefs/sponsor/5/website](https://opencollective.com/sous-chefs/sponsor/5/avatar.svg?avatarHeight=100>)
![<https://opencollective.com/sous-chefs/sponsor/6/website](https://opencollective.com/sous-chefs/sponsor/6/avatar.svg?avatarHeight=100>)
![<https://opencollective.com/sous-chefs/sponsor/7/website](https://opencollective.com/sous-chefs/sponsor/7/avatar.svg?avatarHeight=100>)
![<https://opencollective.com/sous-chefs/sponsor/8/website](https://opencollective.com/sous-chefs/sponsor/8/avatar.svg?avatarHeight=100>)
![<https://opencollective.com/sous-chefs/sponsor/9/website](https://opencollective.com/sous-chefs/sponsor/9/avatar.svg?avatarHeight=100>)
-44
View File
@@ -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
-2
View File
@@ -1,2 +0,0 @@
default['nodejs']['npm']['install_method'] = 'embedded'
default['nodejs']['npm']['version'] = 'latest'
-15
View File
@@ -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: '' }
-12
View File
@@ -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
+3 -6
View File
@@ -61,7 +61,7 @@ Dangerfile
examples/*
features/*
Guardfile
kitchen.yml*
kitchen*.yml
mlc_config.json
Procfile
Rakefile
@@ -83,10 +83,8 @@ test/*
*/.hg/*
*/.svn/*
# Berkshelf #
#############
Berksfile
Berksfile.lock
# Dependency cache #
####################
cookbooks/*
tmp
@@ -98,7 +96,6 @@ Gemfile.lock
# Policyfile #
##############
Policyfile.rb
Policyfile.lock.json
# Documentation #
-88
View File
@@ -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
+88 -13
View File
@@ -1,19 +1,96 @@
# frozen_string_literal: true
module NodeJs
module Helper
def npm_dist
if node['nodejs']['npm']['url']
{ 'url' => node['nodejs']['npm']['url'] }
def default_install_method
case node['platform_family']
when 'debian', 'rhel', 'fedora', 'amazon', 'mac_os_x', 'suse'
'package'
when 'windows'
'chocolatey'
else
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
'source'
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 = {})
require 'json'
cmd = if path
@@ -47,9 +124,7 @@ module NodeJs
(version ? list[package]['version'] == version : true)
end
def npm_package_installed?(package, version = nil, path = nil, npm_token = nil)
environment = { 'NPM_TOKEN' => npm_token } if npm_token
def npm_package_installed?(package, version = nil, path = nil, environment = {})
list = npm_list(package, path, environment)['dependencies']
# Return true if package installed and installed to good version
# see if we really want to add the url check
+18 -18
View File
@@ -1,27 +1,27 @@
{
"name": "nodejs",
"description": "Installs/Configures node.js",
"description": "Provides resources for installing Node.js and managing npm packages",
"long_description": "",
"maintainer": "redguide",
"maintainer_email": "guilhem@lettron.fr",
"maintainer": "Sous Chefs",
"maintainer_email": "help@sous-chefs.org",
"license": "Apache-2.0",
"platforms": {
"debian": ">= 0.0.0",
"ubuntu": ">= 0.0.0",
"centos": ">= 0.0.0",
"redhat": ">= 0.0.0",
"scientific": ">= 0.0.0",
"oracle": ">= 0.0.0",
"amazon": ">= 0.0.0",
"smartos": ">= 0.0.0",
"almalinux": ">= 8.0",
"amazon": ">= 2023.0",
"centos_stream": ">= 9.0",
"debian": ">= 12.0",
"fedora": ">= 0.0.0",
"mac_os_x": ">= 0.0.0",
"opensuseleap": ">= 0.0.0",
"suse": ">= 0.0.0",
"oracle": ">= 8.0",
"redhat": ">= 8.0",
"rocky": ">= 8.0",
"ubuntu": ">= 22.04",
"windows": ">= 0.0.0"
},
"dependencies": {
"ark": ">= 2.0.2",
"chocolatey": ">= 3.0"
"chocolatey": ">= 3.0",
"yum": ">= 7.2"
},
"providing": {
@@ -29,13 +29,13 @@
"recipes": {
},
"version": "7.3.3",
"source_url": "https://github.com/redguide/nodejs",
"issues_url": "https://github.com/redguide/nodejs/issues",
"version": "11.0.1",
"source_url": "https://github.com/sous-chefs/nodejs",
"issues_url": "https://github.com/sous-chefs/nodejs/issues",
"privacy": false,
"chef_versions": [
[
">= 14"
">= 15.3"
]
],
"ohai_versions": [
+24 -13
View File
@@ -1,16 +1,27 @@
name 'nodejs'
maintainer 'redguide'
maintainer_email 'guilhem@lettron.fr'
license 'Apache-2.0'
description 'Installs/Configures node.js'
source_url 'https://github.com/redguide/nodejs'
issues_url 'https://github.com/redguide/nodejs/issues'
chef_version '>= 14'
version '7.3.3'
# frozen_string_literal: true
name 'nodejs'
maintainer 'Sous Chefs'
maintainer_email 'help@sous-chefs.org'
license 'Apache-2.0'
description 'Provides resources for installing Node.js and managing npm packages'
version '11.0.1'
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 'chocolatey', '>= 3.0'
%w(debian ubuntu centos redhat scientific oracle amazon smartos mac_os_x opensuseleap suse windows).each do |os|
supports os
end
depends 'yum', '>= 7.2'
+52
View File
@@ -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.
-23
View File
@@ -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']
-21
View File
@@ -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
View File
@@ -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.')
-21
View File
@@ -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
-28
View File
@@ -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
-13
View File
@@ -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
-19
View File
@@ -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,7 +1,7 @@
{
"packages": {
".": {
"package-name": "prometheus",
"package-name": "nodejs",
"changelog-path": "CHANGELOG.md",
"release-type": "ruby",
"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
+29 -31
View File
@@ -1,28 +1,8 @@
#
# 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.
#
# frozen_string_literal: true
resource_name :npm_package
provides :npm_package
unified_mode true
# backwards compatibility for the old resource name
provides :nodejs_npm
property :package, String, name_property: true
@@ -30,7 +10,7 @@ property :version, String
property :path, String
property :url, String
property :json, [String, true, false]
property :npm_token, String
property :npm_token, String, sensitive: true
property :options, Array, default: []
property :user, String
property :group, String
@@ -38,10 +18,7 @@ property :live_stream, [false, true], default: false
property :node_env, String
property :auto_update, [true, false], default: true
def initialize(*args)
super
@run_context.include_recipe 'nodejs::npm' if node['nodejs']['manage_node']
end
default_action :install
action :install do
execute "install NPM package #{new_resource.package}" do
@@ -51,7 +28,8 @@ action :install do
group new_resource.group
environment npm_env_vars
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
@@ -63,6 +41,20 @@ action :uninstall do
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? }
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? }
end
end
@@ -75,13 +67,19 @@ action_class do
env_vars['HOME'] = ::Dir.home(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['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
end
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
def no_auto_update?
@@ -89,7 +87,7 @@ action_class do
end
def npm_options
options = ''
options = +''
options << ' -global' unless new_resource.path
new_resource.options.each do |option|
options << " #{option}"
-8
View File
@@ -1,8 +0,0 @@
ruby:
config_file: .rubocop.yml
java_script:
enabled: false
scss:
enabled: false
@@ -1,3 +0,0 @@
{
".": "1.0.0"
}
-104
View File
@@ -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
-201
View File
@@ -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.
-36
View File
@@ -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.
-67
View File
@@ -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
-10
View File
@@ -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
-115
View File
@@ -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
-78
View File
@@ -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
-44
View File
@@ -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
}
-23
View File
@@ -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'
-36
View File
@@ -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
-44
View File
@@ -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
-98
View File
@@ -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
-41
View File
@@ -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
-56
View File
@@ -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 %>
+10
View File
@@ -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 -1
View File
@@ -1,7 +1,7 @@
{
"id": "kare",
"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"],
"shell": "\/bin\/bash"
+1 -1
View File
@@ -81,7 +81,7 @@
"garage-",
"lq-",
"rsk-",
"postgres-6"
"postgres-11"
]
}
},
Submodule
+1
Submodule nodes added at 2535a79036
-88
View File
@@ -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]"
]
}
-110
View File
@@ -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]"
]
}
-69
View File
@@ -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]"
]
}
-138
View File
@@ -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]"
]
}
-62
View File
@@ -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]"
]
}
-75
View File
@@ -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]"
]
}
-75
View File
@@ -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]"
]
}
-130
View File
@@ -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]"
]
}
-64
View File
@@ -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]"
]
}
-64
View File
@@ -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]"
]
}
-65
View File
@@ -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]"
]
}
-65
View File
@@ -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]"
]
}
-65
View File
@@ -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]"
]
}
-65
View File
@@ -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]"
]
}
-63
View File
@@ -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]"
]
}
-64
View File
@@ -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]"
]
}
-64
View File
@@ -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]"
]
}
-64
View File
@@ -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]"
]
}
-64
View File
@@ -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]"
]
}
-79
View File
@@ -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]"
]
}
-58
View File
@@ -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