Skip to content

Commit f808054

Browse files
authored
AWS & DigitalOcean deployment guide updates (#9124)
1 parent 4826352 commit f808054

File tree

2 files changed

+11
-226
lines changed

2 files changed

+11
-226
lines changed

docs/reference/running/deployment/aws_aurora_ecs.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ AWS
66

77
:edb-alt-title: Deploying Gel to AWS
88

9+
.. note::
10+
11+
We recomend using our `helm chart <helm-chart_>`_ to deploy gel on AWS EKS. The
12+
CloudFormation guide below does not configure TLS certificates correctly.
13+
14+
.. _helm-chart:
15+
https://github.com/geldata/helm-charts/blob/main
16+
/charts/gel-server/README.md
17+
918
.. include:: ./note_cloud.rst
1019

1120
In this guide we show how to deploy Gel on AWS using Amazon Aurora and

docs/reference/running/deployment/digitalocean.rst

Lines changed: 2 additions & 226 deletions
Original file line numberDiff line numberDiff line change
@@ -6,229 +6,5 @@ DigitalOcean
66

77
:edb-alt-title: Deploying Gel to DigitalOcean
88

9-
In this guide we show how to deploy Gel to DigitalOcean either with a
10-
One-click Deploy option or a
11-
:ref:`managed PostgreSQL <ref_guide_deployment_digitalocean_managed>`
12-
database as the backend.
13-
14-
.. include:: ./note_cloud.rst
15-
16-
.. include:: ./note_cloud_reset_password.rst
17-
18-
One-click Deploy
19-
++++++++++++++++
20-
21-
Prerequisites
22-
=============
23-
24-
* |gelcmd| CLI (`install <gel-install_>`_)
25-
* DigitalOcean account
26-
27-
Click the button below and follow the droplet creation workflow on
28-
DigitalOcean to deploy a Gel instance.
29-
30-
.. image:: https://www.deploytodo.com/do-btn-blue.svg
31-
:target: 1-click-button_
32-
:width: 225px
33-
34-
.. _1-click-button:
35-
https://marketplace.digitalocean.com/apps/edgedb?refcode=f0b0d77b5d49
36-
37-
By default, the admin password is ``gelpassword``; let's change that to
38-
something more secure. First, find your droplet's IP address on the
39-
`DigitalOcean dashboard <https://cloud.digitalocean.com/droplets>`_ and assign
40-
it to an environment variable ``IP``.
41-
42-
.. _DigitalOcean: https://cloud.digitalocean.com/droplets?
43-
.. _here: gel-install_
44-
45-
.. code-block:: bash
46-
47-
$ IP=<your-droplet-ip>
48-
49-
Then use the ``read`` command to securely assign a value to the ``PASSWORD``
50-
environment variable.
51-
52-
.. code-block:: bash
53-
54-
$ echo -n "> " && read -s PASSWORD
55-
56-
Use these variables to change the password for the default role |admin|.
57-
58-
.. code-block:: bash
59-
60-
$ printf gelpassword | gel query \
61-
--host $IP \
62-
--password-from-stdin \
63-
--tls-security insecure \
64-
"alter role admin set password := '${PASSWORD}'"
65-
OK: ALTER ROLE
66-
67-
.. _ref_guide_deployment_digitalocean_link:
68-
69-
Construct the DSN
70-
-----------------
71-
72-
Let's construct your instance's DSN (also known as a "connection string").
73-
We'll write the value to a file called ``dsn.txt`` so it doesn't get stored in
74-
shell logs.
75-
76-
.. code-block:: bash
77-
78-
$ echo gel://admin:$PASSWORD@$IP > dsn.txt
79-
80-
Copy the value from ``dsn.txt``. Run the following command to open a REPL
81-
to the new instance.
82-
83-
.. code-block:: bash
84-
85-
$ gel --dsn <dsn> --tls-security insecure
86-
gel>
87-
88-
Success! You're now connected to your remote instance.
89-
90-
It's often useful to assign an alias to the remote instance using
91-
:gelcmd:`instance link`.
92-
93-
.. code-block:: bash
94-
95-
$ gel instance link \
96-
--dsn <dsn> \
97-
--trust-tls-cert \
98-
--non-interactive \
99-
my_instance
100-
Authenticating to gel://admin@1.2.3.4:5656/main
101-
Trusting unknown server certificate:
102-
SHA1:1880da9527be464e2cad3bdb20dfc430a6af5727
103-
Successfully linked to remote instance. To connect run:
104-
gel -I my_instance
105-
106-
You can now use the ``-I`` CLI flag to execute commands against your remote
107-
instance:
108-
109-
.. code-block:: bash
110-
111-
$ gel -I my_instance
112-
gel>
113-
114-
115-
.. _ref_guide_deployment_digitalocean_managed:
116-
117-
Deploy with Managed PostgreSQL
118-
++++++++++++++++++++++++++++++
119-
120-
Prerequisites
121-
=============
122-
123-
* |gelcmd| CLI (`install <gel-install_>`_)
124-
* DigitalOcean account
125-
* ``doctl`` CLI (`install <doclt-install_>`_)
126-
* ``jq`` (`install <jq_>`_)
127-
128-
.. _gel-install: https://www.edgedb.com/install
129-
.. _doclt-install: https://docs.digitalocean.com/reference/doctl/how-to/install
130-
.. _jq: https://stedolan.github.io/jq/
131-
132-
133-
Create a managed PostgreSQL instance
134-
====================================
135-
136-
If you already have a PostgreSQL instance you can skip this step.
137-
138-
.. code-block:: bash
139-
140-
$ DSN="$( \
141-
doctl databases create gel-postgres \
142-
--engine pg \
143-
--version 14 \
144-
--size db-s-1vcpu-1gb \
145-
--num-nodes 1 \
146-
--region sfo3 \
147-
--output json \
148-
| jq -r '.[0].connection.uri' )"
149-
150-
151-
Provision a droplet
152-
===================
153-
154-
Replace ``$SSH_KEY_IDS`` with the ids for the ssh keys you want to ssh into the
155-
new droplet with. Separate multiple values with a comma. You can list your
156-
keys with ``doctl compute ssh-key list``. If you don't have any ssh keys in
157-
your DigitalOcean account you can follow `this guide <upload-ssh-keys_>`_ to
158-
add one now.
159-
160-
.. _upload-ssh-keys:
161-
https://docs.digitalocean.com/products/droplets
162-
/how-to/add-ssh-keys/to-account/
163-
164-
.. code-block:: bash
165-
166-
$ IP="$( \
167-
doctl compute droplet create gel \
168-
--image gel \
169-
--region sfo3 \
170-
--size s-2vcpu-4gb \
171-
--ssh-keys $SSH_KEY_IDS \
172-
--format PublicIPv4 \
173-
--no-header \
174-
--wait )"
175-
176-
Configure the backend Postgres DSN. To simplify the initial deployment, let's
177-
instruct Gel to run in insecure mode (with password authentication off and
178-
an autogenerated TLS certificate). We will secure the instance once things are
179-
up and running.
180-
181-
.. code-block:: bash
182-
183-
$ printf "GEL_SERVER_BACKEND_DSN=${DSN} \
184-
\nGEL_SERVER_SECURITY=insecure_dev_mode\n" \
185-
| ssh root@$IP -T "cat > /etc/gel/env"
186-
187-
$ ssh root@$IP "systemctl restart gel.service"
188-
189-
Set the superuser password.
190-
191-
.. code-block:: bash
192-
193-
$ echo -n "> " && read -s PASSWORD
194-
195-
$ gel -H $IP --tls-security insecure query \
196-
"alter role admin set password := '$PASSWORD'"
197-
OK: ALTER ROLE
198-
199-
Set the security policy to strict.
200-
201-
.. code-block:: bash
202-
203-
$ printf "GEL_SERVER_BACKEND_DSN=${DSN} \
204-
\nGEL_SERVER_SECURITY=strict\n" \
205-
| ssh root@$IP -T "cat > /etc/gel/env"
206-
207-
$ ssh root@$IP "systemctl restart gel.service"
208-
209-
210-
.. note::
211-
212-
To upgrade an existing Gel droplet to the latest point release, ``ssh``
213-
into your droplet and run the following.
214-
215-
.. code-block:: bash
216-
217-
$ apt-get update && apt-get install --only-upgrade gel-server-6
218-
$ systemctl restart gel
219-
220-
That's it! Refer to the :ref:`Construct the DSN
221-
<ref_guide_deployment_digitalocean_link>` section above to connect to your
222-
instance.
223-
224-
.. note::
225-
226-
The command groups :gelcmd:`instance` and :gelcmd:`project` are not
227-
intended to manage production instances.
228-
229-
Health Checks
230-
=============
231-
232-
Using an HTTP client, you can perform health checks to monitor the status of
233-
your Gel instance. Learn how to use them with our :ref:`health checks guide
234-
<ref_guide_deployment_health_checks>`.
9+
Create a droplet and use the :ref:`ref_guide_deployment_bare_metal` guide to
10+
install gel server.

0 commit comments

Comments
 (0)