Procházet zdrojové kódy

feat(Pol:gateway): Add the 'gateway' policy

Signed-off-by: Jeremy MAURO <jeremy.mauro@gmail.com>
Jeremy MAURO před 2 roky
rodič
revize
f34179fb71
2 změnil soubory, kde provedl 288 přidání a 0 odebrání
  1. 243 0
      gateway.lock.json
  2. 45 0
      gateway.rb

+ 243 - 0
gateway.lock.json

@@ -0,0 +1,243 @@
+{
+  "revision_id": "b8d124fae70fe17df864bece2add57515ac88261417b3e2e8b042280ac6ac6d6",
+  "name": "gateway",
+  "run_list": [
+    "recipe[gateway::default]"
+  ],
+  "named_run_lists": {
+    "complete": [
+      "recipe[resolver_config::_dokken]",
+      "recipe[gateway::default]"
+    ],
+    "git": [
+      "recipe[resolver_config::_dokken]",
+      "recipe[gateway::_git]"
+    ],
+    "apt": [
+      "recipe[resolver_config::_dokken]",
+      "recipe[apt_repositories::_official]"
+    ],
+    "packages": [
+      "recipe[resolver_config::_dokken]",
+      "recipe[apt_repositories::_official]",
+      "recipe[gateway::_packages]"
+    ]
+  },
+  "included_policy_locks": [
+
+  ],
+  "cookbook_locks": {
+    "apt_repositories": {
+      "version": "0.1.0",
+      "identifier": "7efcd8080dd0da05e241c934ff0ad902b797cdf7",
+      "dotted_decimal_identifier": "35743851843801306.1656147059998474.238605693341175",
+      "source": "cookbooks/apt_repositories",
+      "cache_key": null,
+      "scm_info": {
+        "scm": "git",
+        "remote": null,
+        "revision": "e0812c3deb0d8417d1c26b4e4bf75be2648e1fb1",
+        "working_tree_clean": false,
+        "published": false,
+        "synchronized_remote_branches": [
+
+        ]
+      },
+      "source_options": {
+        "path": "cookbooks/apt_repositories"
+      }
+    },
+    "ark": {
+      "version": "6.0.4",
+      "identifier": "dc2c6c730cb7a74869039cd07d9e2d9c80df6924",
+      "dotted_decimal_identifier": "61973339174647719.20381662559894942.50150200273188",
+      "cache_key": "ark-6.0.4-supermarket.chef.io",
+      "origin": "https://supermarket.chef.io:443/api/v1/cookbooks/ark/versions/6.0.4/download",
+      "source_options": {
+        "artifactserver": "https://supermarket.chef.io:443/api/v1/cookbooks/ark/versions/6.0.4/download",
+        "version": "6.0.4"
+      }
+    },
+    "etckeeper": {
+      "version": "1.0.5",
+      "identifier": "653d395ae3ffec2a31d0b6ba44b5b0613c3d3e03",
+      "dotted_decimal_identifier": "28496289195098092.11876721510466741.193931668962819",
+      "cache_key": "etckeeper-06692da3b4db493b6abd3c939857f1adab8a14c9",
+      "origin": "https://github.com/pioneerit/etckeeper-cookbook",
+      "source_options": {
+        "git": "https://github.com/pioneerit/etckeeper-cookbook",
+        "revision": "06692da3b4db493b6abd3c939857f1adab8a14c9"
+      }
+    },
+    "gateway": {
+      "version": "0.1.0",
+      "identifier": "e6e9686d94d60a1117487002c8c1f52fde9f8eee",
+      "dotted_decimal_identifier": "64995879367792138.4810674488395969.269585947266798",
+      "source": "cookbooks/gateway",
+      "cache_key": null,
+      "scm_info": {
+        "scm": "git",
+        "remote": null,
+        "revision": "e0812c3deb0d8417d1c26b4e4bf75be2648e1fb1",
+        "working_tree_clean": false,
+        "published": false,
+        "synchronized_remote_branches": [
+
+        ]
+      },
+      "source_options": {
+        "path": "cookbooks/gateway"
+      }
+    },
+    "git": {
+      "version": "11.0.1",
+      "identifier": "6ddc9b9256e8bc86e4b6aa2a2d5546f21adf7ac9",
+      "dotted_decimal_identifier": "30923333194672316.37969120069299541.78005646883529",
+      "cache_key": "git-c5aae848de2122b5ab8d9cb1e6ac50c6cac014b3",
+      "origin": "https://github.com/jmauro/git",
+      "source_options": {
+        "git": "https://github.com/jmauro/git",
+        "revision": "c5aae848de2122b5ab8d9cb1e6ac50c6cac014b3",
+        "branch": "config_file_scope"
+      }
+    },
+    "resolver": {
+      "version": "4.0.3",
+      "identifier": "b1dbb867c55732ab3b8c018eba2ad3bf769ace25",
+      "dotted_decimal_identifier": "50062655939237682.48197693525113386.232819282071077",
+      "cache_key": "resolver-4a815ef9db05a6d95f353f2b08a891737cad96b4",
+      "origin": "https://github.com/jmauro/resolver",
+      "source_options": {
+        "git": "https://github.com/jmauro/resolver",
+        "revision": "4a815ef9db05a6d95f353f2b08a891737cad96b4",
+        "branch": "atomic_update"
+      }
+    },
+    "resolver_config": {
+      "version": "0.1.0",
+      "identifier": "f8b725c6551d308c809e72c8579c603c7534d9c8",
+      "dotted_decimal_identifier": "70007167093382448.39547914758412188.105812780702152",
+      "source": "cookbooks/resolver_config",
+      "cache_key": null,
+      "scm_info": {
+        "scm": "git",
+        "remote": null,
+        "revision": "e0812c3deb0d8417d1c26b4e4bf75be2648e1fb1",
+        "working_tree_clean": false,
+        "published": false,
+        "synchronized_remote_branches": [
+
+        ]
+      },
+      "source_options": {
+        "path": "cookbooks/resolver_config"
+      }
+    },
+    "seven_zip": {
+      "version": "4.2.2",
+      "identifier": "a97443e4baa8bb56ef7aef7e085c8985fafa8423",
+      "dotted_decimal_identifier": "47697106013169851.24470159280179292.151208534377507",
+      "cache_key": "seven_zip-4.2.2-supermarket.chef.io",
+      "origin": "https://supermarket.chef.io:443/api/v1/cookbooks/seven_zip/versions/4.2.2/download",
+      "source_options": {
+        "artifactserver": "https://supermarket.chef.io:443/api/v1/cookbooks/seven_zip/versions/4.2.2/download",
+        "version": "4.2.2"
+      }
+    }
+  },
+  "default_attributes": {
+
+  },
+  "override_attributes": {
+
+  },
+  "solution_dependencies": {
+    "Policyfile": [
+      [
+        "apt_repositories",
+        "= 0.1.0"
+      ],
+      [
+        "ark",
+        "= 6.0.4"
+      ],
+      [
+        "etckeeper",
+        ">= 0.0.0"
+      ],
+      [
+        "gateway",
+        "= 0.1.0"
+      ],
+      [
+        "git",
+        ">= 0.0.0"
+      ],
+      [
+        "resolver",
+        ">= 0.0.0"
+      ],
+      [
+        "resolver_config",
+        "= 0.1.0"
+      ],
+      [
+        "seven_zip",
+        "= 4.2.2"
+      ]
+    ],
+    "dependencies": {
+      "apt_repositories (0.1.0)": [
+
+      ],
+      "ark (6.0.4)": [
+        [
+          "seven_zip",
+          ">= 3.1.0"
+        ]
+      ],
+      "etckeeper (1.0.5)": [
+        [
+          "git",
+          ">= 0.0.0"
+        ]
+      ],
+      "gateway (0.1.0)": [
+        [
+          "etckeeper",
+          ">= 0.0.0"
+        ],
+        [
+          "git",
+          ">= 0.0.0"
+        ],
+        [
+          "apt_repositories",
+          ">= 0.0.0"
+        ],
+        [
+          "resolver_config",
+          ">= 0.0.0"
+        ]
+      ],
+      "git (11.0.1)": [
+        [
+          "ark",
+          ">= 0.0.0"
+        ]
+      ],
+      "resolver (4.0.3)": [
+
+      ],
+      "resolver_config (0.1.0)": [
+        [
+          "resolver",
+          ">= 0.0.0"
+        ]
+      ],
+      "seven_zip (4.2.2)": [
+
+      ]
+    }
+  }
+}

