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

Content: Forward-port changes from crate-tutorials repository #13

Merged
merged 4 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/getting-started/create-user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Grant all privileges to the newly created user:

Now try navigating to the :ref:`crate-admin-ui:index` in your browser. In the URL
below, please replace ``cratedb.example.org`` with the host name or IP address
of the machine CreateDB is running on and sign in with your newly created user
of the machine CrateDB is running on and sign in with your newly created user
account::

http://cratedb.example.org:4200/
Expand Down
2 changes: 2 additions & 0 deletions docs/handbook/clustering/logical-replication-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ sake of simplicity, we will refer to the two clusters as
--detach \
--publish 4201:4200 \
--publish 5433:5432 \
--env CRATE_HEAP_SIZE=1g \
crate:latest \
-Cdiscovery.type=single-node
sh$ docker run \
--name cluster-subscribing \
--detach \
--publish 4202:4200 \
--publish 5434:5432 \
--env CRATE_HEAP_SIZE=1g \
crate:latest \
-Cdiscovery.type=single-node

Expand Down
14 changes: 12 additions & 2 deletions docs/install/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ Environment Variables
=====================

For the vanilla package-based setup flavor, the CrateDB startup script reads
:ref:`crate-reference:conf-env` from the ``/etc/default/crate`` file on Debian systems.
On RPM systems, the ``/etc/sysconfig/crate`` file is used.
:ref:`crate-reference:conf-env` from the ``/etc/default/crate`` file as
environment variables.

.. Note::

RPM packages of CrateDB versions up to `5.2.11`_, `5.3.8`_, `5.4.7`_
and `5.5.2`_ are using the ``/etc/sysconfig/crate`` file instead.

When using the :ref:`install-adhoc` setup, or the :ref:`Microsoft Windows <windows-install>`
setup, the environment variables will be defined by ``bin/crate{.sh,.bat}`` relative to the
Expand All @@ -50,4 +55,9 @@ Here is an example::
CRATE_USE_IPV4=true



.. _5.2.11: https://cratedb.com/docs/crate/reference/en/latest/appendices/release-notes/5.2.11.html
.. _5.3.8: https://cratedb.com/docs/crate/reference/en/latest/appendices/release-notes/5.3.8.html
.. _5.4.7: https://cratedb.com/docs/crate/reference/en/latest/appendices/release-notes/5.4.7.html
.. _5.5.2: https://cratedb.com/docs/crate/reference/en/latest/appendices/release-notes/5.5.2.html
.. _sources: https://en.wikipedia.org/wiki/Source_(command)
17 changes: 9 additions & 8 deletions docs/install/container/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ You can then create your first CrateDB container and node, like this::
--name=crate01 \
--net=crate \
-p 4201:4200 \
--env CRATE_HEAP_SIZE=2g \
--env CRATE_HEAP_SIZE=1g \
crate -Cnetwork.host=_site_ \
-Cnode.name=crate01 \
-Cdiscovery.seed_hosts=crate02,crate03 \
Expand Down Expand Up @@ -148,7 +148,7 @@ Now add the second node, ``crate02``, to the cluster::
--name=crate02 \
--net=crate \
-p 4202:4200 \
--env CRATE_HEAP_SIZE=2g \
--env CRATE_HEAP_SIZE=1g \
crate -Cnetwork.host=_site_ \
-Cnode.name=crate02 \
-Cdiscovery.seed_hosts=crate01,crate03 \
Expand All @@ -175,7 +175,7 @@ You can now add ``crate03`` like this::
sh$ docker run --rm -d \
--name=crate03 \
--net=crate -p 4203:4200 \
--env CRATE_HEAP_SIZE=2g \
--env CRATE_HEAP_SIZE=1g \
crate -Cnetwork.host=_site_ \
-Cnode.name=crate03 \
-Cdiscovery.seed_hosts=crate01,crate02 \
Expand Down Expand Up @@ -217,7 +217,7 @@ can be bypassed by passing the ``-Cnode.store.allow_mmap=false`` option to
the ``crate`` command::

sh$ docker run -d --name=crate01 \
--net=crate -p 4201:4200 --env CRATE_HEAP_SIZE=2g \
--net=crate -p 4201:4200 --env CRATE_HEAP_SIZE=1g \
crate -Cnetwork.host=_site_ \
-Cnode.store.allow_mmap=false

Expand All @@ -230,7 +230,7 @@ You can also start a single node without any bootstrap checks by passing the

sh$ docker run -d --name=crate01 \
--net=crate -p 4201:4200 \
--env CRATE_HEAP_SIZE=2g \
--env CRATE_HEAP_SIZE=1g \
crate -Cnetwork.host=_site_ \
-Cdiscovery.type=single-node

Expand Down Expand Up @@ -377,7 +377,7 @@ per host machine.
If you are running one container per machine, you can map the container ports
to the host ports so that the host acts like a native installation. For example::

