OSDN Git Service

add .envrc
[metasearch/grid-chef-repo.git] / roles / grid-gpm.rb
index 1bb18a5..fcb787c 100644 (file)
@@ -24,6 +24,7 @@ description 'Grid provisioning master node'
 run_list(
   'role[node_commons]',
   'role[ganglia-gmond]',
+  'role[berkshelf-api-server]',
 )
 
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
@@ -50,6 +51,41 @@ default_attributes(
 )
 
 override_attributes(
+  'berkshelf_api' => {
+    'host' => "gpm00.#{Grid::DOMAIN}",
+    'proxy_port' => 6280,
+    'app_host' => '127.0.0.1',
+    'port' => 26200,
+    'proxy' => {
+      'ssl' => true,
+      'ssl_certificate'     => '/etc/pki/tls/certs/01gpm00_server.crt',
+      'ssl_certificate_key' => '/etc/pki/tls/private/01gpm00_server.key',
+    }, 
+    'config' => {
+      'build_interval' => 180.0,
+      'endpoints' => [
+        {
+          'type' => 'chef_server',
+          'options' => {
+            'url' => 'https://api.opscode.com/organizations/gridverse',  # hosted chef
+            'client_key' => '/etc/berkshelf/api-server/gridverse-berkshelf.pem',
+            'client_name' => 'berkshelf',
+            'ssl_verify' => true
+          }
+        },
+        {
+          'type' => 'chef_server',
+          'options' => {
+            #'url' => 'https://gpm00.grid.example.com/organizations/grid',  # chef12
+            'url' => 'https://gpm00.grid.example.com',  # chef11
+            'client_key' => '/etc/berkshelf/api-server/grid-berkshelf.pem',
+            'client_name' => 'berkshelf',
+            'ssl_verify' => false
+          }
+        },
+      ],
+    },
+  },
   'ganglia' => {
     # gmond
     'cluster' => {