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 AMI will be useful #4042

Open
shantanuo opened this issue Dec 2, 2024 · 6 comments
Open

AWS AMI will be useful #4042

shantanuo opened this issue Dec 2, 2024 · 6 comments
Assignees
Labels
needs: product approval It's not yet clear that this issue will actually improve Mathesar from a user's perspective restricted: maintainers Only maintainers can resolve this issue type: enhancement New feature or request user reported Reported by a Mathesar user work: installation
Milestone

Comments

@shantanuo
Copy link

Problem

Installation is very complicated.

Proposed solution

Amazon Image with pre-installed package will be useful

Additional context

Tried to install mathesar on EC2. It was very difficult and still not able to complete the installation. Hence this request.

@shantanuo shantanuo added needs: triage This issue has not yet been reviewed by a maintainer type: enhancement New feature or request labels Dec 2, 2024
@seancolsen seancolsen added restricted: maintainers Only maintainers can resolve this issue user reported Reported by a Mathesar user needs: product approval It's not yet clear that this issue will actually improve Mathesar from a user's perspective work: installation and removed needs: triage This issue has not yet been reviewed by a maintainer labels Dec 2, 2024
@seancolsen seancolsen added this to the Backlog milestone Dec 2, 2024
@seancolsen
Copy link
Contributor

Thanks for this suggestion @shantanuo. We'll take it under consideration.

@mathemancer
Copy link
Contributor

@shantanuo Is it safe to assume you were trying the "Install from scratch" instructions rather than the docker compose setup? If so, what led you to choose that option?

@shantanuo
Copy link
Author

I used docker compose setup and I was able to install mathesar without any problem. The problem is that I need to log-in to the EC2 instance and then browse from within to access the package. My customers are not able to access it from remote locations using an address like this...

http://ec2-98-82-174-217.compute-1.amazonaws.com:8000

They get the log-in screen. After typing admin and password, get redirected to /db/1/ but the page here is blank.

http://ec2-98-82-174-217.compute-1.amazonaws.com:8000/db/1/

Mathesar is undoubtedly awesome. But it should work for my customers. I am already an expert and can work at postgres command line.

@mathemancer
Copy link
Contributor

Okay, now this is getting interesting. Let me do some experimenting with getting it running using docker compose on AWS and get back to you. If possible, do you mind posting your docker compose and environment files here? It might help me diagnose the issue. Please remove any sensitive information before posting, though.

@shantanuo
Copy link
Author

I guess remote access is not possible on AWS because of security check:
"The ACME server refuses to issue a certificate for this domain name, because it is forbidden by policy"

The steps to reproduce:

  1. I bought t4g.medium instance on spot. I selected ARM based t4g because it is cheaper. You can select any other Ubuntu instance.

  2. Log in using putty from my windows laptop.

  3. Clone the repository and cd into it.

git clone https://github.com/mathesar-foundation/mathesar.git

  1. Copy the .env file by running the following command in the repository's root directory:
    cp .env.example .env

Update the .env file and add the IP address to allowed hosts. For e.g.

ALLOWED_HOSTS='ec2-18-232-180-165.compute-1.amazonaws.com'

  1. From the repository's root directory, run:
    docker compose -f docker-compose.yml -f docker-compose.dev.yml up dev-service

  2. If I login to the Ubuntu instance using RDP client, I can use browser like firefox to access mathesar without any problem. But remote access is not possible. That is the main problem.

  3. I tried this command instead of the command mentioned in step 5

docker compose -f docker-compose.yml up

Now I can not access mathesar even internally. Getting this error:

caddy-reverse-proxy-1 | {"level":"error","ts":1733547140.7813456,"logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"ec2-18-232-180-165.compute-1.amazonaws.com","issuer":"acme-v02.api.letsencrypt.org-directory","error":"HTTP 400 urn:ietf:params:acme:error:rejectedIdentifier - Error creating new order :: Cannot issue for "ec2-18-232-180-165.compute-1.amazonaws.com": The ACME server refuses to issue a certificate for this domain name, because it is forbidden by policy"}

Is it possible to disable the security check? My database is not bank DB. It's just customer name and order details that is public any way :)

@mathemancer
Copy link
Contributor

Aha. There are a number of issues here. Notably, you're running Mathesar in dev mode, and then trying to wire it up to the internet. Try using the instructions on the documentation site:

https://docs.mathesar.org/latest/installation/docker-compose/

These will help you set Mathesar up in production mode. The configuration is a bit different. If you're still having issues with the certificate part (quite possible, since you can't obtain a certificate for that domain), you should prefix the domain with http:// (no s) in the configuration.

@mathemancer mathemancer self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: product approval It's not yet clear that this issue will actually improve Mathesar from a user's perspective restricted: maintainers Only maintainers can resolve this issue type: enhancement New feature or request user reported Reported by a Mathesar user work: installation
Projects
None yet
Development

No branches or pull requests

3 participants