Skip to content

Commit

Permalink
chore(cleanup): Remove outdated configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sylus committed Aug 28, 2024
1 parent 09a8f60 commit 1c27aa6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 193 deletions.
14 changes: 6 additions & 8 deletions charts/drupal/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: drupal
apiVersion: v2
type: application
version: 1.0.0-beta13
version: 1.0.0-beta14
appVersion: 5.2.3
description: Drupal 10 variant of the Web Experience Toolkit (WxT).
description: Helm Chart for deploying an enterprise-grade Drupal environment.
keywords:
- drupal
- cms
- wxt
- drupal
- http
- web
- application
- php
home: http://www.drupal.org/project/wxt
- web
home: http://www.drupal.org/project/drupal
icon: https://bitnami.com/assets/stacks/drupal/img/drupal-stack-220x234.png
sources:
- https://github.com/drupalwxt/wxt
- https://github.com/drupalwxt/helm-drupal
maintainers:
- name: sylus
email: william.hearn@canada.ca
Expand Down
79 changes: 0 additions & 79 deletions charts/drupal/conf/settings.d10.php
Original file line number Diff line number Diff line change
Expand Up @@ -931,85 +931,6 @@

$settings["config_sync_directory"] = '{{ .Values.drupal.configSync.directory }}';

{{- if .Values.drupal.configSplit.enabled }}
/**
* Configuration Split for Configuration Management
*
* WxT is following the best practices given by Acquia for configuration
* management. The "default" configuration directory should be shared between
* all multi-sites, and each multisite will override this selectively using
* configuration splits.
*
* To disable this functionality simply set the following parameters:
* $wxt_override_config_dirs = FALSE;
* $settings['config_sync_directory'] = $dir . "/private/config/$site_dir";
*
* See https://github.com/acquia/blt/blob/12.x/settings/config.settings.php
* for more information.
*/

use Drupal\wxt\Robo\Common\EnvironmentDetector;

if (!isset($wxt_override_config_dirs)) {
$wxt_override_config_dirs = TRUE;
}
if ($wxt_override_config_dirs) {
$config_directories['sync'] = $repo_root . "/private/config/default";
$settings['config_sync_directory'] = $repo_root . "/private/config/default";
}
$split_filename_prefix = 'config_split.config_split';
if (isset($config_directories['sync'])) {
$split_filepath_prefix = $config_directories['sync'] . '/' . $split_filename_prefix;
}
else {
$split_filepath_prefix = $settings['config_sync_directory'] . '/' . $split_filename_prefix;
}

/**
* Set environment splits.
*/
$split_envs = [
'local',
'dev',
'test',
'qa',
'prod',
'ci',
];
foreach ($split_envs as $split_env) {
$config["$split_filename_prefix.$split_env"]['status'] = FALSE;
}
if (!isset($split)) {
$split = 'none';
if (EnvironmentDetector::isLocalEnv()) {
$split = 'local';
}
if (EnvironmentDetector::isCiEnv()) {
$split = 'ci';
}
if (EnvironmentDetector::isDevEnv()) {
$split = 'dev';
}
elseif (EnvironmentDetector::isTestEnv()) {
$split = 'test';
}
elseif (EnvironmentDetector::isQaEnv()) {
$split = 'qa';
}
elseif (EnvironmentDetector::isProdEnv()) {
$split = 'prod';
}
}
if ($split != 'none') {
$config["$split_filename_prefix.$split"]['status'] = TRUE;
}

/**
* Set multisite split.
*/
// $config["$split_filename_prefix.SITENAME"]['status'] = TRUE;
{{- end }}

{{- if .Values.redis.enabled }}
if (extension_loaded('redis')) {
// Set Redis as the default backend for any cache bin not otherwise specified.
Expand Down
79 changes: 0 additions & 79 deletions charts/drupal/conf/settings.d9.php
Original file line number Diff line number Diff line change
Expand Up @@ -844,85 +844,6 @@

$settings["config_sync_directory"] = '{{ .Values.drupal.configSync.directory }}';

{{- if .Values.drupal.configSplit.enabled }}
/**
* Configuration Split for Configuration Management
*
* WxT is following the best practices given by Acquia for configuration
* management. The "default" configuration directory should be shared between
* all multi-sites, and each multisite will override this selectively using
* configuration splits.
*
* To disable this functionality simply set the following parameters:
* $wxt_override_config_dirs = FALSE;
* $settings['config_sync_directory'] = $dir . "/private/config/$site_dir";
*
* See https://github.com/acquia/blt/blob/12.x/settings/config.settings.php
* for more information.
*/

use Drupal\wxt\Robo\Common\EnvironmentDetector;

if (!isset($wxt_override_config_dirs)) {
$wxt_override_config_dirs = TRUE;
}
if ($wxt_override_config_dirs) {
$config_directories['sync'] = $repo_root . "/private/config/default";
$settings['config_sync_directory'] = $repo_root . "/private/config/default";
}
$split_filename_prefix = 'config_split.config_split';
if (isset($config_directories['sync'])) {
$split_filepath_prefix = $config_directories['sync'] . '/' . $split_filename_prefix;
}
else {
$split_filepath_prefix = $settings['config_sync_directory'] . '/' . $split_filename_prefix;
}

/**
* Set environment splits.
*/
$split_envs = [
'local',
'dev',
'test',
'qa',
'prod',
'ci',
];
foreach ($split_envs as $split_env) {
$config["$split_filename_prefix.$split_env"]['status'] = FALSE;
}
if (!isset($split)) {
$split = 'none';
if (EnvironmentDetector::isLocalEnv()) {
$split = 'local';
}
if (EnvironmentDetector::isCiEnv()) {
$split = 'ci';
}
if (EnvironmentDetector::isDevEnv()) {
$split = 'dev';
}
elseif (EnvironmentDetector::isTestEnv()) {
$split = 'test';
}
elseif (EnvironmentDetector::isQaEnv()) {
$split = 'qa';
}
elseif (EnvironmentDetector::isProdEnv()) {
$split = 'prod';
}
}
if ($split != 'none') {
$config["$split_filename_prefix.$split"]['status'] = TRUE;
}

/**
* Set multisite split.
*/
// $config["$split_filename_prefix.SITENAME"]['status'] = TRUE;
{{- end }}

{{- if .Values.redis.enabled }}
if (extension_loaded('redis')) {
// Set Redis as the default backend for any cache bin not otherwise specified.
Expand Down
27 changes: 0 additions & 27 deletions charts/drupal/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,6 @@ kubectl exec -it $POD_NAME -n {{ .Release.Namespace }} -- drush si {{ .Values.dr

{{- end }}

** Migrations

{{- if or (not .Values.drupal.migrate) (not .Values.drupal.install) (not .Values.drupal.reconfigure) }}

export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/instance={{ .Release.Name }},tier=drupal" -o jsonpath="{.items[0].metadata.name}")

# Baseline migrations for Canada.ca
kubectl exec -it $POD_NAME -n {{ .Release.Namespace }} -- drush migrate:import wxt_file
kubectl exec -it $POD_NAME -n {{ .Release.Namespace }} -- drush migrate:import --group wxt --tag 'Core'
kubectl exec -it $POD_NAME -n {{ .Release.Namespace }} -- drush migrate:import --group gcweb --tag 'Core'
kubectl exec -it $POD_NAME -n {{ .Release.Namespace }} -- drush migrate:import --group gcweb --tag 'Menu'

# Group migration
kubectl exec -it $POD_NAME -n {{ .Release.Namespace }} -- drush migrate:import --group gcweb --tag 'Menu'
kubectl exec -it $POD_NAME -n {{ .Release.Namespace }} -- drush php-eval 'node_access_rebuild();'

{{- else }}

Default Canada.ca content migrations have been run.

To perform additional migrations, run:

export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/instance={{ .Release.Name }},tier=drupal" -o jsonpath="{.items[0].metadata.name}")
kubectl exec -it $POD_NAME -n {{ .Release.Namespace }} -- drush migrate:import $MIGRATION

{{- end }}

** Login

{{- if .Values.drupal.usePasswordFiles }}
Expand Down

0 comments on commit 1c27aa6

Please sign in to comment.