Skip to content

Commit

Permalink
Use custom answers file path and copy into deployment directory.
Browse files Browse the repository at this point in the history
To facilitate use of the template in a multi-template scenario and to
update/mgirate existing deployments.
  • Loading branch information
csadorf committed Jun 10, 2022
1 parent d58d19a commit d4c5012
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ In order to update an existing deployment to either change the configuration or

Then perform a [copier update](https://copier.readthedocs.io/en/stable/updating/) by switching into your deployments directory and running
```
$ copier update
$ copier -a aiidalab.contoso.com/.copier-answers.yml update
```
where you should replace `aiidalab.contoso.com` with the hostname of the deployment that you want to update.

The update process will walk you through the questionaire and potentially request all needed information.
The update process will walk you through the questionaire and potentially request newly required information.
Answers that were already provided in the previous deployment will be reused.
Please see the *Known limitations* section for limitations with respect to managing multiple deployements using this approach.

## DNS-zones

Expand All @@ -215,7 +215,6 @@ The GitHub OAuth client credentials as well as the JupyterHub secret token are s
## Known limitations

- A DNS entry configured automatically within a DNS zone is not automatically removed when the deployment is torn down. This is not necessarily an issue since the record is going to be updated when a deployment with the same hostname is re-created, however you might want to remove the entry manually after destroying a deployment to avoid confusion.
- Managing multiple deployments within the same deployments directory is in principal supported, however updating or migrating deployments can be difficult, because only the last set of answers are stored.
- The questionaire allows for certains answers to be "empty" although a value is required. This appears to be a [bug in copier](https://github.com/copier-org/copier/issues/355).

## LICENSE
Expand Down
3 changes: 3 additions & 0 deletions copier.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
_subdirectory: template
_templates_suffix: ''
_answers_file: .copier-answers.aiidalab-on-azure.yml
_tasks:
- cp '{{ _copier_conf.answers_file }}' '{{ hostname }}/.copier-answers.yml'

azurerm_storage_account_name:
type: str
Expand Down

0 comments on commit d4c5012

Please sign in to comment.