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

AWS deployment fixes #308

Merged
merged 10 commits into from
Mar 11, 2025
Merged

AWS deployment fixes #308

merged 10 commits into from
Mar 11, 2025

Conversation

setrofim
Copy link
Collaborator

An attempt to create a parallel deployment (on an account that already has one) from a clean Arm-based enviroment identified a number issues with the AWS deployment automation that are being addressed here.

Remove trailing whitespace inadvertently left in the REAME.md for the
AWS deployment.

Signed-off-by: Sergei Trofimov <[email protected]>
env.{bash,zsh} gets sourced inside `make boostrap` to get the environment
variables set up. This happens before the venv exists (the boostrap
creates it).

Signed-off-by: Sergei Trofimov <[email protected]>
Copy link
Contributor

@thomas-fossati thomas-fossati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great stuff!\

Got lots of name clashes, it seems :-)

Copy link
Collaborator

@yogeshbdeshpande yogeshbdeshpande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left some nits

- Add `packer init` call to bootstrap script to make sure packer plugins
  needed for building on AWS are installed after packer itself.
- Update "AWS Credentials" section of the readme to point to packer
  configuration that describes how packer looks for AWS credentials, and
  add a sample way of configuring AWS creds in a way that packer can
  find them.

Signed-off-by: Sergei Trofimov <[email protected]>
Fix command create-signing-key --> create-signer-key. (And ditto for the
delete-).

Signed-off-by: Sergei Trofimov <[email protected]>
Use deployment name as part of names of named objects in template stack
to avoid name collision when multiple deployments are created on
the same AWS account.

Signed-off-by: Sergei Trofimov <[email protected]>
The service linked role for ElastiCache can only be created once
per-account, and there does not appear to be a good way to do so
conditionally inside the template, while also maintaining correct
ordering.

So, instead of specifying it in the template, check if it exists and
create it if necessary before the stack.

Signed-off-by: Sergei Trofimov <[email protected]>
Add -S flag to native deployment to force creation of systemd units in
the deployment, regardless of the native system (there is also an
equivalent -L for launchd). Use -S inside dep and rpm deployments to
ensure that the packages are always created with systemd units even if
the local system doesn't have systemd.

Signed-off-by: Sergei Trofimov <[email protected]>
- Set GOOS=linux when creating deb and rpm to ensure that we're building
  for Linux even when doing so on a Mac.
- Set GOARCH=amd64 when creating the deb for the AWS deployment, as EC2
  instances used in the deployment are x86_64.

Signed-off-by: Sergei Trofimov <[email protected]>
Add a command to add a pre-built deb package to the deployment rather
than building one.

Signed-off-by: Sergei Trofimov <[email protected]>
Do not rely on dns name being set in the environment when generating
services config file. Instead, set it from the cached settings.

Signed-off-by: Sergei Trofimov <[email protected]>
@setrofim setrofim merged commit 61201e0 into main Mar 11, 2025
9 checks passed
@setrofim setrofim deleted the aws-fixes branch March 11, 2025 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants