Skip to content

Commit 93a5ac4

Browse files
committed
v2.0.5 wip
1 parent 048d9b3 commit 93a5ac4

6 files changed

Lines changed: 517 additions & 58 deletions

File tree

examples/aws/aws-vpc-webserver/stackql_manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 1
22
name: "aws-vpc-webserver"
33
description: Provisions a complete AWS networking stack (VPC, subnet, internet gateway, route table, security group) with an Apache web server EC2 instance.
44
providers:
5-
- awscc
5+
- awscc::v26.03.00379
66
globals:
77
- name: region
88
description: aws region

examples/aws/patch-doc-test/stackql_manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 1
22
name: "patch-doc-test"
33
description: Demonstrates the Cloud Control API update (PatchDocument) workflow using an S3 bucket - deploy, modify versioning config, re-deploy to apply the update.
44
providers:
5-
- awscc
5+
- awscc::v26.03.00379
66
globals:
77
- name: region
88
description: aws region

examples/databricks/serverless/stackql_manifest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ version: 1
22
name: "stackql-serverless"
33
description: creates a serverless databricks workspace
44
providers:
5-
- awscc
6-
- databricks_account
7-
- databricks_workspace
5+
- awscc::v26.03.00379
6+
- databricks_account::v26.03.00381
7+
- databricks_workspace::v26.03.00381
88
globals:
99
- name: databricks_account_id
1010
description: databricks account id

website/docs/getting-started.md

Lines changed: 56 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,42 @@ unlisted: false
1010
---
1111

1212
import File from '/src/components/File';
13+
import Tabs from '@theme/Tabs';
14+
import TabItem from '@theme/TabItem';
1315

