Skip to content

Commit 08979ea

Browse files
committed
Install: Implement suggestions by CodeRabbit
1 parent b7ef9cf commit 08979ea

File tree

10 files changed

+58
-38
lines changed

10 files changed

+58
-38
lines changed

docs/feature/cloud/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ needs.
6565

6666
:::{rubric} CrateDB Cloud
6767
:::
68-
- {ref}`cloud:index`
6968
- {ref}`Documentation <cloud:index>`
7069
- [Web Console]
7170

docs/install/cloud/aws/aws-terraform-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Deploy using Terraform
44

5-
In {ref}`ec2_setup`, we elaborated on how to leverage EC2's functionality to set
5+
In {ref}`ec2-setup`, we elaborated on how to leverage EC2's functionality to set
66
up a CrateDB cluster. Here, we will explore how to automate this kind of setup.
77

88
[Terraform] is an infrastructure as code tool, often used as an abstraction

docs/install/cloud/aws/s3-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ instances.
2525
2626
### Authentication
2727
28-
It is recommended to restrict the permissions of CrateDB on the S3 to only the
29-
required extend. First, an IAM role is required. This [AWS guide] gives a
28+
It is recommended to restrict the permissions of CrateDB on S3 to only the
29+
required extent. First, an IAM role is required. This [AWS guide] gives a
3030
short description of how to create a policy offer using the CLI or the AWS
3131
management console. Further, access of the snapshot to the S3 bucket needs to
3232
be restricted. An example policy file granting anybody access to a bucket

docs/install/cloud/azure/terraform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Deploy using Terraform
44

5-
In {ref}`azure_vm_setup`, we elaborated on how to leverage Azure's functionality to
5+
In {ref}`azure-vm-setup`, we elaborated on how to leverage Azure's functionality to
66
set up a CrateDB cluster. Here, we will explore how to automate this kind of
77
setup.
88

docs/install/cloud/azure/vm.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ under the *new* left hand panel of the Azure portal.
2323
### Create a network security group
2424

2525
CrateDB uses two ports, one for inter-node communication (`4300`) and one for
26-
it's http endpoint (`4200`), so access to these needs to be opened.
26+
its HTTP endpoint (`4200`), so access to these needs to be opened.
2727

2828
Create a *New Security Group*, giving it a name and assigning it to the
2929
'Resource Group' just created.
@@ -32,7 +32,7 @@ Create a *New Security Group*, giving it a name and assigning it to the
3232
:alt: Create New Security Group
3333
```
3434

35-
Find that security group in your resources list and open it's settings,
35+
Find that security group in your resources list and open its settings,
3636
navigating to the *Inbound security rules* section.
3737

3838
```{image} /_assets/img/install/cloud/azure-nsg-inbound.png
@@ -71,7 +71,7 @@ earlier to the subnet.
7171
### Create virtual machines
7272

7373
Next create virtual machines to act as your CrateDB nodes. In this tutorial, I
74-
chose two low-specification Ubuntu 14.04 servers, but you likely have your own
74+
chose two low-specification Ubuntu servers, but you likely have your own
7575
preferred configurations.
7676

7777
Most importantly, make sure you select the Virtual Network created earlier.
@@ -142,14 +142,14 @@ the same steps as for Azure and Linux.
142142
### Create virtual machines
143143

144144
Similar steps to creating Virtual Machines for Azure and Linux, but create the
145-
VM based on the 'Windows Server 2012 R2 Datacenter' image.
145+
VM based on a recent "Windows Server LTS" image.
146146

147147
### Install CrateDB
148148

149149
*Note that these instructions should be followed on each VM in your cluster.*
150150

151151
To install CrateDB on Windows Server, you will need a [Java JDK installed].
152-
Ensure that the `JAVA*HOME` environment variable is set.
152+
Ensure that the `JAVA_HOME` environment variable is set.
153153

154154
```{image} /_assets/img/install/cloud/azure-envvar.png
155155
:alt: Environment Variables
@@ -171,7 +171,7 @@ We need to allow the ports CrateDB uses through the Windows Firewall
171171
:alt: Firewall configuration
172172
```
173173

174-
Start crate by running `bin/crate`.
174+
Start CrateDB by running `.\bin\crate.bat` (PowerShell) or `bin\crate.bat` (CMD).
175175

176176
[3.3]: https://github.com/crate/crate/blob/3.3/blackbox/docs/config/cluster.rst#discovery
177177
[java jdk installed]: https://www.oracle.com/java/technologies/downloads/#java8

docs/install/container/docker.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ The official [CrateDB Docker image].
2222

2323
## Quick start
2424

25+
(container-create-cluster)=
26+
2527
### Creating a cluster
2628

2729
To get started with CrateDB and Docker, you will create a three-node cluster
@@ -55,7 +57,7 @@ container `crate03` will run cluster node `crate03`.
5557

5658
You can then create your first CrateDB container and node, like this:
5759