+ 45 - 0
gateway.rb

@@ -0,0 +1,45 @@
+# Policyfile.rb - Describe how you want Chef Infra Client to build your system.
+#
+# For more information on the Policyfile feature, visit
+# https://docs.chef.io/policyfile/
+
+# A name that describes what the system you're building with Chef does.
+name 'gateway'
+
+# Where to find external cookbooks:
+default_source :supermarket
+default_source :chef_repo, './cookbooks' do |s|
+    s.preferred_for "gateway"
+end
+
+# run_list: chef-client will run these recipes in the order specified.
+run_list [
+  'gateway::default',
+]
+
+# Kitchen-test suite
+named_run_list :complete, [
+  'resolver_config::_dokken',
+] + run_list
+
+named_run_list :git, [
+  'resolver_config::_dokken',
+  'gateway::_git',
+]
+
+named_run_list :apt, [
+  'resolver_config::_dokken',
+  'apt_repositories::_official',
+]
+
+named_run_list :packages, @named_run_lists[:apt] + [
+  'gateway::_packages',
+]
+
+# Specify a custom source for a single cookbook:
+# cookbook 'example_cookbook', path: '../cookbooks/example_cookbook'
+cookbook 'etckeeper', git: 'https://github.com/pioneerit/etckeeper-cookbook'
+cookbook 'git', git: 'https://github.com/jmauro/git', branch: 'config_file_scope'
+cookbook 'resolver', git: 'https://github.com/jmauro/resolver', branch: 'atomic_update'
+
+# Global attributes