Skip to content

Commit 0c5a46b

Browse files
authored
quickstart docs: improve styling (#973)
1 parent 9a01ea7 commit 0c5a46b

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

docs/src/modules/java/pages/quickstart/cr-value-entity-java.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ If you want to bypass writing code and jump straight to the deployment:
2525
. Skip to <<Package and deploy your service>>.
2626
====
2727

28-
2928
== Writing the Customer Registry
3029

3130
. From the command line, create a directory for your project.
@@ -119,7 +118,6 @@ include::example$java-customer-registry-quickstart/src/main/proto/customer/api/c
119118

120119
The `customer_domain.proto` contains all the internal data objects (https://docs.kalix.io/reference/glossary.html#entity[Entities, window="new"]). The https://docs.kalix.io/reference/glossary.html#value_entity[Value Entity, window="new"] in this quickstart is a Key/Value store that stores only the latest updates.
121120

122-
123121
. Create a `customer_domain.proto` file and save it in the `src/main/proto/customer/domain` directory.
124122

125123
. Add declarations for the proto syntax and domain package.
@@ -143,6 +141,7 @@ include::example$java-customer-registry-quickstart/src/main/proto/customer/domai
143141

144142
. Run `mvn compile` from the project root directory to generate source classes in which you add business logic.
145143
+
144+
[source,command line]
146145
----
147146
mvn compile
148147
----
@@ -162,7 +161,7 @@ include::example$java-customer-registry-quickstart/src/main/java/customer/domain
162161
----
163162
+
164163
* The incoming message contains the request data from your client and the command handler updates the state of the customer.
165-
* The `convertToDomain` and `convertAddressToDomain` methods convert the incoming request to your domain model.
164+
* The `convertToDomain` methods convert the incoming request to your domain model.
166165

167166
. Modify the `getCustomer` method as follows to handle the `GetCustomerRequest` command:
168167
+
@@ -188,18 +187,21 @@ To build and publish the container image and then deploy the service, follow the
188187

189188
. If you haven't done so yet, sign in to your Kalix account. If this is your first time using Kalix, this will let you register an account, https://docs.kalix.io/projects/create-project.html[create your first project], and set this project as the default.
190189
+
190+
[source,command line]
191191
----
192192
kalix auth login
193193
----
194194

195195
. Use the `deploy` target to build the container image, publish it to the container registry as configured in the `pom.xml` file, and then automatically https://docs.kalix.io/services/deploy-service.html#_deploy[deploy the service] to Kalix using `kalix`:
196196
+
197+
[source,command line]
197198
----
198199
mvn deploy
199200
----
200201

201202
. You can https://docs.kalix.io/services/deploy-service.html#_verify_service_status[verify the status of the deployed service] using:
202203
+
204+
[source,command line]
203205
----
204206
kalix service list
205207
----
@@ -208,6 +210,7 @@ kalix service list
208210

209211
Once the service has started successfully, you can https://docs.kalix.io/services/invoke-service.html#_testing_and_development[start a proxy locally] to access the service:
210212

213+
[source,command line]
211214
----
212215
kalix service proxy <service name> --grpcui
213216
----
@@ -218,6 +221,7 @@ Or you can use command line gRPC or HTTP clients, such as `grpcurl` or `curl`, t
218221

219222
A customer can be created using the `Create` method on `CustomerService`, in the gRPC web UI, or with `grpcurl`:
220223

224+
[source,command line]
221225
----
222226
grpcurl \
223227
-d '{
@@ -235,6 +239,7 @@ grpcurl \
235239

236240
The `GetCustomer` method can be used to retrieve this customer, in the gRPC web UI, or with `grpcurl`:
237241

242+
[source,command line]
238243
----
239244
grpcurl \
240245
-d '{"customer_id": "abc123"}' \
@@ -244,6 +249,7 @@ grpcurl \
244249

245250
You can https://docs.kalix.io/services/invoke-service.html#_exposing_services_to_the_internet[expose the service to the internet]. A generated hostname will be returned from the expose command:
246251

252+
[source,command line]
247253
----
248254
kalix service expose <service name>
249255
----

docs/src/modules/java/pages/quickstart/cr-value-entity-scala.adoc

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Learn how to create a customer registry in Scala, package it into a container, a
77

88
== Before you begin
99

10-
* Install the https://docs.kalix.io/kalix/install-kalix.html[Kalix CLI, window="new-doc"] to deploy from a terminal window.
10+
* If you're new to Kalix, {console}[create an account, window="console"] so you can try out Kalix for free.
11+
* You'll also need to install the https://docs.kalix.io/kalix/install-kalix.html[Kalix CLI, window="new-doc"] to deploy from a terminal window.
1112
* For this quickstart, you'll also need
1213
** https://docs.docker.com/engine/install[Docker {minimum_docker_version} or higher, window="new"]
1314
** Java {java-version} or higher
@@ -124,7 +125,6 @@ include::example$scala-customer-registry-quickstart/src/main/proto/customer/api/
124125
include::example$scala-customer-registry-quickstart/src/main/proto/customer/api/customer_api.proto[tag=method-messages]
125126
----
126127

127-
128128
== Define the domain model
129129

130130
The `customer_domain.proto` contains all the internal data objects (https://docs.kalix.io/reference/glossary.html#entity[Entities, window="new"]). The https://docs.kalix.io/reference/glossary.html#value_entity[Value Entity, window="new"] in this quickstart is a Key/Value store that stores only the latest updates.
@@ -149,6 +149,7 @@ include::example$scala-customer-registry-quickstart/src/main/proto/customer/doma
149149

150150
. Run `sbt compile` from the project root directory to generate source classes in which you add business logic.
151151
+
152+
[source,command line]
152153
----
153154
sbt compile
154155
----
@@ -168,7 +169,7 @@ include::example$scala-customer-registry-quickstart/src/main/scala/customer/doma
168169
----
169170
+
170171
* The incoming message contains the request data from your client and the command handler updates the state of the customer.
171-
* The `convertToDomain` and `convertAddressToDomain` methods convert the incoming request to your domain model.
172+
* The `convertToDomain` methods convert the incoming request to your domain model.
172173

173174
. Modify the `getCustomer` method as follows to handle the `GetCustomerRequest` command:
174175
+
@@ -194,24 +195,28 @@ To build and publish the container image and then deploy the service, follow the
194195

195196
. Use the `Docker/publish` task to build the container image and publish it to your container registry. At the end of this command sbt will show you the container image URL you'll need in the next part of this quickstart.
196197
+
198+
[source,command line]
197199
----
198200
sbt Docker/publish -Ddocker.username=[your-docker-hub-username]
199201
----
200202

201203
. If you haven't done so yet, sign in to your Kalix account. If this is your first time using Kalix, this will let you register an account, https://docs.kalix.io/projects/create-project.html[create your first project], and set this project as the default.
202204
+
205+
[source,command line]
203206
----
204207
kalix auth login
205208
----
206209

207210
. https://docs.kalix.io/services/deploy-service.html#_deploy[Deploy the service] with the published container image from above:
208211
+
212+
[source,command line]
209213
----
210214
kalix service deploy <service name> <container image>
211215
----
212216

213217
. You can https://docs.kalix.io/services/deploy-service.html#_verify_service_status[verify the status of the deployed service] using:
214218
+
219+
[source,command line]
215220
----
216221
kalix service list
217222
----
@@ -220,6 +225,7 @@ kalix service list
220225

221226
Once the service has started successfully, you can https://docs.kalix.io/services/invoke-service.html#_testing_and_development[start a proxy locally] to access the service:
222227

228+
[source,command line]
223229
----
224230
kalix service proxy <service name> --grpcui
225231
----
@@ -230,6 +236,7 @@ Or you can use command line gRPC or HTTP clients, such as `grpcurl` or `curl`, t
230236

231237
A customer can be created using the `Create` method on `CustomerService`, in the gRPC web UI, or with `grpcurl`:
232238

239+
[source,command line]
233240
----
234241
grpcurl \
235242
-d '{
@@ -247,6 +254,7 @@ grpcurl \
247254

248255
The `GetCustomer` method can be used to retrieve this customer, in the gRPC web UI, or with `grpcurl`:
249256

257+
[source,command line]
250258
----
251259
grpcurl \
252260
-d '{"customer_id": "abc123"}' \
@@ -256,6 +264,7 @@ grpcurl \
256264

257265
You can https://docs.kalix.io/services/invoke-service.html#_exposing_services_to_the_internet[expose the service to the internet]. A generated hostname will be returned from the expose command:
258266

267+
[source,command line]
259268
----
260269
kalix service expose <service name>
261270
----

samples/scala-eventsourced-counter/src/test/scala/com/example/actions/CounterJournalToTopicActionSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import com.example.domain.ValueDecreased
44
import com.example.domain.ValueIncreased
55
import org.scalatest.matchers.should.Matchers
66
import org.scalatest.wordspec.AnyWordSpec
7-
import com.akkaserverless.scalasdk.Metadata
7+
import kalix.scalasdk.Metadata
88

99
class CounterJournalToTopicActionSpec extends AnyWordSpec with Matchers {
1010

@@ -29,4 +29,4 @@ class CounterJournalToTopicActionSpec extends AnyWordSpec with Matchers {
2929
}
3030

3131
}
32-
}
32+
}

0 commit comments

Comments
 (0)