58-
```
60+
```shell
5961
sh$ docker run --rm -d \
6062
--name=crate01 \
6163
--net=crate \
@@ -250,7 +252,8 @@ The CrateDB Shell, `crash`, is bundled with the Docker image.
250252

251253
If you wanted to run `crash` inside a user-defined network called `crate`
252254
and connect to three hosts named `crate01`, `crate02`, and `crate03`
253-
(i.e. the example covered in the [Creating a Cluster] section) you could run:
255+
(i.e. the example covered in the {ref}`container-create-cluster` section)
256+
you could run:
254257

255258
```shell
256259
$ docker run --rm -ti \
@@ -470,7 +473,7 @@ example:
470473
```shell
471474
$ docker run -d \
472475
--cpus 1.5 \
473-
--memory 1g \
476+
--memory 2g \
474477
--env CRATE_HEAP_SIZE=1g \
475478
crate \
476479
crate -Cnetwork.host=_site_

docs/install/container/kubernetes/kubernetes.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
CrateDB and Kubernetes are a great match.
77
:::
88

9-
CrateDB’s [horizontally scalable] `shared-nothing architecture` lends itself
9+
CrateDB’s [horizontally scalable] [shared-nothing architecture] lends itself
1010
well to [containerization].
1111

1212
[Kubernetes] is an open-source container orchestration system for the
@@ -15,8 +15,8 @@ management, deployment, and scaling of containerized systems.
1515
Together, Docker and Kubernetes are a fantastic way to deploy and scale CrateDB.
1616

1717
:::{NOTE}
18-
While Kubernetes works with a variety of container technologies, this
19-
document only covers its use with Docker.
18+
While Kubernetes supports multiple container runtimes, this document
19+
uses Docker-compatible container images.
2020
:::
2121

2222
:::{SEEALSO}
@@ -41,7 +41,7 @@ You can create a resource like so:
4141

4242
```console
4343
sh$ kubectl create -f crate-controller.yaml --namespace crate
44-
statefulset.apps/crate-controller created
44+
statefulset.apps/crate created
4545
```
4646

4747
Here, we are creating a [StatefulSet] controller in the `crate` namespace
@@ -149,6 +149,12 @@ load balancers.
149149
For local development, [Minikube] provides a LoadBalancer service.
150150
:::
151151
152+
:::{WARNING}
153+
Ensure proper network controls and authentication are in place before
154+
exposing ports 4200 (HTTP) and 5432 (PostgreSQL) via a LoadBalancer.
155+
Restrict source IPs and configure users/roles to avoid unauthorized access.
156+
:::
157+
152158
### Controller
153159
154160
A Kubernetes [pod] is a group of one or more containers. Pods are designed to
@@ -213,7 +219,7 @@ spec:
213219
# Use the CrateDB 5.1.1 Docker image.
214220
image: crate:5.1.1
215221
# Pass in configuration to CrateDB via command-line options.
216-
# We are setting the name of the node's explicitly, which is
222+
# We are setting the node name explicitly, which is
217223
# needed to determine the initial master nodes. These are set to
218224
# the name of the pod.
219225
# We are using the SRV records provided by Kubernetes to discover
@@ -228,7 +234,7 @@ spec:
228234
- -Cgateway.expected_data_nodes=${EXPECTED_NODES}
229235
- -Cpath.data=/data
230236
volumeMounts:
231-
# Mount the `/data` directory as a volume named `data`.
237+
# Mount the `/data` directory as a volume named `data`.
232238
- mountPath: /data
233239
name: data
234240
resources:
@@ -247,7 +253,7 @@ spec:
247253
name: postgres
248254
# Environment variables passed through to the container.
249255
env:
250-
# This is variable is detected by CrateDB.
256+
# This variable is detected by CrateDB.
251257
- name: CRATE_HEAP_SIZE
252258
value: "256m"
253259
# The rest of these variables are used in the command-line
@@ -333,34 +339,31 @@ You can then use this in your controller configuration with something like this:
333339
[...]
334340
volumeClaimTemplates:
335341
- metadata:
336-
name: persistant-data
342+
name: cratedb-data
337343
spec:
338344
# This will create one 100GB read-write Azure Managed Disks volume
339345
# for every CrateDB pod.
340346
accessModes: [ "ReadWriteOnce" ]
341347
storageClassName: crate-premium
342348
resources:
343349
requests:
344-
storage: 100g
350+
storage: 100Gi
345351
```
346352

347353
[azure managed disks]: https://azure.microsoft.com/en-us/pricing/details/managed-disks/
348354
[configuration]: https://kubernetes.io/docs/concepts/configuration/overview/
349355
[containerization]: https://www.docker.com/resources/what-container
350356
[cratedb docker image]: https://hub.docker.com/_/crate/
351-
[docker]: https://www.docker.com/
352357
[horizontally scalable]: https://en.wikipedia.org/wiki/Scalability#Horizontal_(scale_out)_and_vertical_scaling_(scale_up)
353358
[ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/
354359
[kubernetes]: https://kubernetes.io/
355360
[loadbalancer]: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
356361
[managed]: https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/
357362
[minikube]: https://kubernetes.io/docs/setup/minikube/
358-
[persistent volume]: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
359363
[persistent volumes]: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
360364
[pod]: https://kubernetes.io/docs/concepts/workloads/pods/
361365
[rolling update strategy]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#rolling-updates
362366
[service]: https://kubernetes.io/docs/concepts/services-networking/service/
363-
[services]: https://kubernetes.io/docs/concepts/services-networking/service/
364367
[setting up your first cratedb cluster on kubernetes]: https://cratedb.com/blog/run-your-first-cratedb-cluster-on-kubernetes-part-one
365368
[shared-nothing architecture]: https://en.wikipedia.org/wiki/Shared-nothing_architecture
366369
[statefulset]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/

docs/install/debian-ubuntu.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
(install-debian)=
55
(install-ubuntu)=
66

7-
# CrateDB on Debian, Ubuntu, and Derivates
7+
# CrateDB on Debian, Ubuntu, and Derivatives
88

99
:::{div} sd-text-muted
1010
Install CrateDB [deb] packages using the [apt] package manager.
1111
:::
1212

13-
This installation method is suitable for Debian systems and derivates
13+
This installation method is suitable for Debian systems and derivatives
1414
like Ubuntu.
1515

1616
## Package repository
@@ -63,7 +63,7 @@ sh$ sudo systemctl start crate
6363

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

66-
```
66+
```text
6767
http://localhost:4200/
6868
```
6969