1416
`stackql-deploy` is a model driven, declarative framework for provisioning, de-provisioning and testing cloud resources. Heard enough and ready to get started? Jump to a [__Quick Start__](#quick-start).
1517

1618
## Installing `stackql-deploy`
1719

18-
`stackql-deploy` is distributed as a standalone binary with no runtime dependencies required.
19-
20-
import Tabs from '@theme/Tabs';
21-
import TabItem from '@theme/TabItem';
20+
`stackql-deploy` is distributed as a standalone binary with no runtime dependencies required. You can also download directly from your browser at [__get-stackql-deploy.io__](https://get-stackql-deploy.io).
2221

2322
<Tabs>
24-
<TabItem value="macos" label="macOS">
23+
<TabItem value="linux-macos" label="Linux / macOS">
2524

26-
**Apple Silicon (ARM64):**
25+
The canonical install URL detects your OS and redirects to the latest release asset automatically:
2726

2827
```bash
29-
curl -L https://github.com/stackql/stackql-deploy-rs/releases/latest/download/stackql-deploy-macos-arm64.tar.gz | tar xz
28+
curl -L https://get-stackql-deploy.io | tar xzf -
3029
sudo mv stackql-deploy /usr/local/bin/
3130
```
3231

33-
**Intel (x86_64):**
32+
Or download a specific platform build:
33+
34+
**macOS Universal (Apple Silicon + Intel):**
3435

3536
```bash
36-
curl -L https://github.com/stackql/stackql-deploy-rs/releases/latest/download/stackql-deploy-macos-x86_64.tar.gz | tar xz
37+
curl -L https://github.com/stackql/stackql-deploy-rs/releases/latest/download/stackql-deploy-macos-universal.tar.gz | tar xz
3738
sudo mv stackql-deploy /usr/local/bin/
3839
```
3940

40-
</TabItem>
41-
<TabItem value="linux" label="Linux">
42-
43-
**x86_64:**
41+
**Linux x86_64:**
4442

4543
```bash
4644
curl -L https://github.com/stackql/stackql-deploy-rs/releases/latest/download/stackql-deploy-linux-x86_64.tar.gz | tar xz
4745
sudo mv stackql-deploy /usr/local/bin/
4846
```
4947

50-
**ARM64:**
48+
**Linux ARM64:**
5149

5250
```bash
5351
curl -L https://github.com/stackql/stackql-deploy-rs/releases/latest/download/stackql-deploy-linux-arm64.tar.gz | tar xz
@@ -60,7 +58,7 @@ sudo mv stackql-deploy /usr/local/bin/
6058
**PowerShell:**
6159

6260
```powershell
63-
Invoke-WebRequest -Uri "https://github.com/stackql/stackql-deploy-rs/releases/latest/download/stackql-deploy-windows-x86_64.zip" -OutFile stackql-deploy.zip
61+
Invoke-WebRequest https://get-stackql-deploy.io -OutFile stackql-deploy.zip
6462
Expand-Archive stackql-deploy.zip -DestinationPath .
6563
Move-Item stackql-deploy.exe "$env:LOCALAPPDATA\Microsoft\WindowsApps\"
6664
Remove-Item stackql-deploy.zip
@@ -74,25 +72,27 @@ unzip stackql-deploy.zip
7472
```
7573

7674
</TabItem>
77-
<TabItem value="cargo" label="Cargo (from source)">
75+
<TabItem value="github-releases" label="GitHub Releases">
7876

79-
If you have Rust installed (via [rustup](https://rustup.rs/)):
77+
Pre-built binaries are attached to every release on the [__GitHub Releases__](https://github.com/stackql/stackql-deploy-rs/releases) page. A `SHA256SUMS` file is included for verification.
8078

81-
```bash
82-
cargo install stackql-deploy
83-
```
84-
85-
This builds from source and installs to `~/.cargo/bin/`.
79+
| Platform | Asset |
80+
|----------|-------|
81+
| Linux x86_64 | `stackql-deploy-linux-x86_64.tar.gz` |
82+
| Linux ARM64 | `stackql-deploy-linux-arm64.tar.gz` |
83+
| macOS Universal (Apple Silicon + Intel) | `stackql-deploy-macos-universal.tar.gz` |
84+
| Windows x86_64 | `stackql-deploy-windows-x86_64.zip` |
8685

8786
</TabItem>
8887
<TabItem value="github-actions" label="GitHub Actions">
8988

90-
Use the [`stackql/setup-deploy`](https://github.com/marketplace/actions/stackql-deploy) action to install and run `stackql-deploy` in your CI/CD pipelines:
89+
Use the [`stackql/setup-deploy`](https://github.com/marketplace/actions/stackql-deploy) action to install and run `stackql-deploy` in your CI/CD pipelines. The action automatically downloads the latest binary for the runner's platform.
90+
91+
**Deploy a stack:**
9192

9293
```yaml
9394
steps:
9495
- uses: actions/checkout@v4
95-
9696
- name: Deploy Stack
9797
uses: stackql/setup-deploy@v1.0.1
9898
with:
@@ -102,12 +102,39 @@ steps:
102102
env_vars: 'AWS_REGION=us-east-1'
103103
```
104104
105-
The action automatically downloads the latest binary for the runner's platform. See [__Deploying with GitHub Actions__](/github-actions) for the full reference.
105+
**Deploy and capture outputs:**
106+
107+
```yaml
108+
- name: Deploy Stack
109+
id: stackql-deploy
110+
uses: stackql/setup-deploy@v1.0.1
111+
with:
112+
command: 'build'
113+
stack_dir: 'examples/my-stack'
114+
stack_env: 'prod'
115+
output_file: 'deployment-outputs.json'
116+
env_vars: 'GOOGLE_PROJECT=my-project'
117+
118+
- name: Use outputs
119+
run: |
120+
echo '${{ steps.stackql-deploy.outputs.deployment_outputs }}' | jq .
121+
```
122+
123+
See [__Deploying with GitHub Actions__](/github-actions) for the full reference.
106124
107125
</TabItem>
108-
</Tabs>
126+
<TabItem value="cargo" label="Cargo (from source)">
127+
128+
If you have the Rust toolchain installed (via [rustup](https://rustup.rs/)):
109129
110-
All platform binaries are available on the [__GitHub Releases__](https://github.com/stackql/stackql-deploy-rs/releases) page.
130+
```bash
131+
cargo install stackql-deploy
132+
```
133+
134+
This builds from source and installs to `~/.cargo/bin/`.
135+
136+
</TabItem>
137+
</Tabs>
111138

112139
## How `stackql-deploy` works
113140

@@ -255,7 +282,8 @@ For more detailed information see [`cli-reference/build`](/cli-reference/build),
255282

256283
To get up and running quickly, `stackql-deploy` provides a set of quick start templates for common cloud providers. These templates include predefined configurations and resource queries tailored to AWS, Azure, and Google Cloud, among others.
257284

258-
- [**AWS Quick Start Template**](/template-library/aws/vpc-and-ec2-instance): A basic setup for deploying a VPC, including subnets and routing configurations.
285+
- [**AWS Quick Start Template**](/template-library/aws/vpc-and-ec2-instance): A complete VPC networking stack with an EC2 web server using the `awscc` Cloud Control provider.
286+
- [**Databricks Quick Start Template**](/template-library/databricks/serverless-workspace): A multi-provider stack deploying a Databricks serverless workspace on AWS with Unity Catalog.
259287
- [**Azure Quick Start Template**](/template-library/azure/simple-vnet-and-vm): A setup for creating a Resource Group with associated resources.
260288
- [**Google Cloud Quick Start Template**](/template-library/google/k8s-the-hard-way): A configuration for deploying a VPC with network and firewall rules.
261289

Lines changed: 65 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,65 @@
1-
**Type**: `array of strings` (optional)
2-
3-
**Description**: List of variable names to export to a JSON file after deployment completion. Variables must exist in the deployment context (from globals or resource exports). Use with the `--output-file` CLI argument to specify the destination file.
4-
5-
**Usage**: Use this to extract key deployment outputs for use in CI/CD pipelines, downstream processes, or for record-keeping.
6-
7-
**Example**:
8-
9-
```yaml
10-
exports:
11-
- databricks_workspace_name
12-
- databricks_workspace_id
13-
- aws_iam_role_arn
14-
- deployment_timestamp
15-
```
16-
17-
**Notes**:
18-
- `stack_name`, `stack_env`, and `elapsed_time` are automatically included in exports and do not need to be listed
19-
- Export order: automatic exports (`stack_name`, `stack_env`) first, then user-defined exports, then timing (`elapsed_time`) last
20-
- `elapsed_time` is formatted as a string showing the total deployment duration (e.g., "0:01:23.456789")
21-
- Variables are exported exactly as they exist in the deployment context
22-
- Complex objects and arrays are preserved as JSON structures
23-
- If a listed variable doesn't exist in the context, deployment will fail
24-
- Requires `--output-file` CLI argument to be specified, otherwise exports are skipped
25-
- Exported JSON file contains a flat object with variable names as keys
1+
**Type**: `array of strings` (optional)
2+
3+
**Description**: List of variable names to export after a successful `build` or `test` operation. Variables must exist in the deployment context (from globals or resource exports). Exported variables are displayed in a table, written to a sourceable shell file (`.stackql-deploy-exports`), and optionally to a JSON file when `--output-file` is specified.
4+
5+
**Usage**: Use this to extract key deployment outputs for use in CI/CD pipelines, downstream processes, or interactive shell sessions.
6+
7+
**Example**:
8+
9+
```yaml
10+
exports:
11+
- workspace_name
12+
- workspace_id
13+
- deployment_name
14+
- workspace_status
15+
- workspace_url
16+
```
17+
18+
**Output after a successful `build` or `test`**:
19+
20+
```
21+
┌───────────────┐
22+
│ stack exports │
23+
└───────────────┘
24+
+------------------------------------------------------+--------------------------------------------------+
25+
| variable | value |
26+
+------------------------------------------------------+--------------------------------------------------+
27+
| STACKQL_DEPLOY__my_stack__dev__workspace_name | my-stack-dev-workspace |
28+
| STACKQL_DEPLOY__my_stack__dev__workspace_id | 7474653260057820 |
29+
| STACKQL_DEPLOY__my_stack__dev__deployment_name | dbc-c83e88ed-1ad3 |
30+
| STACKQL_DEPLOY__my_stack__dev__workspace_status | RUNNING |
31+
| STACKQL_DEPLOY__my_stack__dev__workspace_url | https://dbc-c83e88ed-1ad3.cloud.databricks.com |
32+
| STACKQL_DEPLOY__my_stack__dev__elapsed_time | 49.22s |
33+
| STACKQL_DEPLOY__my_stack__dev__stack_env | dev |
34+
| STACKQL_DEPLOY__my_stack__dev__stack_name | my-stack |
35+
+------------------------------------------------------+--------------------------------------------------+
36+
37+
To load these variables into your shell:
38+
source .stackql-deploy-exports
39+
```
40+
41+
**Loading exports into the shell**:
42+
43+
```bash
44+
# Linux / macOS / Git Bash
45+
source .stackql-deploy-exports
46+
echo $STACKQL_DEPLOY__my_stack__dev__workspace_url
47+
```
48+
49+
```powershell
50+
# PowerShell
51+
Get-Content .stackql-deploy-exports | ForEach-Object { Invoke-Expression $_ }
52+
```
53+
54+
**Environment variable naming**:
55+
56+
Exported variable names follow the pattern `STACKQL_DEPLOY__<stack_name>__<stack_env>__<variable>`, where hyphens in stack name or env are replaced with underscores (since shell environment variables don't support hyphens).
57+
58+
**Notes**:
59+
- `stack_name`, `stack_env`, and `elapsed_time` are automatically included in exports and do not need to be listed
60+
- Stack exports are displayed on both `build` and `test` operations
61+
- The `.stackql-deploy-exports` file is written to the current working directory and contains `export KEY='value'` lines
62+
- If `--output-file` is also specified, exports are additionally written as a JSON file
63+
- Variables are exported exactly as they exist in the deployment context
64+
- Complex objects and arrays are preserved as JSON structures
65+
- If a listed variable doesn't exist in the context, the operation will fail

0 commit comments

Comments
 (0)