Changeset View
Standalone View
scripts/source_development_defaults.sh
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
# For cargo + rustup applications, ensure cargo user bin directory is on path | # For cargo + rustup applications, ensure cargo user bin directory is on path | ||||
if [[ ! "$PATH" =~ \.cargo/bin ]]; then | if [[ ! "$PATH" =~ \.cargo/bin ]]; then | ||||
export PATH="$PATH":${HOME}/.cargo/bin | export PATH="$PATH":${HOME}/.cargo/bin | ||||
fi | fi | ||||
# For development and local testing, point to localstack | # For development and local testing, point to localstack | ||||
export LOCALSTACK_ENDPOINT=http://localhost:4566 | export LOCALSTACK_ENDPOINT=http://localhost:4566 | ||||
export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-test} | |||||
export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-test} | |||||
jon: One repercussion of this is that this will supersede what you have specified in ~/. | |||||
ashoatUnsubmitted Not Done Inline ActionsCurious on how this might affect a workflow that relies on an externally running staging environment. If somebody wanted to access a staging environment on AWS, would they need to set these envvars in eg. their ~/.profile? ashoat: Curious on how this might affect a workflow that relies on an externally running staging… | |||||
jonAuthorUnsubmitted Done Inline Actions
This should only have an effect if you're running a service (e.g. identity) locally. Otherwise it shouldn't affect things such as keyserver connecting to a particular service.
No. That's a separate issue. This mostly affects code which "loads aws credentials from environment". Such as https://github.com/CommE2E/comm/blob/ee8762ce834ca154fa61f4f0bdd88b927256f3b7/services/blob/src/config.rs#L54 There's 3 possibilities here:
jon: > Curious on how this might affect a workflow that relies on an externally running staging… | |||||
# Create easier-to-use shortcut for localstack | |||||
awslocal() { | |||||
aws --endpoint-url=http://localhost:4566 "$@" | |||||
} | |||||
# Enable shell completions | |||||
if [[ $(basename "$0") == "bash" ]]; then | |||||
complete -C aws_completer awslocal | |||||
fi |
One repercussion of this is that this will supersede what you have specified in ~/.aws/credentials.
One option would be to move this into comm-dev, however, nix develop already denotes a development environment; so having it use local configuration doesn't seem too far off the mark.