docs/install/redhat.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
(install-redhat)=
44
(install-suse)=
55

6-
# CrateDB on Red Hat, SUSE, and Derivates
6+
# CrateDB on Red Hat, SUSE, and Derivatives
77

88
:::{div} sd-text-muted
99
Install CrateDB [RPM] packages using the [DNF], [YUM], or [ZYpp] package managers.
1010
:::
1111

12-
This installation method is suitable for RedHat Enterprise Linux (RHEL) and compatible
13-
systems like Fedora, CentOS, Rocky Linux, AlmaLinux, AWS Linux, Oracle Linux, or
12+
This installation method is suitable for Red Hat Enterprise Linux (RHEL) and compatible
13+
systems like Fedora, CentOS, Rocky Linux, AlmaLinux, Amazon Linux, Oracle Linux, or
1414
Scientific Linux. Installation also works on openSUSE and SUSE Linux Enterprise Server
1515
(SLES) systems.
1616

1717
## Package repository
1818

1919
To register with the CrateDB package repository, create a file called `cratedb.repo`
20-
in the `/etc/yum.repos.d/` directory for RedHat based distributions, or in the
21-
`/etc/zypp/repos.d/` directory for OpenSuSE based distributions, containing:
20+
in the `/etc/yum.repos.d/` directory for Red Hat based distributions, or in the
21+
`/etc/zypp/repos.d/` directory for openSUSE-based distributions, containing:
2222

2323
```ini
2424
[cratedb-ce-stable]
@@ -50,6 +50,19 @@ the repository as indicated in the sample installation command below.
5050
CrateDB provides both *stable release* and *testing release* channels. You
5151
can read more about the [release workflow].
5252

53+
## Prerequisites
54+
55+
If `sudo` is missing, run this as root:
56+
```shell
57+
# Red Hat-compatible systems
58+
dnf install sudo
59+
```
60+
or:
61+
```shell
62+
# SUSE-based systems
63+
zypper install sudo
64+
```
65+
5366
## Install CrateDB
5467

5568
With everything set up, you can install CrateDB:
@@ -60,7 +73,7 @@ sudo dnf install --enablerepo=cratedb-ce-stable crate
6073

6174
:::{TIP}
6275
On older Red Hat and CentOS installations, please use the `yum` command
63-
instead of `dnf`. On SUSE based installations, please use the `zypper`
76+
instead of `dnf`. On SUSE-based installations, please use the `zypper`
6477
command.
6578
:::
6679

@@ -76,9 +89,6 @@ to do it on the first installation of CrateDB, you can also import it
7689
into your repository keyring, like that:
7790

7891
```shell
79-
# Install prerequisites.
80-
yum install sudo
81-
8292
# Import the public GPG key for verifying the package signatures.
8393
sudo rpm --import https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate
8494
```

docs/install/windows.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ us][contact us] so we can work with you on a solution.
1616
command-line shell or by using a GUI tool like [7-Zip]. We recommend
1717
using [PowerShell] when using terminal:
1818

19+
```powershell
20+
# Extract Zip archive
21+
Expand-Archive -Path .\crate-*.zip -DestinationPath .
22+
```
23+
1924
```doscon
2025
# Extract Zip archive
2126
unzip -o crate-*.zip

0 commit comments

Comments
 (0)