Skip to content

Commit 1c2ccce

Browse files
committed
QAG-30: Update the readme with secrets configuration
1 parent e1e1f2d commit 1c2ccce

File tree

1 file changed

+32
-24
lines changed

1 file changed

+32
-24
lines changed

README.md

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,36 @@
11
# Wunder template for Drupal projects
22

3-
This project template is an opinionated fork of the popular [drupal-omposer template](https://github.com/drupal-composer/drupal-project), configured to automatically deploy code to a [Kubernetes](https://kubernetes.io/) cluster using [CircleCI](https://circleci.com/).
3+
This project is a tailored fork of the popular [drupal-composer template](https://github.com/drupal-composer/drupal-project). It is designed for deploying to [Kubernetes](https://kubernetes.io/) clusters via [CircleCI](https://circleci.com/).
44

55
## Getting started
66

7-
1. Click "[Use this template](https://github.com/wunderio/drupal-project/generate)" to generate a new project:
7+
1. **Create a new project repository**
8+
Click "[Use this template](https://github.com/wunderio/drupal-project/generate)" to generate a new project:
89
- Select the correct owner.
910
- Name the project as `client-COUNTRYCODE-CLIENT-PROJECT`.
10-
- Make the repository private (unless the project is public).
11-
2. Clone the new project locally and update its details:
11+
- Set the repository to private (unless the project is public).
12+
13+
2. **Clone and customize the repository**
14+
Clone the new project locally and update its details:
15+
- Update `README.md` with the project details.
1216
- Update `composer.json` with the project name.
13-
- Modify the `silta/silta.yml` [values](https://github.com/wunderio/charts/blob/master/drupal/values.yaml).
14-
- Adjust `grumphp.yml` tasks, including the project name in the `git_commit_message` regex.
15-
3. Log in to [CircleCI](https://app.circleci.com/) using your GitHub account and add the new project using the existing configuration.
16-
4. Configure [automatic autolinks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls#custom-autolinks-to-external-resources) for the project's JIRA environment.
17+
- Modify the `silta/silta*` files [values](https://github.com/wunderio/charts/blob/master/drupal/values.yaml).
18+
- Adjust `grumphp.yml` tasks, including updating the project name in the `git_commit_message` regex.
19+
- Adjust the `lando` configuration in `.lando.yml`.
20+
21+
3. **Set up CircleCI**
22+
- Log in to [CircleCI](https://app.circleci.com/) using your GitHub account.
23+
- Add the new project to CircleCI using the existing configuration.
24+
25+
4. **Configure encryption keys and secrets**
26+
- Define encryption keys for `silta_dev` and `silta_finland` contexts in the CircleCI project settings and backup the keys in LastPass. Use the following naming convention: `SEC_{PROJECT_NAME}_{CONTEXT}` where `CONTEXT` is the environment, such as `silta_dev` or `silta_finland`.
27+
- Update the `.circleci/config.yml` file with the corresponding `secret_key_env` values.
28+
- Define the secret environment variables in the `silta/silta*.secrets` YAML files for the `silta_dev` and `silta_finland` contexts.
29+
- Encrypt the `silta/silta*.secrets` files using the encryption keys and commit the encrypted files to the repository.
30+
- See the relevant [Silta's documentation](https://wunderio.github.io/silta/docs/encrypting-sensitive-configuration/#using-a-custom-encryption-key) for details.
31+
32+
5. **Enable JIRA integration**
33+
- Configure [automatic autolinks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls#custom-autolinks-to-external-resources) for the project's JIRA environment to link ticket IDs to JIRA issues seamlessly.
1734

1835
For additional instructions, please refer to the [Silta documentation](https://github.com/wunderio/silta).
1936

@@ -84,9 +101,9 @@ The following secret variables are defined in the `silta/silta.secrets` file for
84101
- **`lando varnishadm <commands>`**: Run [varnishadm](https://varnish-cache.org/docs/6.0/reference/varnishadm.html) commands.
85102
- **`lando xdebug <mode>`**: Load [Xdebug](https://xdebug.org/) in the selected [mode(s)](https://xdebug.org/docs/all_settings#mode).
86103

87-
## Development advice
104+
## Development tips
88105

89-
### Drupal core tips
106+
### Drupal core updates
90107

91108
- [Updating Drupal core](https://www.drupal.org/docs/updating-drupal/updating-drupal-core-via-composer).
92109
- [Altering scaffold files](https://www.drupal.org/docs/develop/using-composer/using-drupals-composer-scaffold#toc_4) (e.g., `robots.txt`, `.htaccess`).
@@ -148,28 +165,19 @@ Use `lando phpunit` to run PHPUnit commands:
148165

149166
[Silta CLI](https://github.com/wunderio/silta-cli) is a command-line tool to manage secrets and configurations for Silta projects. Use the following commands:
150167

151-
- Encrypt a file: `silta secrets encrypt --file silta/silta.secret --secret-key=$SECRET_KEY`
152-
- Decrypt a file: `silta secrets decrypt --file silta/silta.secret --secret-key=$SECRET_KEY`
168+
- Encrypt a file: `silta secrets encrypt --file silta/silta.secrets --secret-key=<secret_key_env>`
169+
- Decrypt a file: `silta secrets decrypt --file silta/silta.secrets --secret-key=<secret_key_env>`
153170
- Display help: `silta secrets --help`
154171

155-
You need a secret key to encrypt and decrypt data. It can be specified with the `--secret-key` flag (defaults to the `SECRET_KEY` environment variable). To enhance security, use a custom key for each project. See [Silta's documentation](https://wunderio.github.io/silta/docs/encrypting-sensitive-configuration/#using-a-custom-encryption-key) for details.
156-
157-
#### Key naming convention
158-
159-
Use the following naming convention for custom keys: `SEC_{PROJECT_NAME}_{CONTEXT}` where `CONTEXT` is the environment, such as `silta_dev` or `silta_finland`.
160-
For example, for the `drupal-project` in the `silta_dev` environment, use the key: `SEC_DRUPAL_PROJECT_SILTA_DEV`.
161-
162-
#### Secrets file
163-
164-
The `silta/silta.secret` file is a YAML file containing encrypted secrets for the `silta-dev` context. Add additional files for other contexts, such as `silta/silta-prod.secret` for production.
172+
See the corresponding `secret_key_env` values in the `.circleci/config.yml` file for the `silta_dev` and `silta_finland` contexts. Refer to the Getting Started section for details.
165173

166174
## Contributing
167175

168176
This project is maintained by [Wunder](https://wunder.io/). Contributions from the community are welcome.
169177

170-
### Commit Message Validation and Ticketing System Integration
178+
### Commit message validation and ticketing system integration
171179

172-
We use JIRA and GitHub Issues for tracking tasks. Commit messages must include a valid ticket ID except for merge commits. Use the following format:
180+
We use JIRA and GitHub issues for tracking tasks. Commit messages must include a valid ticket ID except for merge commits. Use the following format:
173181

174182
- JIRA: `[PROJECTKEY-123]: Description`
175183
- GitHub: `[GH-123]: Description`

0 commit comments

Comments
 (0)