Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Commit 4932ebb

Browse files
committed
Lightbend Orchestration 1.7.0 docs
Fixes #74
1 parent fef5b94 commit 4932ebb

File tree

8 files changed

+99
-37
lines changed

8 files changed

+99
-37
lines changed

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
ThisBuild / organization := "com.lightbend"
22

33
lazy val exampleScalaVersion = "2.12.8"
4-
lazy val sbtreactiveappVersion = "1.6.1"
5-
lazy val reactiveLibVersion = "1.6.0"
6-
lazy val reactiveCliVersion = "1.6.0"
4+
lazy val sbtreactiveappVersion = "1.7.0"
5+
lazy val reactiveLibVersion = "1.7.0"
6+
lazy val reactiveCliVersion = "1.7.0"
77

88
lazy val root = (project in file("."))
99
.enablePlugins(ParadoxPlugin, ParadoxSitePlugin, ScriptedPlugin)

src/main/paradox/features/akka-cluster-bootstrap.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,13 @@ When deploying applications that use Akka Cluster, you'll typically want them to
4545
use Akka Persistence features. Because of this, it is recommended that you avoid Blue/Green deployments and instead use
4646
the Canary (default) or Rolling deployment types
4747

48+
49+
### Akka Cluster Bootstrap using DNS
50+
51+
To use DNS for Akka Cluster Bootstrap instead of Kubernetes API, pass `--discovery-method` option as follows:
52+
53+
```bash
54+
rp generate-kubernetes-resources my-org/my-app:0.1.0 --discovery-method=akka-dns
55+
```
56+
4857
[akka-cluster-bootstrap]: https://developer.lightbend.com/docs/akka-management/current/bootstrap/

src/main/paradox/features/secrets.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
## Secrets
22

3-
A non-blocking secrets API is available for Kubernetes. The secrets must be declared in the `build.sbt` file, and then they can be accessed at runtime using the provided libraries. This feature will be made available for DC/OS at a later date.
4-
3+
A non-blocking secrets API is available for Kubernetes. The secrets must be declared in the `build.sbt` file, and then they can be accessed at runtime using the provided libraries.
54
#### Project
65