$ docker run -d -p 4200:4200 -p 4300:4300 -p 5432:5432 crate \
$ docker run -d -p 4200:4200 -p 4300:4300 -p 5432:5432 --env CRATE_HEAP_SIZE=1g crate \
crate -Cnetwork.host=_site_


Expand All @@ -389,7 +389,7 @@ and go, and any data inside them is lost when the container is removed. For
this reason, you should mount a persistent ``data`` directory on your host
machine to the ``/data`` directory inside the container::

$ docker run -d -v /srv/crate/data:/data crate \
$ docker run -d -v /srv/crate/data:/data --env CRATE_HEAP_SIZE=1g crate \
crate -Cnetwork.host=_site_

Here, ``/srv/crate/data`` is an example path, and should be replaced with the
Expand All @@ -409,7 +409,8 @@ removed.
Here is an example of how you could mount the ``crate.yml`` config file::

$ docker run -d \
-v /srv/crate/config/crate.yml:/crate/config/crate.yml crate \
-v /srv/crate/config/crate.yml:/crate/config/crate.yml \
--env CRATE_HEAP_SIZE=1g crate \
crate -Cnetwork.host=_site_

Here, ``/srv/crate/config/crate.yml`` is an example path, and should be
Expand Down
2 changes: 1 addition & 1 deletion docs/install/container/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ horizontally scalable architecture that lends itself well to containerization.
In order to spin up a container using the most recent stable version of the
official `CrateDB Docker image`_, use::

docker run --publish=4200:4200 --publish=5432:5432 --pull=always crate
docker run --publish=4200:4200 --publish=5432:5432 --env CRATE_HEAP_SIZE=1g --pull=always crate

.. TIP::

Expand Down
42 changes: 25 additions & 17 deletions docs/install/debian-ubuntu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,22 @@ the CrateDB package repository::
sudo apt install --yes apt-transport-https apt-utils curl gnupg lsb-release

# Import the public GPG key for verifying the package signatures.
curl -sS https://cdn.crate.io/downloads/deb/DEB-GPG-KEY-crate | sudo tee /etc/apt/trusted.gpg.d/cratedb.asc
curl -sS https://cdn.crate.io/downloads/debian/DEB-GPG-KEY-crate | \
sudo tee /etc/apt/trusted.gpg.d/cratedb.asc

# Compute CrateDB package repository location.
[[ $(lsb_release --id --short) = "Debian" ]] && repository="apt"
[[ $(lsb_release --id --short) = "Ubuntu" ]] && repository="deb"
distribution=$(lsb_release --codename --short)

# Register with the CrateDB package repository.
echo "deb [signed-by=/etc/apt/trusted.gpg.d/cratedb.asc arch=amd64] https://cdn.crate.io/downloads/${repository}/stable/ ${distribution} main" \
| sudo tee /etc/apt/sources.list.d/cratedb.list
# Add CrateDB repository to Apt
echo "deb https://cdn.crate.io/downloads/debian/stable/ default main" | \
sudo tee /etc/apt/sources.list.d/crate-stable.list
Comment on lines +29 to +31
Copy link
Member Author

Choose a reason for hiding this comment

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

New Debian repository location is https://cdn.crate.io/downloads/debian/.


.. NOTE::

CrateDB provides both *stable release* and *testing release* channels. To
use the testing channel, replace ``stable`` with ``testing`` in the command
line above. You can read more about the `release workflow`_.

The walkthrough is based on the ``sudo`` program. If it is not installed on
your machine, run ``apt update; apt install --yes sudo`` as a ``root`` user.
CrateDB provides two repositories. A *stable* and a *testing* repository. To use
the testing repository, replace ``stable`` with ``testing`` in the command
above. You can read more about our `release workflow`_.

Now, update the package sources::

sudo apt update
sh$ sudo apt update

You should see a success message. This indicates that the CrateDB package
repository is correctly registered.
Expand All @@ -55,7 +48,22 @@ Install CrateDB

With everything set up, you can install CrateDB::

sudo apt install crate
sh$ sudo apt install crate

After the installation is finished, you can start the ``crate`` service::

sh$ sudo systemctl start crate

Once the service is up and running, you can access CrateDB by visiting::

http://localhost:4200/


Configure CrateDB
=================

Please visit the :ref:`install-configure` documentation section to learn
about the location and meaning of CrateDB's configuration files.


.. include:: _control-linux.rst
Expand Down
8 changes: 8 additions & 0 deletions docs/install/redhat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ With everything set up, you can install CrateDB::
sudo yum install crate


Configure CrateDB
=================

Please visit the :ref:`install-configure` documentation section to learn
about the location and meaning of CrateDB's configuration files.



.. include:: _control-linux.rst
.. include:: _post-install.rst

Expand Down
Loading