Skip to content

Commit 5ba1b68

Browse files
RoRoJnerda-codes
andauthored
fix(tutorials): batch one (#4026)
* fix(tutorials): batch one * Apply suggestions from code review Co-authored-by: nerda-codes <[email protected]> --------- Co-authored-by: nerda-codes <[email protected]>
1 parent 2a35694 commit 5ba1b68

File tree

3 files changed

+37
-40
lines changed
  • tutorials
    • deploy-hasura-engine-database-postgresql
    • get-started-crossplane-kubernetes
    • upgrade-managed-postgresql-database

3 files changed

+37
-40
lines changed

tutorials/deploy-hasura-engine-database-postgresql/index.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ categories:
1010
- postgresql-and-mysql
1111
hero: assets/scaleway_hasura.webp
1212
dates:
13-
validation: 2024-05-13
13+
validation: 2024-11-25
1414
posted: 2020-07-08
1515
---
1616

@@ -37,19 +37,19 @@ Hasura provides a pre-configured [repository](https://github.com/hasura/graphql-
3737

3838
2. Update the `docker-run.sh` script with your PostgreSQL database credentials:
3939

40-
Open the file in a text editor and locate the `HASURA_GRAPHQL_DATABASE_URL` environment variable. Replace `postgres://username:password@hostname:port/dbname` with your database credentials.
40+
Open the file in a text editor and locate the `HASURA_GRAPHQL_DATABASE_URL` environment variable. Replace `postgres://username:password@hostname:port/dbname` with your database credentials. Choose a value for `youradminsecret` that you will use to log in to the Hasura console in the next section.
4141

4242
```bash
4343
#! /bin/bash
4444
docker run -d -p 8080:8080 \
45-
-e HASURA_GRAPHQL_DATABASE_URL=postgres://youruser:yourpassword@yourhost:5432/yourdatabase \
45+
-e HASURA_GRAPHQL_DATABASE_URL=postgres://youruser:yourpassword@yourhost:5432/dbname \
4646
-e HASURA_GRAPHQL_ENABLE_CONSOLE=true \
4747
-e HASURA_GRAPHQL_ADMIN_SECRET=youradminsecret \
4848
hasura/graphql-engine:latest
4949
```
5050

5151
<Message type="note">
52-
If your database password contains special characters like `@` or `#`, ensure they are [URL-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters).
52+
If your database password contains special characters like `@`, `!`, or `#`, ensure they are [URL-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters). The default `dbname` is `rdb`.
5353
</Message>
5454

5555
3. Run the script:
@@ -67,7 +67,7 @@ Hasura provides a pre-configured [repository](https://github.com/hasura/graphql-
6767
5. Access the Hasura Console by opening `http://localhost:8080/console` in your browser. You need to use the `HASURA_GRAPHQL_ADMIN_SECRET` value to log in.
6868

6969

70-
### Setting Up Your First Tables and Queries
70+
### Setting Up Your first tables and queries
7171

7272
1. Create tables in the Hasura Console:
7373
- Click Data -> Create Table.

tutorials/get-started-crossplane-kubernetes/index.mdx

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tags: crossplane kubernetes
99
categories:
1010
- kubernetes
1111
dates:
12-
validation: 2024-05-13
12+
validation: 2024-11-25
1313
posted: 2023-05-05
1414
---
1515

@@ -35,7 +35,7 @@ In this tutorial, you will learn how to install Upbound Universal Crossplane (UX
3535
Run the following command to download and install the Upbound `up` command-line interface:
3636

3737
```bash
38-
curl -sL "https://cli.upbound.io/stable/up" | sh
38+
curl -sL "https://cli.upbound.io" | sh
3939
sudo mv up /usr/local/bin/
4040
```
4141
<Message type="note">
@@ -53,7 +53,7 @@ Run the following `up uxp install` command to install the latest stable version
5353
You should see an output like the following:
5454

5555
```plaintext
56-
UXP 1.12.0 installed
56+
UXP 1.18.0-up.1 installed
5757
```
5858

5959
## Installing the provider into your Kubernetes cluster
@@ -101,7 +101,7 @@ Run the following `up uxp install` command to install the latest stable version
101101

102102
```
103103
NAME INSTALLED HEALTHY PACKAGE AGE
104-
provider-scaleway True True xpkg.upbound.io/scaleway/provider-scaleway:v0.1.0 11s
104+
provider-scaleway True True xpkg.upbound.io/scaleway/provider-scaleway:v0..0 11s
105105
```
106106

107107
<Message type="note">
@@ -116,13 +116,25 @@ Run the following `up uxp install` command to install the latest stable version
116116

117117
The provider requires credentials to create and manage Scaleway resources.
118118

119-
1. Run the following command to create a `secret.yaml` file in which your Kubernetes secret configuration will be stored:
119+
1. Run the following command to create a `crossplane-system` [namespace](/containers/container-registry/concepts/#namespace):
120+
121+
```
122+
kubectl create namespace crossplane-system --dry-run=client -o yaml | kubectl apply -f -
123+
```
124+
125+
You should get an output similar to the following:
126+
127+
```
128+
namespace/crossplane-system created
129+
```
130+
131+
2. Run the following command to create a `secret.yaml` file in which your Kubernetes secret configuration will be stored:
120132

121133
```
122134
nano secret.yaml
123135
```
124136

125-
2. Edit the request payload you will use to create your Kubernetes secret configuration file. Replace the parameters in the following example using the information in the configuration reference table:
137+
3. Edit the request payload you will use in the `secret.yaml` file, to create your Kubernetes secret. Replace the parameters in the following example using the information in the [configuration reference table](#configuration-reference-table-secret-resource):
126138

127139
```
128140
apiVersion: v1
@@ -146,9 +158,9 @@ The provider requires credentials to create and manage Scaleway resources.
146158
Secret names must be a valid DNS subdomain, meaning they must consist of lowercase alphanumeric characters, hyphens ("-") or periods and must start and end with an alphanumeric character. Underscores ("_") are not permitted.
147159
</Message>
148160

149-
3. Paste the content of the request payload and save the changes by following the information displayed on your terminal.
161+
4. Paste the content of the request payload into the contents of the `secret.yaml` file, and save the changes by following the information displayed on your terminal.
150162

151-
4. Run the following command to create the secret previously defined in the secret.yaml file.
163+
5. Run the following command to create the secret you just defined in the `secret.yaml` file.
152164

153165
```
154166
kubectl apply -f secret.yaml
@@ -160,18 +172,6 @@ The provider requires credentials to create and manage Scaleway resources.
160172
secret/name-of-secret created
161173
```
162174

163-
5. Run the following command to create a `crossplane-system` [namespace](/containers/container-registry/concepts/#namespace):
164-
165-
```
166-
kubectl create namespace crossplane-system --dry-run=client -o yaml | kubectl apply -f -
167-
```
168-
169-
You should get an output similar to the following:
170-
171-
```
172-
namespace/crossplane-system created
173-
```
174-
175175
6. Run the following command to retrieve details about your secret:
176176

177177
```
@@ -182,7 +182,7 @@ The provider requires credentials to create and manage Scaleway resources.
182182
As the information is considered sensitive, the actual secret data will not be returned.
183183
</Message>
184184

185-
### Configuration reference table
185+
### Configuration reference table - secret resource
186186

187187
| Parameter | Description |
188188
| :----------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -204,7 +204,7 @@ Create a `.yaml` configuration file to attach your Scaleway credentials to the p
204204
nano providerconfig
205205
```
206206

207-
2. Edit the request payload you will use to create your `providerconfig` file. Replace the parameters in the following example using the information in the configuration reference table:
207+
2. Edit the request payload you will use to create your `providerconfig` file. Replace the parameters in the following example using the information in the [configuration reference table](#configuration-reference-table-providerconfig):
208208

209209
```
210210
apiVersion: scaleway.upbound.io/v1beta1
@@ -213,14 +213,14 @@ Create a `.yaml` configuration file to attach your Scaleway credentials to the p
213213
name: default
214214
spec:
215215
credentials:
216-
source: Secret
217-
secretRef:
218-
name: name-of-secret
219-
namespace: crossplane-system
220-
key: credentials
216+
source: Secret
217+
secretRef:
218+
name: name-of-secret
219+
namespace: crossplane-system
220+
key: credentials
221221
```
222222

223-
3. Paste the content of the request payload and save the changes by following the information displayed on your terminal.
223+
3. Paste the content of the request payload into the `providerconfig` file, and save the changes by following the information displayed on your terminal.
224224

225225
4. Run the following command to apply the previously set configuration to the secret. Make sure to replace the example file path with your own.
226226

@@ -306,7 +306,7 @@ Create a `.yaml` configuration file to attach your Scaleway credentials to the p
306306
Events: <none>
307307
```
308308

309-
### Configuration reference table
309+
### Configuration reference table - providerconfig
310310

311311
| Parameter | Description |
312312
| :---------- | :----------------------------------------- |

tutorials/upgrade-managed-postgresql-database/index.mdx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ content:
77
paragraph: This page shows how to upgrade your Database for PostgreSQL to the latest version
88
tags: storage PostgreSQL Database rdb
99
dates:
10-
validation: 2024-05-20
10+
validation: 2024-11-25
1111
categories:
1212
- postgresql-and-mysql
1313
---
14-
15-
<Message type="important">
16-
PostgreSQL version 10 reached its End of Life (EoL) on November 10, 2022. It is **recommended** to upgrade your PostgreSQL database engine to the latest available version as soon as possible.
17-
</Message>
14+
1815

1916
[PostgreSQL](https://www.postgresql.org/) is a powerful, open-source object-relational database system with more than 30 years of active development. As major PostgreSQL releases regularly add new features, the layout of the system tables may change. However, the internal data storage format itself rarely changes. This allows you to upgrade a PostgreSQL database system without data loss using the backup and restore functions of the Database API.
2017

@@ -46,7 +43,7 @@ There are three steps to completing a manual migration: creating a new PostgreSQ
4643
</Message>
4744

4845
1. Open the [Scaleway console](https://console.scaleway.com) in a web browser and click **Managed Databases** in the **Storage** section of the side menu. The list of your databases displays.
49-
2. Click **+ Create an Instance**. The [Instance creation wizard](https://console.scaleway.com/rdb/instances/create) displays.
46+
2. Click **+ Create a Database Instance**. The [Database Instance creation wizard](https://console.scaleway.com/rdb/instances/create) displays.
5047
3. Select **PostgreSQL-13** from the drop-down list and fill in the [required information](/managed-databases/postgresql-and-mysql/how-to/create-a-database/) for your new database Instance. Then click **Create an Instance**. Your database is created, and you are redirected to the database dashboard.
5148
<Message type="note">
5249
Ensure your new Database Instance is located in the same geographical region as your old one.

0 commit comments

Comments
 (0)