You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorial/markdown/couchbase-server/couchbase-installation-options.md
-15Lines changed: 0 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,6 @@ length: 10 Mins
21
21
---
22
22
23
23
-[Couchbase Capella](#couchbase-capella)
24
-
-[Playground](#playground)
25
24
-[Local Installation](#local-installation)
26
25
-[Container Deployment](#container-deployment)
27
26
-[Cloud Deployment](#cloud-deployment)
@@ -34,20 +33,6 @@ You can sign-up for Couchbase Capella following the link below:
34
33
35
34
-[Deploy with Couchbase Capella](https://developer.couchbase.com/tutorial-capella-sign-up-ui-overview?learningPath=learn/capella)
36
35
37
-
## Playground
38
-
39
-
With Couchbase Playground, developers can get a temporary sandbox Couchbase cluster to experiment for free with no download or installation required for the developer. A web browser is all you need to experiment with various SDKs. Couchbase Playground also enables developers to 'Test-Drive' their Couchbase Capella trial instance with code samples from 9 SDK for many programming languages. Developers can even modify these code examples and run them against a Couchbase database, all from within the browser.
40
-
41
-
Playground works in three different modes:
42
-
43
-
- Zero-friction session-less mode
44
-
- Short-lived sandbox session
45
-
- Long-lived Capella session
46
-
47
-
Try Couchbase Playground now by following the link below:
Couchbase Database Server can be downloaded and installed locally on a developers' machine. The links below will guide you through the installation process in different development machines:
> Note: Maven packages auto restore when building the project in IntelliJ IDEA or Eclipse depending on IDE configuration.
54
+
> Note: Maven automatically restores packages when building the project. in IntelliJ IDEA or Eclipse depending on IDE configuration.
91
55
92
56
### Database Server Configuration
93
57
94
58
- The `CouchbaseConfig` class is a Spring configuration class responsible for setting up the connection to a Couchbase database in a Spring Boot application. It defines two beans:
95
59
96
60
-`getCouchbaseCluster()`: This bean creates and configures a connection to the Couchbase cluster using the provided hostname, username, and password.
97
61
98
-
-`getCouchbaseBucket(Cluster cluster)`: This bean creates a Couchbase bucket within the cluster if it doesn't already exist and returns the Bucket object associated with the specified bucket name.
62
+
-`getCouchbaseBucket(Cluster cluster)`: This bean retrieves a Couchbase bucket from a cluster, ensuring it exists and is ready within a timeout, throwing exceptions if not found or if connection times out.
99
63
100
64
### Application Properties
101
65
102
-
You need to configure the connection details to your Couchbase Server in the application.properties file located in the src/main/resources directory.
66
+
You need to configure the connection details to your Couchbase Server in the `application.properties` file located in the `src/main/resources` directory.
103
67
104
68
In the connection string, replace `DB_CONN_STR` with the connection string of your Couchbase cluster. Replace `DB_USERNAME` and `DB_PASSWORD` with the username and password of a Couchbase user with access to the bucket.
Note: The `application.properties` file has the connection information to connect to your Capella cluster. You can also pass the connection information as environment variables to the Docker container.
@@ -166,7 +130,7 @@ For this tutorial, we use three collections, `airport`, `airline` and `route` th
166
130
167
131
## Airline Document Structure
168
132
169
-
We will be setting up a REST API to manage some airline documents. The `name` field is the name of the airline. The `callsign` field is the callsign of the airline. The `iata` field is the IATA code of the airline. The `icao` field is the ICAO code of the airline. The `country` field is the country of the airline.
133
+
We will be setting up a REST API to manage some airline documents. The `name` field is the name of the airline. The `callsign` field is the callsign of the airline. The `iata` field is the IATA code of the airline. The `icao` field is the ICAO code of the airline. The `country` field is the country of the airline.
170
134
171
135
Our airline document will have a structure similar to the following example:
172
136
@@ -176,7 +140,7 @@ Our airline document will have a structure similar to the following example:
176
140
"callsign": "Couchbase",
177
141
"iata": "CB",
178
142
"icao": "CBA",
179
-
"country": "United States",
143
+
"country": "United States"
180
144
}
181
145
```
182
146
@@ -387,7 +351,7 @@ These workflows illustrate how each HTTP method interacts with the `AirlineServi
387
351
388
352
## Custom SQL++ Queries
389
353
390
-
1. Get all airlines by country
354
+
### 1. Get all airlines by country
391
355
392
356
```java
393
357
@@ -411,7 +375,7 @@ In the query, we are using the `country` parameter to filter the results by coun
411
375
412
376
Once the query is executed, the `AirlineController` constructs an HTTP response with a status code of 200 OK and includes the list of airlines in the response body as a list of JSON objects.
413
377
414
-
2. Get all airlines by destination airport
378
+
### 2. Get all airlines by destination airport
415
379
416
380
```java
417
381
@Override
@@ -437,12 +401,12 @@ Once the query is executed, the `AirlineController` constructs an HTTP response
437
401
438
402
## Running The Tests
439
403
404
+
This command will execute all the test cases in your project.
405
+
440
406
```sh
441
407
mvn test
442
408
```
443
409
444
-
This command will execute all the test cases in your project.
445
-
446
410
### Run Individual Tests:
447
411
448
412
Additionally, you can run individual test classes or methods using the following commands:
@@ -467,9 +431,9 @@ mvn test -Dtest=org.couchbase.quickstart.springboot.controllers.RouteIntegration
467
431
468
432
## Project Setup Notes
469
433
470
-
This project was based on the standard [Spring Boot project](https://spring.io/guides/gs/rest-service/). The HealthCheckController is provided as a santity check and is used in unit tests.
434
+
This project was based on the standard [Spring Boot project](https://spring.io/guides/gs/rest-service/).
471
435
472
-
A full list of packages are referenced in the pom.xml file.
436
+
A full list of packages are referenced in the `pom.xml` file.
0 commit comments