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

Azure deployment guide "az container create" command is missing required environment variable EDGEDB_SERVER_PASSWORD #4863

Closed
rsweeneydev opened this issue Dec 30, 2022 · 0 comments · Fixed by #4864

Comments

@rsweeneydev
Copy link
Contributor

  • EdgeDB Version: 2.9+b1d697b
  • EdgeDB CLI Version: 2.2.6+b869667
  • OS Version: N/A

Steps to Reproduce:

  1. Follow the deployment instructions for Azure in the edgedb docs
  2. Run the final command to link your local machine to the instance. edgedb instance link ...

Expected Result:
The command completes successfully.

Actual Result:
edgedb error: ClientConnectionFailedError: cannot establish connection for 30s: timed out

Looking at the edgedb container logs on Azure shows the following error.

az container attach --resource-group=Development --name=facet-test-edgedb
Container 'facet-test-edgedb' is in state 'Waiting'...
Container 'facet-test-edgedb' is in state 'Running'...
(count: 1) (last timestamp: 2022-12-30 19:01:29+00:00) pulling image "edgedb/edgedb@sha256:97ce358852cfd87a891423efe9f5abb8e864612b15286cb8d320d10b03ab9f3a"
(count: 1) (last timestamp: 2022-12-30 19:01:46+00:00) Successfully pulled image "edgedb/edgedb@sha256:97ce358852cfd87a891423efe9f5abb8e864612b15286cb8d320d10b03ab9f3a"
(count: 3) (last timestamp: 2022-12-30 19:02:41+00:00) Started container
(count: 3) (last timestamp: 2022-12-30 19:02:47+00:00) Killing container with id 8ddec737e4d4a197474ce6f42da19229395c09c9b4ebceaca0e8711a23ac336a.

Start streaming logs:
================================================================
                           ERROR                                
                           -----                                
                                                                
The EdgeDB instance at the specified location is not initialized
and superuser password has not been specified. Please set either
the EDGEDB_SERVER_PASSWORD or the EDGEDB_SERVER_PASSWORD_FILE   
environment variable to a non-empty value.                      
                                                                
For example:                                                    
                                                                
$ docker run -e EDGEDB_SERVER_PASSWORD_FILE=/pass edgedb/edgedb 
                                                                
Alternatively, if doing local development and database security 
is not a concern, set the EDGEDB_SERVER_SECURITY environment    
variable to 'insecure_dev_mode' value, which would disable      
password authentication and let this EdgeDB server use a self-  
signed TLS certificate.

Problem
The problem is that the second az container create command in the guide is missing the EDGEDB_SERVER_PASSWORD environment variable.

Solution

az container create \
  --resource-group $GROUP \
  --name edgedb-container-group \
  --image edgedb/edgedb \
  --dns-name-label edgedb \
  --ports 5656 \
  --secure-environment-variables \
    "EDGEDB_SERVER_PASSWORD=$PASSWORD" \    <-------- This is missing from the guide.
    "EDGEDB_SERVER_BACKEND_DSN=$DSN" \
    "EDGEDB_SERVER_TLS_KEY=$key" \
  --environment-variables \
    "EDGEDB_SERVER_TLS_CERT=$cert"

If you run the fixed command above, everything works as expected.

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 a pull request may close this issue.

1 participant