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

More AWS documentation #1913

Merged
merged 14 commits into from
Mar 2, 2024
Merged

Conversation

AronNovak
Copy link
Contributor

No description provided.

Guide/deployment.markdown Outdated Show resolved Hide resolved
Copy link
Collaborator

@amitaibu amitaibu left a comment

Choose a reason for hiding this comment

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

Looks good, thanks. A couple of comments

Guide/deployment.markdown Outdated Show resolved Hide resolved
- (Optional) Choose `Auto generate password` for having a secure master password.
- Choose `Connect to an EC2 compute resource` and select your already existing EC2 instance.
- Then you can `Create database`. This process is slow, check back in 10 minutes or so afterward. Note down the auto-generated password.
- Edit your `flake.nix`, under `flake.nixosConfigurations."ihp-app".services.ihp.additionalEnvVars`, you can specify the database URL like: `DATABASE_URL = "postgresql://postgres:autogeneratedpw@app.aaa000.eu-west-1.rds.amazonaws.com/postgres";`. You can find the proper hostname after the initialization is complete, on the RDS instance detail page.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Edit your `flake.nix`, under `flake.nixosConfigurations."ihp-app".services.ihp.additionalEnvVars`, you can specify the database URL like: `DATABASE_URL = "postgresql://postgres:autogeneratedpw@app.aaa000.eu-west-1.rds.amazonaws.com/postgres";`. You can find the proper hostname after the initialization is complete, on the RDS instance detail page.
- Edit your `flake.nix`, under `flake.nixosConfigurations."ihp-app".services.ihp.additionalEnvVars`, you can specify the database URL like: `DATABASE_URL = "postgresql://postgres:YOUR-PASSWORD@app.YOUR-IP.eu-west-1.rds.amazonaws.com/postgres";`. You can find the proper hostname after the initialization is complete, on the RDS instance detail page.

Guide/deployment.markdown Outdated Show resolved Hide resolved
Guide/deployment.markdown Outdated Show resolved Hide resolved
Infrastructure-side preparation:
- Visit the [S3 creation page](https://s3.console.aws.amazon.com/s3/bucket/create?region=eu-west-1) and create a bucket in the same region.. If objects should or should not be public, it's up to the business requirements of the application. The S3 [ARN](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html) from the S3 details page should be noted down.
- Create an new IAM user for the S3 access. Create an [AWS access key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) for that IAM user.
- For that user, attach a [policy](https://gist.github.com/AronNovak/d2e295d1644e807e27e5e759ecffbc86) that allows access to the bucket.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's have the policy here instead of in a gist

AronNovak and others added 2 commits February 16, 2024 11:37
Co-authored-by: Amitai Burstein <amitai@gizra.com>
Co-authored-by: Amitai Burstein <amitai@gizra.com>
Guide/deployment.markdown Outdated Show resolved Hide resolved
@amitaibu
Copy link
Collaborator

@AronNovak as we now know how to connect to AWS Cloudwatch, let's add to this doc as well. Meanwhile, I'll add the actual code in https://github.com/digitallyinduced/ihp-boilerplate/blob/master/flake.nix

@amitaibu
Copy link
Collaborator

Here's the ihp-boilerplate counterpart - digitallyinduced/ihp-boilerplate#32

@AronNovak
Copy link
Contributor Author

@amitaibu I extended the doc, we might wait for merging digitallyinduced/ihp-boilerplate#32 to have a more clean reference.

Guide/deployment.markdown Outdated Show resolved Hide resolved
@amitaibu
Copy link
Collaborator

@mpscholten This should be ready for review; I think/ hope it would allow easier deploys to AWS 😄

Guide/deployment.markdown Outdated Show resolved Hide resolved
Guide/deployment.markdown Outdated Show resolved Hide resolved
Copy link
Member

@mpscholten mpscholten left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@mpscholten mpscholten merged commit 0a562b2 into digitallyinduced:master Mar 2, 2024
2 checks passed
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