Skip to content

Commit

Permalink
Update examples, templates and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelprazak committed Feb 2, 2024
1 parent 9ad7ea8 commit 4ee514a
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 39 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using the Scala programming language. Scala support is currently in **Public Bet

* **[Besom Docs](https://virtuslab.github.io/besom/)**: Learn about Besom concepts, follow user-guides, and consult the reference documentation.

* **[Examples](https://github.com/VirtusLab/besom/tree/v0.1.0-examples/examples)**: Browse Scala examples across many clouds and scenarios including containers, serverless,
* **[Examples](https://github.com/VirtusLab/besom/tree/develop/examples)**: Browse Scala examples across many clouds and scenarios including containers, serverless,
and infrastructure.

## <a name="getting-started"></a>Getting Started
Expand Down Expand Up @@ -44,7 +44,7 @@ using the Scala programming language. Scala support is currently in **Public Bet
To install the latest Scala Language Plugin release, run the following:

```bash
pulumi plugin install language scala --server github://api.github.com/VirtusLab/besom
pulumi plugin install language scala 0.2.0-SNAPSHOT --server github://api.github.com/VirtusLab/besom
```

4. **Create a new project**:
Expand All @@ -58,7 +58,7 @@ using the Scala programming language. Scala support is currently in **Public Bet
mkdir besom-demo && cd besom-demo
```
```bash
pulumi new https://github.com/VirtusLab/besom/tree/v0.1.0-examples/templates/aws
pulumi new https://github.com/VirtusLab/besom/tree/develop/templates/aws
```

5. **Deploy to the Cloud**:
Expand Down Expand Up @@ -94,7 +94,7 @@ using the Scala programming language. Scala support is currently in **Public Bet
To learn more, head over to
[virtuslab.github.io/besom](https://virtuslab.github.io/besom/) for much more information, including
[tutorial](https://virtuslab.github.io/besom/docs/tutorial),
[examples](https://github.com/VirtusLab/besom/tree/v0.1.0-examples/examples),
[examples](https://github.com/VirtusLab/besom/tree/develop/examples),
and [architecture and programming model concepts](https://virtuslab.github.io/besom/docs/architecture).
## Explaining the project structure
Expand All @@ -109,9 +109,10 @@ Resources created in `Pulumi.run { ... }` block will be created by Pulumi.
A simple example using Scala CLI:
```scala
//> using scala "3.3.1"
//> using plugin "org.virtuslab::besom-compiler-plugin:0.1.0"
//> using dep "org.virtuslab::besom-core:0.1.0"
//> using dep "org.virtuslab::besom-aws:6.2.1-core.0.1.0"
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-aws:6.2.1-core.0.2-SNAPSHOT"
//> using repository sonatype:snapshots
import besom.*
import besom.api.aws
Expand Down
3 changes: 2 additions & 1 deletion examples/aws-s3-folder/project.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//> using scala "3.3.1"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-aws:6.19.0-core.0.2-SNAPSHOT"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using repository sonatype:snapshots
3 changes: 2 additions & 1 deletion examples/aws-secrets-manager/project.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//> using scala "3.3.1"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-aws:6.19.0-core.0.2-SNAPSHOT"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using repository sonatype:snapshots
1 change: 1 addition & 0 deletions examples/aws-webserver/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
//> using dep org.virtuslab::besom-core:0.2.0-SNAPSHOT
//> using dep org.virtuslab::besom-aws:6.19.0-core.0.2-SNAPSHOT
//> using dep org.virtuslab::besom-tls:5.0.0-core.0.2-SNAPSHOT
//> using repository sonatype:snapshots
3 changes: 2 additions & 1 deletion examples/docker-multi-container-app/infra/project.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//> using scala "3.3.1"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-docker:4.5.1-core.0.2-SNAPSHOT"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using repository sonatype:snapshots
3 changes: 2 additions & 1 deletion examples/gcp-static-page/project.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//> using scala "3.3.1"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-gcp:7.7.0-core.0.2-SNAPSHOT"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using repository sonatype:snapshots
3 changes: 2 additions & 1 deletion examples/kubernetes-nginx/project.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//> using scala "3.3.1"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-kubernetes:4.7.1-core.0.2-SNAPSHOT"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using repository sonatype:snapshots
1 change: 1 addition & 0 deletions experimental/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-kubernetes:4.7.1-core.0.2-SNAPSHOT"
//> using dep "io.github.iltotore::iron:2.4.0"
//> using repository sonatype:snapshots
15 changes: 0 additions & 15 deletions scripts/Packages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -394,19 +394,4 @@ object Packages:
println(s"Packages directory: '$targetPath'")
}

def deleteGithubPackage(packageName: String): Unit =
val packagesRepoApi = s"https://api.github.com/orgs/VirtusLab/packages/maven/org.virtuslab.besom-${packageName}_3"
val token = envOrExit("GITHUB_TOKEN")
val headers = Map(
"Authorization" -> s"Bearer $token",
"Accept" -> "application/vnd.github+json"
)

// please not that this call requires
val packagesResponse = requests.delete(packagesRepoApi, headers = headers, check = false /* ignore 404 */)
packagesResponse.statusCode match
case 204 => println(s"Deleted package: '$packageName'")
case 404 => println(s"Not found: '$packageName', ignoring.")
case code => throw Exception(s"[$code] Failed to delete package using: '$packagesRepoApi'; ${packagesResponse.text()}")

end Packages
2 changes: 2 additions & 0 deletions scripts/project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
//> using dep "org.scoverage::scalac-scoverage-serializer:2.0.11"
//> using dep org.virtuslab::scala-yaml:0.0.8
//> using dep org.virtuslab::besom-codegen:0.2.0-SNAPSHOT

//> using repository sonatype:snapshots
3 changes: 2 additions & 1 deletion templates/aws/project.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//> using scala "3.3.1"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-aws:6.19.0-core.0.2-SNAPSHOT"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using repository sonatype:snapshots
3 changes: 2 additions & 1 deletion templates/default/project.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//> using scala "3.3.1"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-random:4.15.1-core.0.2-SNAPSHOT"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using repository sonatype:snapshots
3 changes: 2 additions & 1 deletion templates/gcp/project.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//> using scala "3.3.1"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-gcp:7.7.0-core.0.2-SNAPSHOT"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using repository sonatype:snapshots
3 changes: 2 additions & 1 deletion templates/kubernetes/project.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//> using scala "3.3.1"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using plugin "org.virtuslab::besom-compiler-plugin:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-core:0.2.0-SNAPSHOT"
//> using dep "org.virtuslab::besom-kubernetes:4.7.1-core.0.2-SNAPSHOT"
//> using options -Werror -Wunused:all -Wvalue-discard -Wnonunit-statement
//> using repository sonatype:snapshots
2 changes: 1 addition & 1 deletion website/docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
title: Examples
---

All examples are available in [Besom GitHub repository](https://github.com/VirtusLab/besom/tree/v0.1.0-examples/examples).
All examples are available in [Besom GitHub repository](https://github.com/VirtusLab/besom/tree/develop/examples).
4 changes: 2 additions & 2 deletions website/docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To start your adventure with infrastructure-as-code with Scala follow these step
To install the latest Scala Language Plugin release, run the following:

```bash
pulumi plugin install language scala --server github://api.github.com/VirtusLab/besom
pulumi plugin install language scala 0.2.0-SNAPSHOT --server github://api.github.com/VirtusLab/besom
```

4. **Create a new project**:
Expand All @@ -43,7 +43,7 @@ To start your adventure with infrastructure-as-code with Scala follow these step
mkdir besom-demo && cd besom-demo
```
```bash
pulumi new https://github.com/VirtusLab/besom/tree/v0.1.0-examples/templates/aws
pulumi new https://github.com/VirtusLab/besom/tree/develop/templates/aws
```

5. **Deploy to the Cloud**:
Expand Down
6 changes: 2 additions & 4 deletions website/docs/missing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ title: Missing features
---

Some Pulumi features are not yet implemented. The most notable ones are:
* [Stack References](https://www.pulumi.com/docs/concepts/stack/#stackreferences) are not yet available (targeted for `0.2.0` release).
* [Provider functions](https://www.pulumi.com/docs/concepts/resources/functions/) like `aws.ec2.getAmi` are not yet available (targeted for `0.2.0` release).
* [Component-based packages](https://www.pulumi.com/docs/using-pulumi/pulumi-packages/how-to-author/) a.k.a. "remote components" are not yet available (targeted for `0.2.0` release).
* [Resource aliases](https://www.pulumi.com/docs/concepts/options/aliases/) are not yet available (stretch goal for `0.2.0` release).
* [Component-based packages](https://www.pulumi.com/docs/using-pulumi/pulumi-packages/how-to-author/) a.k.a. "remote components" are not yet fully available (targeted for `0.3.0` release).
* [Resource aliases](https://www.pulumi.com/docs/concepts/options/aliases/) are not yet available (targeted for `0.3.0` release).
* [Automation API](https://www.pulumi.com/docs/guides/automation-api/) is not yet available (targeted for `0.3.0` release).
* [Resource transformations](https://www.pulumi.com/docs/concepts/options/transformations/) are not yet available (targeted for `0.3.0` release).
* [Dynamic Providers](https://www.pulumi.com/docs/concepts/resources/dynamic-providers/) are not yet available (researching).
Expand Down
2 changes: 1 addition & 1 deletion website/docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
title: Templates
---

All templates are available in [Besom GitHub repository](https://github.com/VirtusLab/besom/tree/v0.1.0-examples/templates).
All templates are available in [Besom GitHub repository](https://github.com/VirtusLab/besom/tree/develop/templates).

0 comments on commit 4ee514a

Please sign in to comment.