OSDN Git Service

add screwdriver override roles.
authorwhitestar <whitestar@users.osdn.me>
Tue, 14 Aug 2018 13:35:55 +0000 (22:35 +0900)
committerwhitestar <whitestar@users.osdn.me>
Tue, 14 Aug 2018 13:35:55 +0000 (22:35 +0900)
nodes/local-screwdriver-all-on-docker.json
nodes/local-screwdriver-on-docker.json
roles/screwdriver-all-on-docker-override.rb [new file with mode: 0644]
roles/screwdriver-on-docker-override.rb [new file with mode: 0644]

index 7e68481..274b089 100644 (file)
@@ -1,5 +1,5 @@
 {
   "run_list": [
-    "role[screwdriver-all-on-docker]"
+    "role[screwdriver-all-on-docker-override]"
   ]
 }
index 356c762..1881a91 100644 (file)
@@ -1,5 +1,5 @@
 {
   "run_list": [
-    "role[screwdriver-on-docker]"
+    "role[screwdriver-on-docker-override]"
   ]
 }
diff --git a/roles/screwdriver-all-on-docker-override.rb b/roles/screwdriver-all-on-docker-override.rb
new file mode 100644 (file)
index 0000000..e19942b
--- /dev/null
@@ -0,0 +1,97 @@
+#
+# Copyright 2018, whitestar
+#
+# 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.
+#
+
+name 'screwdriver-all-on-docker-override'
+description 'Screwdriver with all components on Docker (customized)'
+
+# Default ports
+#ui_port     = '9000'
+#api_port    = '9001'
+#store_port  = '9002'
+
+run_list(
+  'role[screwdriver-all-on-docker]',
+)
+
+override_attributes(
+  'docker-grid' => {
+    'engine' => {
+      #'skip_setup' => true,  # default: false
+    },
+    'compose' => {
+      #'skip_setup' => true,  # default: false
+    },
+  },
+  'screwdriver' => {
+    'api' => {
+      'config' => {
+        'scms' => {
+          # **REQUIRED**: SCM settings
+          'github.com' => {  # id and display name
+            'plugin' => 'github',
+            'config' => {
+              # These 3 secrets should be set by the following `['screwdriver']['api']['scms_vault_items']` attribute.
+              'oauthClientId' => 'YOU-PROBABLY-WANT-SOMETHING-HERE',  # The client id used for OAuth with github. GitHub OAuth (https://developer.github.com/v3/oauth/)
+              'oauthClientSecret' => 'AGAIN-SOMETHING-HERE-IS-USEFUL',  # The client secret used for OAuth with github
+              'secret' => 'SUPER-SECRET-SIGNING-THING',  # Secret to add to GitHub webhooks so that we can validate them
+              #'gheHost' => 'github.screwdriver.cd',  # [Optional] GitHub enterprise host
+              'username' => 'sd-buildbot',  # [Optional] Username for code checkout
+              'email' => 'dev-null@screwdriver.cd',  # [Optional] Email for code checkout
+              'privateRepo' => false,  # [Optional] Set to true to support private repo; will need read and write access to public and private repos (https://developer.github.com/v3/oauth/#scopes)
+            },
+          },
+        },
+      },
+    },
+    'docker-compose' => {
+      'config' => {
+        'services' => {
+          'api' => {
+            'ports' => [
+              #"#{api_port}:80",
+            ],
+            'environment' => {
+              #'NODE_TLS_REJECT_UNAUTHORIZED' => '0',  # for self-signed cetificates
+              # The following variables will be set by the screwdriver::docker-compose recipe automatically.
+              #'ECOSYSTEM_UI' => "http://#{node['fqdn']}:#{ui_port}",
+              #'ECOSYSTEM_STORE' => "http://#{node['fqdn']}:#{store_port}",
+              #'DATASTORE_SEQUELIZE_DIALECT' => 'mysql',  # or 'postgres'
+            },
+          },
+          'ui' => {
+            'ports' => [
+              #"#{ui_port}:80",
+            ],
+            'environment' => {
+              # These variables will be set by the screwdriver::docker-compose recipe automatically.
+              #'ECOSYSTEM_API' => "http://#{node['fqdn']}:#{api_port}",
+              #'ECOSYSTEM_STORE' => "http://#{node['fqdn']}:#{store_port}",
+            },
+          },
+          'store' => {
+            'ports' => [
+              #"#{store_port}:80",
+            ],
+            'environment' => {
+              # This variable will be set by the screwdriver::docker-compose recipe automatically.
+              #'ECOSYSTEM_UI' => "http://#{node['fqdn']}:#{ui_port}",
+            },
+          },
+        },
+      },
+    },
+  },
+)
diff --git a/roles/screwdriver-on-docker-override.rb b/roles/screwdriver-on-docker-override.rb
new file mode 100644 (file)
index 0000000..035692e
--- /dev/null
@@ -0,0 +1,96 @@
+#
+# Copyright 2017, whitestar
+#
+# 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.
+#
+
+name 'screwdriver-on-docker-override'
+description 'Screwdriver on Docker (customized)'
+
+# Default ports
+#ui_port     = '9000'
+#api_port    = '9001'
+#store_port  = '9002'
+
+run_list(
+  'role[screwdriver-on-docker]',
+)
+
+override_attributes(
+  'docker-grid' => {
+    'engine' => {
+      #'skip_setup' => true,  # default: false
+    },
+    'compose' => {
+      #'skip_setup' => true,  # default: false
+    },
+  },
+  'screwdriver' => {
+    'api' => {
+      'config' => {
+        'scms' => {
+          # **REQUIRED**: SCM settings
+          'github.com' => {  # id and display name
+            'plugin' => 'github',
+            'config' => {
+              # These 3 secrets should be set by the following `['screwdriver']['api']['scms_vault_items']` attribute.
+              'oauthClientId' => 'YOU-PROBABLY-WANT-SOMETHING-HERE',  # The client id used for OAuth with github. GitHub OAuth (https://developer.github.com/v3/oauth/)
+              'oauthClientSecret' => 'AGAIN-SOMETHING-HERE-IS-USEFUL',  # The client secret used for OAuth with github
+              'secret' => 'SUPER-SECRET-SIGNING-THING',  # Secret to add to GitHub webhooks so that we can validate them
+              #'gheHost' => 'github.screwdriver.cd',  # [Optional] GitHub enterprise host
+              'username' => 'sd-buildbot',  # [Optional] Username for code checkout
+              'email' => 'dev-null@screwdriver.cd',  # [Optional] Email for code checkout
+              'privateRepo' => false,  # [Optional] Set to true to support private repo; will need read and write access to public and private repos (https://developer.github.com/v3/oauth/#scopes)
+            },
+          },
+        },
+      },
+    },
+    'docker-compose' => {
+      'config' => {
+        'services' => {
+          'api' => {
+            'ports' => [
+              #"#{api_port}:80",
+            ],
+            'environment' => {
+              #'NODE_TLS_REJECT_UNAUTHORIZED' => '0',  # for self-signed cetificates
+              # The following variables will be set by the screwdriver::docker-compose recipe automatically.
+              #'ECOSYSTEM_UI' => "http://#{node['fqdn']}:#{ui_port}",
+              #'ECOSYSTEM_STORE' => "http://#{node['fqdn']}:#{store_port}",
+            },
+          },
+          'ui' => {
+            'ports' => [
+              #"#{ui_port}:80",
+            ],
+            'environment' => {
+              # These variables will be set by the screwdriver::docker-compose recipe automatically.
+              #'ECOSYSTEM_API' => "http://#{node['fqdn']}:#{api_port}",
+              #'ECOSYSTEM_STORE' => "http://#{node['fqdn']}:#{store_port}",
+            },
+          },
+          'store' => {
+            'ports' => [
+              #"#{store_port}:80",
+            ],
+            'environment' => {
+              # This variable will be set by the screwdriver::docker-compose recipe automatically.
+              #'ECOSYSTEM_UI' => "http://#{node['fqdn']}:#{ui_port}",
+            },
+          },
+        },
+      },
+    },
+  },
+)