Solved

Can I use my own domain name with GoodData.CN (evaluation)


  • Known Participant
  • 22 replies

Hi All! Let me provide more details on my question in previous old topic (apparently it was related to hosted GoodData, not cloud-native).

I’ve just installed GoodData.CN on AWS EC2 instance using docker container using the following docker-compose.yml file:

services:
gooddata:
image: gooddata/gooddata-cn-ce
container_name: gooddata-dev
restart: always
environment:
- LICENSE_AND_PRIVACY_POLICY_ACCEPTED=YES
ports:
- 3000:3000
- 5432:5432
volumes:
- ./data:/data

I also have a new domain for this with certificate, let’s say it’s gooddata-dev.example.com. This domain is served by nginx on the same server with the following config:

server {
listen 80;
server_name gooddata-dev.example.com;

#Rewrite all nonssl requests to ssl.
return 301 https://$host$request_uri;
}

server {
listen 443 ssl;
server_name gooddata-dev.example.com;

ssl_certificate /etc/ssl/example.crt;
ssl_certificate_key /etc/ssl/example.key;

location / {

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

proxy_pass http://127.0.0.1:3000;
proxy_read_timeout 90;
proxy_http_version 1.1;
}
}

Now, docker container starts okay, but when I try to navigate to https://gooddata-dev.example.com I get the following error:

{"title":"Not Found","status":404,"detail":"404 NOT_FOUND \"Hostname is not registered\"; nested exception is errorType=com.gooddata.tiger.grpc.error.GrpcPropagatedClientException, message=No organization found for hostname gooddata-dev.example.com,<no detail>","traceId":"911bacdd37104e6d"}

How can I “register” my domain name “gooddata-dev.example.com” ?

Best regards, Nick.

icon

Best answer by Martin Svadlenka 30 April 2021, 09:55

View original

14 replies

Userlevel 2

Hi Nick,

we have not planned to support custom host names in GoodData.CN Community Edition. It should serve only evaluation purposes on localhost (your laptop).

In May we are going to release a Kubernetes deployment. In this deployment it will be  mandatory to create an organization with custom host name. It is already documented here:

https://www.gooddata.com/developers/cloud-native/doc/latest/administration/organization/

Regards

  Jan

 

Hi Jan,

So you only provide evaluation for personal use and not for teams, correct?

Regards, Nick.

Ah, nevermind. I figured out how to fix this with nginx:

# Add some buffers because GoodData sends a lot of data in HTTP headers
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;

# Redirect HTTP to HTTPS
server {
listen 80;
server_name gooddata-dev.example.com;

#Rewrite all nonssl requests to ssl.
return 301 https://$host$request_uri;
}

server {
listen 443 ssl;
server_name gooddata-dev.example.com;

# Path to SSL certificate and private key
ssl_certificate /etc/ssl/example.crt;
ssl_certificate_key /etc/ssl/example.key;


location / {
proxy_pass http://localhost:3000;
proxy_read_timeout 90;
# Replace HTTP Location URI with our domain
proxy_redirect http://localhost:3000/ https://gooddata-dev.example.com/;

proxy_http_version 1.1;
}
}

I wonder why do you even check for hostname? You obviously cannot use this as any matter of restriction.

If you want to restrict evaluation usage, I’d suggest to just use license key. Just make a very simple process of obtaining an evaluation license key and clients would be very grateful!

Regards, Nick.

Userlevel 2

Hi Nick,

it seems you successfully worked around the hostname issue. Honestly, this was not meant as an intentional obstacle (that you could bypass within a couple of hours anyway 😉 ). The whole image was primarily intended for local development and evaluation. That’s the reason why there’s basically no security, TLS, and similar stuff. There is one default organization already created, just to make the onboarding process as simple as possible. 

 

Kind regards and GoodLuck, Robert

 

Thank you, Robert!

I just wonder if you’re going to add more deployment options here.

It seems like you currently have only two:

  1. Install on a laptop (localhost) and for personal evaluation use only.
  2. Deploy to K8s for production.

What about development teams, how are they supposed to work together teamwisely?

Hi Nick,
Thanks for the questions.
For the large scale projects development purposes i believe there are currently 2 options.

  1. Use Community edition installed either on laptops or in public cloud account while keep all the application content definitions in JSON format (workspaces, metrics, filters etc.) in your team repository and accessible to the whole team to edit. The GD.CN is ready for this use case due to declarative layer.
  2. Use the k8s deployment once it is launched. You can manage multiple deployments in any tier, one dedicated for DEV, QA, PROD etc.

Regards,

M.

Ok, that’s exactly what I had in mind. I was just confused by “Host is not registered” error when I tried to deploy GD.CN in the public cloud. Now as I understood this was not an intentional obstacle but rather a bug and GD.CN CE can be used for such deployments. Thank you.

Userlevel 2

“Host is not registered” error simply means that your domain gooddata-dev.example.com is not configured within the running container for any Organization (remember there’s just one Organization in GD.CN CE, registered/configured for “localhost” domain).

Therefore the application could not process your incoming request as it could not decide which Organization should be used. As soon as you reconfigured your reverse proxy to send “localhost” as the Host header (and translated all redirects as well), it suddenly started working.

TL;DR: This is not a bug, the hostname is important for choosing the tenant in our internal configuration. It’s basically the same principle how Github pages work (tenant.github.io, other.github.io, and so on).

Does it make more sense, now, Nick?

Hi, Robert! Well now it does make sense finally! :-)

I think the error text should be a bit more clear like “No Organization/tenant found for hostname XXXX”, so that when you get it, you could have an idea where to look further.

Thank you!

To clear things up, how can I change domain name for default organization? Any API call for that?

Userlevel 2

Hi @NickK.

Changing of hostname is currently not supported in GoodData.CN Community Edition and it is unknown, if it will be ever supported. The purpose of the Community Edition is to try GoodData.CN on your workstation or for developers to develop on their workstation for production version.

You can use any hostname of your choice in the GoodData.CN Free, Growth, Enterprise. They are versions for production use cases. These versions will be released soon. Please stay tuned for updates!

API documentation is available here: https://www.gooddata.com/developers/cloud-native/doc/latest/api/api_reference_all/

Best.

Martin

Userlevel 2

Please see the description of the various versions/plans: https://www.gooddata.com/developers/cloud-native/#plans

Sorry, I don’t get it :-(
Are you saying each developer must work separately with his own data model?… or…?

Userlevel 2

Changing the organization hostname will be possible in Kubernetes deployment of GoodData.CN by modifying the “Organization” custom resource responsible for the whole organization lifecycle.

In standalone Docker deployment of GoodData.CN Community Edition this change is not possible. There’s a single hostname (“localhost”) that serves as an endpoint for the pre-created organization. This limitation can be worked around by putting the docker container behind a well-configured reverse proxy, as you have already shown in some of your previous comments. 

This configuration allows you to expose the container to your teammates so you can collaborate on this shared environment. 

Some future versions of GoodData.CN CE would natively support a custom hostname, but this is not our priority at this moment because we are laser-focused on the upcoming Kubernetes deployment release.

Regards,

Robert

Reply