-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete instructions to deploy Tessera GCP #86
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a982dee
read environment variables
phbnf b7da2d5
add instructions
phbnf 9c7b31b
s/trillian-tessera/tessera because otherwise names are too long
phbnf 739081d
better names and move documentation around
phbnf aed8e5e
s/us-east1/us-central1
phbnf 463ba59
leave defaults set to current values
phbnf 57bfc12
tidy things up
phbnf 34fb0d2
EnglishIsHard
phbnf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Deployment | ||
|
||
First authenticate via `gcloud` as a principle with sufficient ACLs for | ||
the project: | ||
```bash | ||
gcloud auth application-default login | ||
``` | ||
|
||
Set your GCP project ID with: | ||
```bash | ||
export GOOGLE_PROJECT={VALUE} | ||
``` | ||
|
||
Optionally, customize the GCP region (defaults to "us-central1"), | ||
and bucket name prefix (defaults to "example-gcp"): | ||
```bash | ||
export GOOGLE_REGION={VALUE} | ||
export TESSERA_BASE_NAME={VALUE} | ||
``` | ||
|
||
Terraforming the project can be done by: | ||
1. `cd` to the relevant `live` directory for the environment to deploy/change | ||
2. Run `terragrunt apply` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the advantage of doing this with environment variables? It moves away from the the deployment files being fully declarative, which means that two people can check out the same repo and then create different deployments because of inconsistencies in the env naming. It's also more work each time you set up a shell to get back to the same state. The obvious workaround is to create a shell script that sets these values, but then you've just put them in a file, which this change moves away from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I just saw Al's comments which only appear at the overview screen and not on the "files changed" view. Looks like these comments are somewhat redundant!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving the conversation here since I looked at this with Al yesterday, and the goal was specifically to get your opinion on it given that you've spent a lot of time looking at Terraform already.
which means that two people can check out the same repo and then create different deployments because of inconsistencies in the env naming.
: I think this is a feature, I have my own dev GCP project and I'd like to deploy tessera there. Alternatively, I might want to play around with a deployment in thetrillian-tessera
project with a CT log, without impacting other folks working on the current existing deployment.The current setup is already affected by environment variables, the deployment files as they are do not work without setting GOOGLE_PROJECT:
This PR doesn't change this behavior, but it's a improvement because now you only have to set your project ID once, and not both in GOOGLE_PROJECT and in terragrunt.hcl. I think it's the smallest change we can make to allow to:
I tried two alternatives before sending this PR:
modules/gcs/main.tf
needs to be edited to specify the provider and project (which can be passed from terragrunt.hcl). That would allow to have all the config declarative, but folks would have to make sure not to add this file edits to their commits. Al wasn't supper keen on modifyingmodules/gcs/main.tf
nor on making folks edit a config file for running quick examples.I think that another alternative is to use terragrunt to generate the provider config, either with or without making use of environment variables.
What do you recommend?