76
For example, given the following `build.sbt` setting:
@@ -10,14 +9,8 @@ For example, given the following `build.sbt` setting:
109
secrets += Secret("my-secret", "my-key")
1110
```
1211

13-
A developer can access this setting at runtime:
14-
15-
```scala
16-
import com.lightbend.rp.secrets.scaladsl.SecretReader
17-
18-
val secret: Future[Option[ByteString]] =
19-
SecretReader.get(name = "my-secret", key = "my-key")
20-
```
12+
A developer can access this setting at runtime by reading from the file `/rp/secrets/%name%/%key%` where `%name%`
13+
is transformed to lowercase, and `-` for non-alphanum instead.
2114

2215
#### Kubernetes
2316

src/main/paradox/getting-started/sbt-play-minikube.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ lazy val root = (project in file("."))
7777
Add the following to `build.sbt` to declare an endpoint:
7878

7979
```scala
80-
endpoints := HttpEndpoint(
80+
rpEndpoints := HttpEndpoint(
8181
name = "http",
8282
ingress = new HttpIngress(
8383
ingressPorts = Vector(80, 443),

src/main/paradox/kubernetes-development.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ applications. You can also run the task on a specific subproject if you only wis
2626
For example, see the following (trimmed) output below:
2727

2828
```bash
29-
sbt 'deploy minikube'
29+
sbt 'rpDeploy minikube'
3030
[info] Loading global plugins from /home/longshorej/.sbt/0.13/plugins
3131
[info] Loading project definition from /home/longshorej/work/lightbend/online-auction-scala/project
3232
[info] Set current project to online-auction-scala (in build file:/home/longshorej/work/lightbend/online-auction-scala/)
@@ -63,12 +63,12 @@ the Reactive Sandbox installation, and define additional `rp` arguments.
6363

6464
| Name / Type | Description |
6565
|----------------------------------------------------------------------------------|-------------------------------------------------------|
66-
| deployMinikubeReactiveSandboxExternalServices<br/><br/> `Map[String, String]` | A map of service names to service lookup addresses. This will be provided as an argument to rp for resources that are generated when running deploy minikube. Note that this map will only be added if reactive sandbox is enabled.
67-
| deployMinikubeAdditionalExternalServices <br/><br/> `Map[String, String]` | An additional map of service names to service lookup addresses. These will always be provided to rp and take precedence over the Reactive Sandbox addresses.
68-
| deployMinikubeAkkaClusterBootstrapContactPoints <br/><br/> `Int` | When deploying applications with Akka Cluster Bootstrap enabled, the services will initially be started with this many contact points / replicas. Defaults to 1
69-
| deployMinikubeEnableReactiveSandbox <br/><br/> `Boolean` | If enabled, Reactive Sandbox (a Docker image containing Cassandra, Kafka, ZooKeeper, Elasticsearch) will be deployed with this app.
70-
| deployMinikubePlayHostAllowedProperty <br/><br/> `String` | If deploying a Play application, this property will be set to the Minikube IP.
71-
| deployMinikubePlayHttpSecretKeyProperty <br/><br/> `String` | If deploying a Play application, this property will be set to the value specified below.
72-
| deployMinikubePlayHttpSecretKeyValue <br/><br/> `String` | If deploying a Play application, this property will be set to the value specified above.
73-
| deployMinikubeReactiveSandboxCqlStatements <br/><br/> `Seq[String]` | Set this setting (build-wide, i.e. `deployMinikubeReactiveSandboxCqlStatements in ThisBuild` := ...) to a sequence of CQL statements that should be executed against Cassandra when the Reactive Sandbox is installed.
74-
| deployMinikubeRpArguments <br/><br/> `Seq[String]` | Additional arguments to invoke rp with for this app.
66+
| rpDeployMinikubeReactiveSandboxExternalServices<br/><br/> `Map[String, String]` | A map of service names to service lookup addresses. This will be provided as an argument to rp for resources that are generated when running deploy minikube. Note that this map will only be added if reactive sandbox is enabled.
67+
| rpDeployMinikubeAdditionalExternalServices <br/><br/> `Map[String, String]` | An additional map of service names to service lookup addresses. These will always be provided to rp and take precedence over the Reactive Sandbox addresses.
68+
| rpDeployMinikubeAkkaClusterBootstrapContactPoints <br/><br/> `Int` | When deploying applications with Akka Cluster Bootstrap enabled, the services will initially be started with this many contact points / replicas. Defaults to 1
69+
| rpDeployMinikubeEnableReactiveSandbox <br/><br/> `Boolean` | If enabled, Reactive Sandbox (a Docker image containing Cassandra, Kafka, ZooKeeper, Elasticsearch) will be deployed with this app.
70+
| rpDeployMinikubePlayHostAllowedProperty <br/><br/> `String` | If deploying a Play application, this property will be set to the Minikube IP.
71+
| rpDeployMinikubePlayHttpSecretKeyProperty <br/><br/> `String` | If deploying a Play application, this property will be set to the value specified below.
72+
| rpDeployMinikubePlayHttpSecretKeyValue <br/><br/> `String` | If deploying a Play application, this property will be set to the value specified above.
73+
| rpDeployMinikubeReactiveSandboxCqlStatements <br/><br/> `Seq[String]` | Set this setting (build-wide, i.e. `deployMinikubeReactiveSandboxCqlStatements in ThisBuild` := ...) to a sequence of CQL statements that should be executed against Cassandra when the Reactive Sandbox is installed.
74+
| rpDeployMinikubeRpArguments <br/><br/> `Seq[String]` | Additional arguments to invoke rp with for this app.

src/main/paradox/release-notes.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,69 @@ sbt setting.
1414
| [reactive-lib](https://github.com/lightbend/reactive-lib/releases) | $reactivelib$ |
1515
@@@
1616

17+
## 1.7.0
18+
19+
In general, the theme of Lightbend Orchestration 1.7.0 is to remove unnecessary features to make the deployment leaner and more manageable. 1.7.0 runtime is based on Akka 2.5.20 and Akka Management 0.20.0. The following illustrations show the pieces included in Orchestration’s build and runtime.
20+
21+
### Secure Docker image building with sbt-native-packager 1.3.17
22+
23+
For building Docker images, Lightbend Orchestration depends on sbt-native-packager, an sbt plugin maintained by Nepomuk "Muki" Seiler. To improve the security around file permissions and Red Hat OpenShift compatibility, Lightbend Tooling team has contributed a few enhancements to sbt-native-packager.
24+
25+
First, `dockerPermissionStrategy` was added to decide how file permissions are set for the working directory inside the Docker image. The default `DockerPermissionStrategy.MultiStage` strategy uses multi-stage Docker build to call chmod ahead of time. This avoids extra Docker layer overhead.
26+
27+
Next, `dockerChmodType` setting was added to specify what file permissions are set for the working directory. By default, it uses `DockerChmodType.UserGroupReadExecute`, which prevents the working directory to be writable. If you want your application to write a file, the following setting can be used to opt-in:
28+
29+
```scala
30+
import com.typesafe.sbt.packager.docker.DockerChmodType
31+
dockerChmodType := DockerChmodType.UserGroupWriteExecute
32+
```
33+
34+
See [sbt-native-packager 1.3.16](https://github.com/sbt/sbt-native-packager/releases/tag/v1.3.16) release note for more details.
35+
36+
### YAML file generation for Akka Cluster Bootstrapping using Kubernetes API
37+
38+
The main feature of Lightbend Orchestration is the automatic generation of Kubernetes configuration (YAML) files.
39+
40+
For Akka Cluster Bootstrapping, Lightbend Orchestration generates YAML files using Kubernetes API as the discovery method. Starting with Lightbend Orchestration 1.7.0, we will use a specialized label `akka.lightbend.com/service-name`, which denotes the Akka Cluster to join when a pod comes up.
41+
42+
- The value of the this label will default to either the app name or the app name + version depending on the deployment type.
43+
- Deployment pods are labeled with `"akka.lightbend.com/service-name": "friendimpl"` etc.
44+
- You can override the label selector as follows: `-Dakka.discovery.kubernetes-api.pod-label-selector=akka.lightbend.com/service-name=%s` (as opposed to using `app=%s`).
45+
- You can override the effective name as follows: `-Dakka.management.cluster.bootstrap.contact-point-discovery.effective-name=friendimpl` etc.
46+
47+
### YAML file generation: Removal of automatic port assignment
48+
49+
Previous releases of Lightbend Orchestration automatically assigned various port numbers from port 10000 in part by overriding your `application.config` file. Lightbend Orchestration 1.7.0 removes this feature, and respects the port number declared in your your `application.config`. Otherwise, default port numbers will be used such as port 9000 for Play. This also allows us to remove `RP_ENDPOINT_*` environment variables, generally simplifying the generated YAML file.
50+
51+
**Note**: This also means that your deployed service will expose different port number (for example 9000) instead of 10000.
52+
53+
### YAML file generation for Akka Cluster Bootstrapping using DNS
54+
55+
Optionally, Lightbend Orchestration 1.7.0 adds **experimental** support to generate Kubernetes configuration for Akka Cluster Bootstrapping using DNS as the discovery method.
56+
57+
If you want to use DNS, pass `--discovery-method=akka-dns` to the `rp` command line. [cli#195][cli195]
58+
59+
### Rename of sbt-reactive-app key names
60+
61+
All key names are renamed to prefix with `rp` and camel cased to comply with [Plugins Best Practices][best-practice]. For instance, `endpoints` setting will now be `rpEndpoints`, and `deploy` task will be `rpDeploy`. The old key names are deprecated and will be removed in the future. [sbt-reactive-app#145][sbt-reactive-app145]
62+
63+
### Deprecation of SecretReader
64+
65+
In the effort to reduce runtime dependencies, SecretReader was deprecated. Read from the file `/rp/secrets/%name%/%key%` where `%name%` is transformed to lowercase, and `-` for non-alphanum instead. [lib#118][lib118]
66+
67+
### Other bug fix
68+
69+
- Fixes missing `protocol` when UDP endpoint is selected. [cli#196][cli196]
70+
71+
[cli195]: https://github.com/lightbend/reactive-cli/pull/195
72+
[cli196]: https://github.com/lightbend/reactive-cli/pull/196
73+
[lib118]: https://github.com/lightbend/reactive-lib/pull/118
74+
[lib119]: https://github.com/lightbend/reactive-lib/pull/119
75+
[sbt-reactive-app145]: https://github.com/lightbend/sbt-reactive-app/pull/145
76+
[best-practice]: https://www.scala-sbt.org/1.x/docs/Plugins-Best-Practices.html
77+
78+
79+
1780
## sbt-reactive-app 1.6.1
1881

1982
- Fixes binary compatibility issue with sbt-native-packager 1.3.15 adopted by Play 2.6.20+ and Lagom 1.4.10. [#169][sbt-reactive-app169] by [@ignasi35][@ignasi35]

src/main/paradox/setup/project-configuration.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,15 @@ Your application may require that you manually enable or disable the various set
8282

8383
| Name / Type | Description |
8484
|--------------------------------------------------------------------------|-------------------------------------------------------|
85-
| appName <br/><br/> `String` | Specifies the service name. Defaults to the sbt project's name for regular projects. Defaults to the Lagom service name for Lagom projects |
86-
| annotations <br/><br/> `Map[String, String]` | Key/value pairs to export as annotations. |
87-
| enableAkkaClusterBootstrap <br/><br/> `Boolean` | Specifies whether Akka Cluster Bootstrapping should be enabled. When enabled, an Akka extension will be enabled that will automatically form your cluster using service discovery. |
88-
| enableCommon <br/><br/> `Boolean` | Specifies whether basic features like Platform detection should be enabled |
89-
| enablePlayHttpBinding <br/><br/> `Boolean` | Specifies whether automatic HTTP port binding for Play & Lagom should be enabled|
90-
| enableSecrets <br/><br/> `Boolean` | Specifies whether secrets library should be enabled |
91-
| endpoints <br/><br/> `Seq[Endpoint]` | Declare the endpoints that should be made available for your service |
92-
| environmentVariables <br/><br/> `Map[String, EnvironmentVariable]` | Declare values that should be bound to environment variables (application runtime). Note that additional environment variables can also be set during deploy time using the `rp` command. |
93-
| httpIngressHosts <br/><br/> `Seq[String]` | For automatic HTTP ingress declarations, specifies the host used for ingress. |
94-
| httpIngressPorts <br/><br/> `Seq[Int]` | For automatic HTTP ingress declarations, specifies the port used for ingress. |
95-
| prependRpConf <br/><br/> `String` | All configuration files on the class path with this name will be prepended to the applications `application.conf`. This is the mechanism used to automatically configure various dependencies. To disable this, set this setting to `None` |
96-
| startScriptLocation <br/><br/> `String` | A custom start-script is provided and bundles with the application. Change its location with this setting. |
85+
| rpAppName <br/><br/> `String` | Specifies the service name. Defaults to the sbt project's name for regular projects. Defaults to the Lagom service name for Lagom projects |
86+
| rpAnnotations <br/><br/> `Map[String, String]` | Key/value pairs to export as annotations. |
87+
| rpEnableAkkaClusterBootstrap <br/><br/> `Boolean` | Specifies whether Akka Cluster Bootstrapping should be enabled. When enabled, an Akka extension will be enabled that will automatically form your cluster using service discovery. |
88+
| rpEnableCommon <br/><br/> `Boolean` | Specifies whether basic features like Platform detection should be enabled |
89+
| rpEnableSecrets <br/><br/> `Boolean` | Specifies whether secrets library should be enabled |
90+
| rpEndpoints <br/><br/> `Seq[Endpoint]` | Declare the endpoints that should be made available for your service |
91+
| rpEnvironmentVariables <br/><br/> `Map[String, EnvironmentVariable]` | Declare values that should be bound to environment variables (application runtime). Note that additional environment variables can also be set during deploy time using the `rp` command. |
92+
| rpHttpIngressHosts <br/><br/> `Seq[String]` | For automatic HTTP ingress declarations, specifies the host used for ingress. |
93+
| rpHttpIngressPorts <br/><br/> `Seq[Int]` | For automatic HTTP ingress declarations, specifies the port used for ingress. |
9794

9895
### sbt Native Packager
9996

src/main/paradox/setup/project-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ After installing the requisite software, run the following commands:
8888

8989
```bash
9090
minikube start --memory 6000
91-
sbt "deploy minikube"
91+
sbt "rpDeploy minikube"
9292
echo "http://$(minikube ip)"
9393
```
9494

0 commit comments

Comments
 (0)