Skip to content
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

Infra Week: Create Utility Script for Exporting ENV Variables and Update Pulumi Scripts #2628

Open
2 tasks
erichfi opened this issue Jun 25, 2024 · 5 comments
Open
2 tasks
Assignees

Comments

@erichfi
Copy link
Collaborator

erichfi commented Jun 25, 2024

User Story:
As a developer, I want to create a utility script that pulls and exports all relevant ENV variables for any environment to local ENVs and update Pulumi scripts to read these variables, so that I can run pulumi up from my local environment for review, staging, and production using the correct variables.

!! Note from Lucian !! : I'll update the pulumi scripts as part of #2627, so this ticket can just handle the script for local development. Or really, setting up a .env.local with the right 1password paths and then altering the package.json commands to use the 1password utility, and making sure 1password has good default entries for local dev. See https://developer.1password.com/docs/cli/secrets-environment-variables/

Acceptance Criteria:
GIVEN the utility script and updated Pulumi scripts,
WHEN I run the script,
THEN all relevant environment variables should be pulled and exported to my local environment, and the Pulumi scripts should use these variables.

Tech Details:

  • see https://developer.1password.com/docs/cli/secrets-environment-variables/ for more details
  • Develop a script to pull and export environment variables.
  • Ensure the script works for review, staging, and production environments.
  • Modify the Pulumi script to use external environment variables, including NEXT_PUBLIC_MAX_LEGACY_ROUND_ID.
  • Document usage instructions.

Open Questions:

  • Should the script handle any environment-specific logic?

  • Are there additional environment variables that need to be considered?

Notes/Assumptions:

  • Assume developers have local environments set up correctly.
  • Assume all required environment variables are available.
@lucianHymer
Copy link
Collaborator

We probably want to use the methods described here? https://developer.1password.com/docs/cli/secrets-environment-variables

@nutrina
Copy link
Collaborator

nutrina commented Jul 1, 2024

The repos affected

  • passport-data-science
  • passport
  • passport-scorer
  • identity-staking (contracts)
  • identity-staking-app
  • eas-proxy
  • passport-scroll-badge
  • passport-scroll-badge-services

Exceptions to be handled

  • docker image URLs: we should have a command that uses aws cli to get the latest image tag for a repo, but we should be able to override if required (for example if we want to roll back

@Jkd-eth Jkd-eth changed the title Create Utility Script for Exporting ENV Variables and Update Pulumi Scripts Infra Week: Create Utility Script for Exporting ENV Variables and Update Pulumi Scripts Jul 9, 2024
@lucianHymer
Copy link
Collaborator

Note: I'll update the pulumi scripts as part of #2627, so this ticket can just handle the script for local development

@tim-schultz
Copy link
Collaborator

There are POCs for loading the env variables while running pulumi up locally in the linked PRs. Moving to blocked until 2627 is finished up since there is a decent amount of overlap

@tim-schultz
Copy link
Collaborator

This is no longer needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants