#'key' => 'hash/path/to/password', # real hash path: "/#{node.chef_environment}/hash/path/to/password"
=end
}
+default['screwdriver']['db_username_vault_item'] = {
+=begin
+ 'vault' => 'screwdriver',
+ 'name' => 'db_username',
+ # single usernaem or nested hash username path delimited by slash
+ 'env_context' => false,
+ 'key' => 'username', # real hash path: "/username"
+ # or nested hash password path delimited by slash
+ #'env_context' => true,
+ #'key' => 'hash/path/to/username', # real hash path: "/#{node.chef_environment}/hash/path/to/username"
+=end
+}
+default['screwdriver']['db_password_vault_item'] = {
+=begin
+ 'vault' => 'screwdriver',
+ 'name' => 'db_password',
+ # single password or nested hash password path delimited by slash
+ 'env_context' => false,
+ 'key' => 'password', # real hash path: "/password"
+ # or nested hash password path delimited by slash
+ #'env_context' => true,
+ #'key' => 'hash/path/to/password', # real hash path: "/#{node.chef_environment}/hash/path/to/password"
+=end
+}
+default['screwdriver']['db_root_password_vault_item'] = {
+=begin
+ 'vault' => 'screwdriver',
+ 'name' => 'db_root_password',
+ # single password or nested hash password path delimited by slash
+ 'env_context' => false,
+ 'key' => 'password', # real hash path: "/password"
+ # or nested hash password path delimited by slash
+ #'env_context' => true,
+ #'key' => 'hash/path/to/password', # real hash path: "/#{node.chef_environment}/hash/path/to/password"
+=end
+}
force_override['screwdriver']['ui']['tls_setup_mode'] = 'reverseproxy'
# These hash objects are expanded to a `/config/local.yaml` file in each Docker container.
'volumes' => [
'/var/run/docker.sock:/var/run/docker.sock:rw',
# This volume will be set by the screwdriver::docker-compose recipe automatically.
- #"#{node['screwdriver']['docker-compose']['data_dir']}:/sd-data:rw",
+ #"#{node['screwdriver']['docker-compose']['data_dir']}:/sd-data:rw", # for sqlite
],
'environment' => {
# See:
'SECRET_WHITELIST' => '[]',
'SECRET_ADMINS' => '[]',
'DATASTORE_PLUGIN' => 'sequelize',
+ 'DATASTORE_SEQUELIZE_DATABASE' => 'screwdriver',
'DATASTORE_SEQUELIZE_DIALECT' => 'sqlite',
- 'DATASTORE_SEQUELIZE_STORAGE' => '/sd-data/storage.db',
+ # This variable will be set by the screwdriver::docker-compose recipe automatically.
+ #'DATASTORE_SEQUELIZE_STORAGE' => '/sd-data/storage.db',
+ # for MySQL
+ #'DATASTORE_SEQUELIZE_DIALECT' => 'mysql',
+ # These variables will be set by the screwdriver::docker-compose recipe automatically.
+ #'DATASTORE_SEQUELIZE_USERNAME' => '${DB_USERNAME}',
+ #'DATASTORE_SEQUELIZE_PASSWORD' => '${DB_PASSWORD}',
+ #'DATASTORE_SEQUELIZE_HOST' => 'db',
# This variable will be set by the screwdriver::docker-compose recipe automatically.
#'IS_HTTPS' => 'false',
#'NODE_TLS_REJECT_UNAUTHORIZED' => '0', # workaround for self-signed cetificates
},
}
+config_srvs = node['screwdriver']['docker-compose']['config']['services']
+case config_srvs['api']['environment']['DATASTORE_SEQUELIZE_DIALECT']
+when 'mysql'
+ version_2_config['services']['db'] = {
+ 'image' => 'mysql:5',
+ 'volumes' => [
+ # This variable will be set by the screwdriver::docker-compose recipe automatically.
+ #"#{node['screwdriver']['docker-compose']['data_dir']}/mysql:/var/lib/mysql:rw",
+ ],
+ 'environment' => {
+ # These variables will be set by the screwdriver::docker-compose recipe automatically.
+ #'MYSQL_ROOT_PASSWORD' => '${DB_ROOT_PASSWORD}',
+ #'MYSQL_USER' => '${DB_USERNAME}',
+ #'MYSQL_PASSWORD' => '${DB_PASSWORD}',
+ #'MYSQL_DATABASE' => 'screwdriver',
+ },
+ }
+end
+
default['screwdriver']['docker-compose']['config'] = version_2_config