container-superposition 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +843 -0
- package/dist/scripts/init.d.ts +3 -0
- package/dist/scripts/init.d.ts.map +1 -0
- package/dist/scripts/init.js +1190 -0
- package/dist/scripts/init.js.map +1 -0
- package/dist/scripts/migrate-to-manifests.d.ts +12 -0
- package/dist/scripts/migrate-to-manifests.d.ts.map +1 -0
- package/dist/scripts/migrate-to-manifests.js +230 -0
- package/dist/scripts/migrate-to-manifests.js.map +1 -0
- package/dist/tool/questionnaire/composer.d.ts +6 -0
- package/dist/tool/questionnaire/composer.d.ts.map +1 -0
- package/dist/tool/questionnaire/composer.js +1232 -0
- package/dist/tool/questionnaire/composer.js.map +1 -0
- package/dist/tool/readme/markdown-parser.d.ts +30 -0
- package/dist/tool/readme/markdown-parser.d.ts.map +1 -0
- package/dist/tool/readme/markdown-parser.js +139 -0
- package/dist/tool/readme/markdown-parser.js.map +1 -0
- package/dist/tool/readme/readme-generator.d.ts +9 -0
- package/dist/tool/readme/readme-generator.d.ts.map +1 -0
- package/dist/tool/readme/readme-generator.js +422 -0
- package/dist/tool/readme/readme-generator.js.map +1 -0
- package/dist/tool/schema/custom-loader.d.ts +17 -0
- package/dist/tool/schema/custom-loader.d.ts.map +1 -0
- package/dist/tool/schema/custom-loader.js +149 -0
- package/dist/tool/schema/custom-loader.js.map +1 -0
- package/dist/tool/schema/overlay-loader.d.ts +47 -0
- package/dist/tool/schema/overlay-loader.d.ts.map +1 -0
- package/dist/tool/schema/overlay-loader.js +252 -0
- package/dist/tool/schema/overlay-loader.js.map +1 -0
- package/dist/tool/schema/types.d.ts +212 -0
- package/dist/tool/schema/types.d.ts.map +1 -0
- package/dist/tool/schema/types.js +5 -0
- package/dist/tool/schema/types.js.map +1 -0
- package/docs/README.md +308 -0
- package/docs/architecture.md +233 -0
- package/docs/creating-overlays.md +549 -0
- package/docs/custom-patches.md +540 -0
- package/docs/dependencies.md +279 -0
- package/docs/examples/custom-patches-example.md +85 -0
- package/docs/examples.md +576 -0
- package/docs/messaging-comparison.md +265 -0
- package/docs/messaging-quick-start.md +385 -0
- package/docs/observability-workflow.md +537 -0
- package/docs/overlay-manifest-refactoring.md +214 -0
- package/docs/overlay-metadata-archive.md +54 -0
- package/docs/overlays.md +523 -0
- package/docs/presets-architecture.md +498 -0
- package/docs/presets.md +366 -0
- package/docs/publishing.md +476 -0
- package/docs/quick-reference.md +326 -0
- package/docs/ux.md +170 -0
- package/features/README.md +85 -0
- package/features/cross-distro-packages/README.md +146 -0
- package/features/cross-distro-packages/devcontainer-feature.json +20 -0
- package/features/cross-distro-packages/install.sh +58 -0
- package/features/local-secrets-manager/devcontainer-feature.json +18 -0
- package/features/local-secrets-manager/install.sh +127 -0
- package/features/project-scaffolder/devcontainer-feature.json +24 -0
- package/features/project-scaffolder/install.sh +100 -0
- package/features/team-conventions/devcontainer-feature.json +24 -0
- package/features/team-conventions/install.sh +93 -0
- package/overlays/.registry/README.md +14 -0
- package/overlays/.registry/base-images.yml +26 -0
- package/overlays/.registry/base-templates.yml +7 -0
- package/overlays/README.md +155 -0
- package/overlays/alertmanager/.env.example +5 -0
- package/overlays/alertmanager/README.md +465 -0
- package/overlays/alertmanager/alert-rules.yml +56 -0
- package/overlays/alertmanager/alertmanager.yml +42 -0
- package/overlays/alertmanager/devcontainer.patch.json +12 -0
- package/overlays/alertmanager/docker-compose.yml +20 -0
- package/overlays/alertmanager/overlay.yml +17 -0
- package/overlays/alertmanager/setup.sh +53 -0
- package/overlays/alertmanager/verify.sh +31 -0
- package/overlays/aws-cli/README.md +473 -0
- package/overlays/aws-cli/devcontainer.patch.json +13 -0
- package/overlays/aws-cli/overlay.yml +13 -0
- package/overlays/azure-cli/README.md +551 -0
- package/overlays/azure-cli/devcontainer.patch.json +8 -0
- package/overlays/azure-cli/overlay.yml +13 -0
- package/overlays/bun/README.md +312 -0
- package/overlays/bun/devcontainer.patch.json +41 -0
- package/overlays/bun/overlay.yml +16 -0
- package/overlays/bun/setup.sh +79 -0
- package/overlays/bun/verify.sh +30 -0
- package/overlays/codex/README.md +128 -0
- package/overlays/codex/devcontainer.patch.json +3 -0
- package/overlays/codex/overlay.yml +14 -0
- package/overlays/codex/setup.sh +24 -0
- package/overlays/codex/verify.sh +30 -0
- package/overlays/commitlint/README.md +333 -0
- package/overlays/commitlint/devcontainer.patch.json +8 -0
- package/overlays/commitlint/overlay.yml +16 -0
- package/overlays/commitlint/setup.sh +234 -0
- package/overlays/direnv/README.md +504 -0
- package/overlays/direnv/devcontainer.patch.json +6 -0
- package/overlays/direnv/overlay.yml +13 -0
- package/overlays/direnv/setup.sh +139 -0
- package/overlays/docker-in-docker/README.md +534 -0
- package/overlays/docker-in-docker/devcontainer.patch.json +10 -0
- package/overlays/docker-in-docker/overlay.yml +13 -0
- package/overlays/docker-sock/README.md +256 -0
- package/overlays/docker-sock/devcontainer.patch.json +9 -0
- package/overlays/docker-sock/docker-compose.yml +8 -0
- package/overlays/docker-sock/overlay.yml +13 -0
- package/overlays/dotnet/README.md +147 -0
- package/overlays/dotnet/devcontainer.patch.json +51 -0
- package/overlays/dotnet/global-tools.txt +24 -0
- package/overlays/dotnet/overlay.yml +13 -0
- package/overlays/dotnet/setup.sh +51 -0
- package/overlays/dotnet/verify.sh +26 -0
- package/overlays/gcloud/README.md +269 -0
- package/overlays/gcloud/devcontainer.patch.json +14 -0
- package/overlays/gcloud/overlay.yml +14 -0
- package/overlays/gcloud/verify.sh +52 -0
- package/overlays/git-helpers/README.md +168 -0
- package/overlays/git-helpers/devcontainer.patch.json +33 -0
- package/overlays/git-helpers/overlay.yml +15 -0
- package/overlays/git-helpers/setup.sh +91 -0
- package/overlays/go/README.md +293 -0
- package/overlays/go/devcontainer.patch.json +43 -0
- package/overlays/go/overlay.yml +15 -0
- package/overlays/go/setup.sh +33 -0
- package/overlays/go/verify.sh +40 -0
- package/overlays/grafana/.env.example +9 -0
- package/overlays/grafana/README.md +462 -0
- package/overlays/grafana/dashboard-provider.yml +11 -0
- package/overlays/grafana/dashboards/observability-overview.json +263 -0
- package/overlays/grafana/devcontainer.patch.json +12 -0
- package/overlays/grafana/docker-compose.yml +27 -0
- package/overlays/grafana/grafana-datasources.yml +57 -0
- package/overlays/grafana/overlay.yml +21 -0
- package/overlays/grafana/verify.sh +34 -0
- package/overlays/jaeger/.env.example +7 -0
- package/overlays/jaeger/README.md +867 -0
- package/overlays/jaeger/devcontainer.patch.json +12 -0
- package/overlays/jaeger/docker-compose.yml +17 -0
- package/overlays/jaeger/overlay.yml +19 -0
- package/overlays/java/README.md +267 -0
- package/overlays/java/devcontainer.patch.json +44 -0
- package/overlays/java/overlay.yml +16 -0
- package/overlays/java/setup.sh +41 -0
- package/overlays/java/verify.sh +42 -0
- package/overlays/just/README.md +443 -0
- package/overlays/just/devcontainer.patch.json +3 -0
- package/overlays/just/overlay.yml +13 -0
- package/overlays/just/setup.sh +182 -0
- package/overlays/kubectl-helm/README.md +660 -0
- package/overlays/kubectl-helm/devcontainer.patch.json +10 -0
- package/overlays/kubectl-helm/overlay.yml +13 -0
- package/overlays/loki/.env.example +5 -0
- package/overlays/loki/README.md +1156 -0
- package/overlays/loki/devcontainer.patch.json +12 -0
- package/overlays/loki/docker-compose.yml +18 -0
- package/overlays/loki/loki-config.yaml +45 -0
- package/overlays/loki/overlay.yml +17 -0
- package/overlays/minio/.env.example +9 -0
- package/overlays/minio/README.md +639 -0
- package/overlays/minio/devcontainer.patch.json +30 -0
- package/overlays/minio/docker-compose.yml +28 -0
- package/overlays/minio/overlay.yml +18 -0
- package/overlays/minio/setup.sh +61 -0
- package/overlays/minio/verify.sh +64 -0
- package/overlays/mkdocs/README.md +309 -0
- package/overlays/mkdocs/devcontainer.patch.json +24 -0
- package/overlays/mkdocs/overlay.yml +15 -0
- package/overlays/modern-cli-tools/README.md +556 -0
- package/overlays/modern-cli-tools/devcontainer.patch.json +3 -0
- package/overlays/modern-cli-tools/overlay.yml +13 -0
- package/overlays/modern-cli-tools/setup.sh +153 -0
- package/overlays/mongodb/.env.example +9 -0
- package/overlays/mongodb/README.md +481 -0
- package/overlays/mongodb/devcontainer.patch.json +32 -0
- package/overlays/mongodb/docker-compose.yml +44 -0
- package/overlays/mongodb/overlay.yml +17 -0
- package/overlays/mongodb/verify.sh +48 -0
- package/overlays/mysql/.env.example +11 -0
- package/overlays/mysql/README.md +542 -0
- package/overlays/mysql/devcontainer.patch.json +34 -0
- package/overlays/mysql/docker-compose.yml +55 -0
- package/overlays/mysql/overlay.yml +16 -0
- package/overlays/mysql/verify.sh +48 -0
- package/overlays/nats/.env.example +5 -0
- package/overlays/nats/README.md +762 -0
- package/overlays/nats/devcontainer.patch.json +24 -0
- package/overlays/nats/docker-compose.yml +31 -0
- package/overlays/nats/overlay.yml +18 -0
- package/overlays/nats/verify.sh +50 -0
- package/overlays/ngrok/README.md +503 -0
- package/overlays/ngrok/devcontainer.patch.json +3 -0
- package/overlays/ngrok/overlay.yml +14 -0
- package/overlays/ngrok/setup.sh +125 -0
- package/overlays/nodejs/README.md +192 -0
- package/overlays/nodejs/devcontainer.patch.json +49 -0
- package/overlays/nodejs/global-packages.txt +16 -0
- package/overlays/nodejs/overlay.yml +14 -0
- package/overlays/nodejs/setup.sh +46 -0
- package/overlays/nodejs/verify.sh +32 -0
- package/overlays/otel-collector/.env.example +9 -0
- package/overlays/otel-collector/README.md +1257 -0
- package/overlays/otel-collector/devcontainer.patch.json +28 -0
- package/overlays/otel-collector/docker-compose.yml +22 -0
- package/overlays/otel-collector/otel-collector-config.yaml +68 -0
- package/overlays/otel-collector/overlay.yml +21 -0
- package/overlays/otel-collector/setup.sh +49 -0
- package/overlays/otel-demo-nodejs/.env.example +2 -0
- package/overlays/otel-demo-nodejs/Dockerfile-otel-demo-nodejs +17 -0
- package/overlays/otel-demo-nodejs/README.md +409 -0
- package/overlays/otel-demo-nodejs/devcontainer.patch.json +12 -0
- package/overlays/otel-demo-nodejs/docker-compose.yml +19 -0
- package/overlays/otel-demo-nodejs/overlay.yml +23 -0
- package/overlays/otel-demo-nodejs/package-otel-demo-nodejs.json +20 -0
- package/overlays/otel-demo-nodejs/server-otel-demo-nodejs.js +259 -0
- package/overlays/otel-demo-nodejs/tracing-otel-demo-nodejs.js +57 -0
- package/overlays/otel-demo-nodejs/verify.sh +31 -0
- package/overlays/otel-demo-python/.env.example +2 -0
- package/overlays/otel-demo-python/Dockerfile-otel-demo-python +16 -0
- package/overlays/otel-demo-python/README.md +82 -0
- package/overlays/otel-demo-python/app-otel-demo-python.py +208 -0
- package/overlays/otel-demo-python/devcontainer.patch.json +12 -0
- package/overlays/otel-demo-python/docker-compose.yml +19 -0
- package/overlays/otel-demo-python/overlay.yml +23 -0
- package/overlays/otel-demo-python/requirements-otel-demo-python.txt +4 -0
- package/overlays/otel-demo-python/verify.sh +31 -0
- package/overlays/playwright/README.md +629 -0
- package/overlays/playwright/devcontainer.patch.json +9 -0
- package/overlays/playwright/overlay.yml +13 -0
- package/overlays/postgres/.env.example +6 -0
- package/overlays/postgres/README.md +602 -0
- package/overlays/postgres/devcontainer.patch.json +21 -0
- package/overlays/postgres/docker-compose.yml +22 -0
- package/overlays/postgres/overlay.yml +15 -0
- package/overlays/postgres/verify.sh +45 -0
- package/overlays/powershell/README.md +314 -0
- package/overlays/powershell/devcontainer.patch.json +22 -0
- package/overlays/powershell/overlay.yml +13 -0
- package/overlays/powershell/setup.sh +29 -0
- package/overlays/powershell/verify.sh +38 -0
- package/overlays/pre-commit/README.md +263 -0
- package/overlays/pre-commit/devcontainer.patch.json +9 -0
- package/overlays/pre-commit/overlay.yml +16 -0
- package/overlays/pre-commit/setup.sh +129 -0
- package/overlays/presets/docs-site.yml +118 -0
- package/overlays/presets/fullstack.yml +181 -0
- package/overlays/presets/microservice.yml +118 -0
- package/overlays/presets/web-api.yml +109 -0
- package/overlays/prometheus/.env.example +5 -0
- package/overlays/prometheus/README.md +1246 -0
- package/overlays/prometheus/devcontainer.patch.json +12 -0
- package/overlays/prometheus/docker-compose.yml +22 -0
- package/overlays/prometheus/overlay.yml +17 -0
- package/overlays/prometheus/prometheus.yml +12 -0
- package/overlays/prometheus/verify.sh +34 -0
- package/overlays/promtail/.env.example +2 -0
- package/overlays/promtail/README.md +357 -0
- package/overlays/promtail/devcontainer.patch.json +5 -0
- package/overlays/promtail/docker-compose.yml +16 -0
- package/overlays/promtail/overlay.yml +17 -0
- package/overlays/promtail/promtail-config.yaml +60 -0
- package/overlays/promtail/verify.sh +31 -0
- package/overlays/pulumi/README.md +472 -0
- package/overlays/pulumi/devcontainer.patch.json +13 -0
- package/overlays/pulumi/overlay.yml +14 -0
- package/overlays/pulumi/verify.sh +31 -0
- package/overlays/python/README.md +919 -0
- package/overlays/python/devcontainer.patch.json +41 -0
- package/overlays/python/overlay.yml +12 -0
- package/overlays/python/requirements-overlay.txt +13 -0
- package/overlays/python/setup.sh +47 -0
- package/overlays/python/verify.sh +32 -0
- package/overlays/rabbitmq/.env.example +7 -0
- package/overlays/rabbitmq/README.md +680 -0
- package/overlays/rabbitmq/devcontainer.patch.json +28 -0
- package/overlays/rabbitmq/docker-compose.yml +30 -0
- package/overlays/rabbitmq/overlay.yml +18 -0
- package/overlays/rabbitmq/verify.sh +41 -0
- package/overlays/redis/.env.example +4 -0
- package/overlays/redis/README.md +776 -0
- package/overlays/redis/devcontainer.patch.json +21 -0
- package/overlays/redis/docker-compose.yml +21 -0
- package/overlays/redis/overlay.yml +15 -0
- package/overlays/redis/verify.sh +41 -0
- package/overlays/redpanda/.env.example +10 -0
- package/overlays/redpanda/README.md +703 -0
- package/overlays/redpanda/devcontainer.patch.json +37 -0
- package/overlays/redpanda/docker-compose.yml +67 -0
- package/overlays/redpanda/overlay.yml +21 -0
- package/overlays/redpanda/verify.sh +48 -0
- package/overlays/rust/README.md +299 -0
- package/overlays/rust/devcontainer.patch.json +39 -0
- package/overlays/rust/overlay.yml +15 -0
- package/overlays/rust/setup.sh +36 -0
- package/overlays/rust/verify.sh +51 -0
- package/overlays/sqlite/README.md +584 -0
- package/overlays/sqlite/devcontainer.patch.json +14 -0
- package/overlays/sqlite/overlay.yml +15 -0
- package/overlays/sqlite/setup.sh +27 -0
- package/overlays/sqlite/verify.sh +43 -0
- package/overlays/sqlserver/.env.example +6 -0
- package/overlays/sqlserver/README.md +592 -0
- package/overlays/sqlserver/devcontainer.patch.json +22 -0
- package/overlays/sqlserver/docker-compose.yml +32 -0
- package/overlays/sqlserver/overlay.yml +17 -0
- package/overlays/sqlserver/verify.sh +30 -0
- package/overlays/tempo/.env.example +5 -0
- package/overlays/tempo/README.md +273 -0
- package/overlays/tempo/devcontainer.patch.json +12 -0
- package/overlays/tempo/docker-compose.yml +20 -0
- package/overlays/tempo/overlay.yml +20 -0
- package/overlays/tempo/tempo-config.yaml +32 -0
- package/overlays/tempo/verify.sh +31 -0
- package/overlays/terraform/README.md +389 -0
- package/overlays/terraform/devcontainer.patch.json +15 -0
- package/overlays/terraform/overlay.yml +14 -0
- package/overlays/terraform/verify.sh +63 -0
- package/package.json +74 -0
- package/templates/README.md +285 -0
- package/templates/compose/.devcontainer/devcontainer.json +46 -0
- package/templates/compose/.devcontainer/docker-compose.yml +12 -0
- package/templates/compose/README.md +20 -0
- package/templates/plain/.devcontainer/devcontainer.json +35 -0
- package/templates/plain/README.md +21 -0
- package/tool/README.md +281 -0
- package/tool/schema/base-images.schema.json +43 -0
- package/tool/schema/base-templates.schema.json +34 -0
- package/tool/schema/config.schema.json +71 -0
- package/tool/schema/overlay-manifest.schema.json +86 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
|
|
3
|
+
"features": {
|
|
4
|
+
"./features/cross-distro-packages": {
|
|
5
|
+
"apt": "curl",
|
|
6
|
+
"apk": "curl"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"runServices": ["redpanda", "redpanda-console"],
|
|
10
|
+
"forwardPorts": [9092, 8080, 8081, 8082, 9644],
|
|
11
|
+
"portsAttributes": {
|
|
12
|
+
"9092": {
|
|
13
|
+
"label": "Redpanda Kafka API",
|
|
14
|
+
"onAutoForward": "notify"
|
|
15
|
+
},
|
|
16
|
+
"8080": {
|
|
17
|
+
"label": "Redpanda Console",
|
|
18
|
+
"onAutoForward": "openBrowser"
|
|
19
|
+
},
|
|
20
|
+
"8081": {
|
|
21
|
+
"label": "Schema Registry",
|
|
22
|
+
"onAutoForward": "notify"
|
|
23
|
+
},
|
|
24
|
+
"8082": {
|
|
25
|
+
"label": "HTTP Proxy",
|
|
26
|
+
"onAutoForward": "notify"
|
|
27
|
+
},
|
|
28
|
+
"9644": {
|
|
29
|
+
"label": "Admin API",
|
|
30
|
+
"onAutoForward": "notify"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"remoteEnv": {
|
|
34
|
+
"REDPANDA_BROKERS": "redpanda:9092",
|
|
35
|
+
"KAFKA_BROKERS": "redpanda:9092"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
version: '3.8'
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
redpanda:
|
|
5
|
+
image: docker.redpanda.com/redpandadata/redpanda:${REDPANDA_VERSION:-latest}
|
|
6
|
+
restart: unless-stopped
|
|
7
|
+
command:
|
|
8
|
+
- redpanda
|
|
9
|
+
- start
|
|
10
|
+
- --kafka-addr internal://0.0.0.0:9092,external://0.0.0.0:19092
|
|
11
|
+
- --advertise-kafka-addr internal://redpanda:9092,external://localhost:19092
|
|
12
|
+
- --pandaproxy-addr internal://0.0.0.0:8082,external://0.0.0.0:18082
|
|
13
|
+
- --advertise-pandaproxy-addr internal://redpanda:8082,external://localhost:18082
|
|
14
|
+
- --schema-registry-addr internal://0.0.0.0:8081,external://0.0.0.0:18081
|
|
15
|
+
- --rpc-addr redpanda:33145
|
|
16
|
+
- --advertise-rpc-addr redpanda:33145
|
|
17
|
+
- --mode dev-container
|
|
18
|
+
- --smp 1
|
|
19
|
+
- --memory 1G
|
|
20
|
+
volumes:
|
|
21
|
+
- redpanda-data:/var/lib/redpanda/data
|
|
22
|
+
ports:
|
|
23
|
+
- '${REDPANDA_KAFKA_PORT:-9092}:9092'
|
|
24
|
+
- '${REDPANDA_SCHEMA_REGISTRY_PORT:-8081}:8081'
|
|
25
|
+
- '${REDPANDA_PROXY_PORT:-8082}:8082'
|
|
26
|
+
- '${REDPANDA_ADMIN_PORT:-9644}:9644'
|
|
27
|
+
networks:
|
|
28
|
+
- devnet
|
|
29
|
+
healthcheck:
|
|
30
|
+
test: ['CMD-SHELL', "rpk cluster health | grep -q 'Healthy:.*true'"]
|
|
31
|
+
interval: 10s
|
|
32
|
+
timeout: 5s
|
|
33
|
+
retries: 5
|
|
34
|
+
start_period: 30s
|
|
35
|
+
|
|
36
|
+
redpanda-console:
|
|
37
|
+
image: docker.redpanda.com/redpandadata/console:${REDPANDA_CONSOLE_VERSION:-latest}
|
|
38
|
+
restart: unless-stopped
|
|
39
|
+
entrypoint: /bin/sh
|
|
40
|
+
command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml; /app/console"
|
|
41
|
+
environment:
|
|
42
|
+
CONFIG_FILEPATH: /tmp/config.yml
|
|
43
|
+
CONSOLE_CONFIG_FILE: |
|
|
44
|
+
kafka:
|
|
45
|
+
brokers: ["redpanda:9092"]
|
|
46
|
+
schemaRegistry:
|
|
47
|
+
enabled: true
|
|
48
|
+
urls: ["http://redpanda:8081"]
|
|
49
|
+
redpanda:
|
|
50
|
+
adminApi:
|
|
51
|
+
enabled: true
|
|
52
|
+
urls: ["http://redpanda:9644"]
|
|
53
|
+
connect:
|
|
54
|
+
enabled: false
|
|
55
|
+
ports:
|
|
56
|
+
- '${REDPANDA_CONSOLE_PORT:-8080}:8080'
|
|
57
|
+
networks:
|
|
58
|
+
- devnet
|
|
59
|
+
depends_on:
|
|
60
|
+
redpanda:
|
|
61
|
+
condition: service_healthy
|
|
62
|
+
|
|
63
|
+
volumes:
|
|
64
|
+
redpanda-data:
|
|
65
|
+
|
|
66
|
+
networks:
|
|
67
|
+
devnet:
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
id: redpanda
|
|
2
|
+
name: Redpanda
|
|
3
|
+
description: Kafka-compatible event streaming with web console
|
|
4
|
+
category: database
|
|
5
|
+
supports:
|
|
6
|
+
- compose
|
|
7
|
+
requires: []
|
|
8
|
+
suggests: []
|
|
9
|
+
conflicts: []
|
|
10
|
+
tags:
|
|
11
|
+
- database
|
|
12
|
+
- messaging
|
|
13
|
+
- streaming
|
|
14
|
+
- kafka
|
|
15
|
+
- redpanda
|
|
16
|
+
ports:
|
|
17
|
+
- 9092
|
|
18
|
+
- 8080
|
|
19
|
+
- 8081
|
|
20
|
+
- 8082
|
|
21
|
+
- 9644
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Verification script for Redpanda overlay
|
|
3
|
+
# Confirms Redpanda is installed and accessible
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
echo "🔍 Verifying Redpanda overlay..."
|
|
8
|
+
echo ""
|
|
9
|
+
|
|
10
|
+
# Check if Redpanda service is running
|
|
11
|
+
echo "1️⃣ Checking Redpanda service..."
|
|
12
|
+
# Wait up to 30 seconds for Redpanda to be ready
|
|
13
|
+
REDPANDA_READY=false
|
|
14
|
+
for i in {1..30}; do
|
|
15
|
+
if curl -s http://redpanda:9644/v1/cluster/health_overview &> /dev/null; then
|
|
16
|
+
echo " ✅ Redpanda service is ready"
|
|
17
|
+
REDPANDA_READY=true
|
|
18
|
+
break
|
|
19
|
+
fi
|
|
20
|
+
sleep 1
|
|
21
|
+
done
|
|
22
|
+
|
|
23
|
+
if [ "$REDPANDA_READY" = false ]; then
|
|
24
|
+
echo " ❌ Redpanda service not ready after 30 seconds"
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Check Redpanda Console
|
|
29
|
+
echo ""
|
|
30
|
+
echo "2️⃣ Checking Redpanda Console..."
|
|
31
|
+
CONSOLE_READY=false
|
|
32
|
+
for i in {1..30}; do
|
|
33
|
+
if curl -s http://redpanda-console:8080 &> /dev/null; then
|
|
34
|
+
echo " ✅ Redpanda Console is accessible"
|
|
35
|
+
CONSOLE_READY=true
|
|
36
|
+
break
|
|
37
|
+
fi
|
|
38
|
+
sleep 1
|
|
39
|
+
done
|
|
40
|
+
|
|
41
|
+
if [ "$CONSOLE_READY" = false ]; then
|
|
42
|
+
echo " ⚠️ Redpanda Console not ready (may still be starting)"
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
echo ""
|
|
46
|
+
echo "✅ Redpanda overlay verification complete"
|
|
47
|
+
echo " Kafka API: redpanda:9092"
|
|
48
|
+
echo " Console UI: http://localhost:8080"
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
# Rust Overlay
|
|
2
|
+
|
|
3
|
+
Adds Rust stable toolchain with cargo, rustfmt, clippy, and rust-analyzer for systems programming and high-performance applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Rust** - Latest stable version with rustup
|
|
8
|
+
- **cargo** - Rust package manager and build tool
|
|
9
|
+
- **rustfmt** - Official Rust code formatter
|
|
10
|
+
- **clippy** - Rust linter for catching common mistakes
|
|
11
|
+
- **rust-analyzer** - Language server for IDE features
|
|
12
|
+
- **VS Code Extensions:**
|
|
13
|
+
- rust-analyzer (rust-lang.rust-analyzer) - IntelliSense and code actions
|
|
14
|
+
- CodeLLDB (vadimcn.vscode-lldb) - Native debugger
|
|
15
|
+
- **Automatic dependency fetching** - Runs `cargo fetch` on container creation
|
|
16
|
+
|
|
17
|
+
## How It Works
|
|
18
|
+
|
|
19
|
+
This overlay uses the official devcontainers Rust feature to install Rust via rustup. The setup script installs essential Rust components (rustfmt, clippy, rust-src) and useful cargo extensions (cargo-watch, cargo-edit).
|
|
20
|
+
|
|
21
|
+
**Installation method:**
|
|
22
|
+
|
|
23
|
+
- Rust toolchain via rustup
|
|
24
|
+
- Components and tools via `rustup component add` and `cargo install`
|
|
25
|
+
- Tools accessible in ~/.cargo/bin
|
|
26
|
+
|
|
27
|
+
## Common Commands
|
|
28
|
+
|
|
29
|
+
### Project Initialization
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Create new binary project
|
|
33
|
+
cargo new myapp
|
|
34
|
+
|
|
35
|
+
# Create new library
|
|
36
|
+
cargo new --lib mylib
|
|
37
|
+
|
|
38
|
+
# Initialize in existing directory
|
|
39
|
+
cargo init
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Building and Running
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Build project
|
|
46
|
+
cargo build
|
|
47
|
+
|
|
48
|
+
# Build with optimizations (release mode)
|
|
49
|
+
cargo build --release
|
|
50
|
+
|
|
51
|
+
# Run application
|
|
52
|
+
cargo run
|
|
53
|
+
|
|
54
|
+
# Run with arguments
|
|
55
|
+
cargo run -- arg1 arg2
|
|
56
|
+
|
|
57
|
+
# Check code without building
|
|
58
|
+
cargo check
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Testing
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Run all tests
|
|
65
|
+
cargo test
|
|
66
|
+
|
|
67
|
+
# Run specific test
|
|
68
|
+
cargo test test_name
|
|
69
|
+
|
|
70
|
+
# Run tests with output
|
|
71
|
+
cargo test -- --nocapture
|
|
72
|
+
|
|
73
|
+
# Run benchmarks
|
|
74
|
+
cargo bench
|
|
75
|
+
|
|
76
|
+
# Run with coverage (requires tarpaulin)
|
|
77
|
+
cargo install cargo-tarpaulin
|
|
78
|
+
cargo tarpaulin
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Code Quality
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Format code
|
|
85
|
+
cargo fmt
|
|
86
|
+
|
|
87
|
+
# Check formatting without changes
|
|
88
|
+
cargo fmt -- --check
|
|
89
|
+
|
|
90
|
+
# Lint with clippy
|
|
91
|
+
cargo clippy
|
|
92
|
+
|
|
93
|
+
# Clippy with all warnings
|
|
94
|
+
cargo clippy -- -W clippy::all
|
|
95
|
+
|
|
96
|
+
# Fix automatically fixable issues
|
|
97
|
+
cargo clippy --fix
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Dependency Management
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Add dependency (requires cargo-edit)
|
|
104
|
+
cargo add tokio
|
|
105
|
+
|
|
106
|
+
# Add dev dependency
|
|
107
|
+
cargo add --dev serde
|
|
108
|
+
|
|
109
|
+
# Remove dependency
|
|
110
|
+
cargo rm tokio
|
|
111
|
+
|
|
112
|
+
# Update dependencies
|
|
113
|
+
cargo update
|
|
114
|
+
|
|
115
|
+
# List dependencies
|
|
116
|
+
cargo tree
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Watch Mode
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Auto-rebuild on file changes (requires cargo-watch)
|
|
123
|
+
cargo watch -x run
|
|
124
|
+
|
|
125
|
+
# Run tests on changes
|
|
126
|
+
cargo watch -x test
|
|
127
|
+
|
|
128
|
+
# Run clippy on changes
|
|
129
|
+
cargo watch -x clippy
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Use Cases
|
|
133
|
+
|
|
134
|
+
- **Systems programming** - Operating systems, device drivers, embedded systems
|
|
135
|
+
- **WebAssembly** - High-performance web applications (wasm-pack)
|
|
136
|
+
- **CLI tools** - Fast command-line utilities (clap, structopt)
|
|
137
|
+
- **Web servers** - High-performance APIs (Actix, Axum, Rocket)
|
|
138
|
+
- **Game engines** - Game development (Bevy, Amethyst)
|
|
139
|
+
- **Blockchain** - Cryptocurrency and smart contracts (Substrate, Solana)
|
|
140
|
+
|
|
141
|
+
**Integrates well with:**
|
|
142
|
+
|
|
143
|
+
- `postgres`, `redis` - Database drivers (sqlx, deadpool)
|
|
144
|
+
- `docker-sock` - Bollard (Docker SDK for Rust)
|
|
145
|
+
- `prometheus` - Prometheus Rust client
|
|
146
|
+
- `otel-collector` - OpenTelemetry Rust SDK
|
|
147
|
+
|
|
148
|
+
## Configuration
|
|
149
|
+
|
|
150
|
+
### Rust Version
|
|
151
|
+
|
|
152
|
+
The overlay installs **latest stable** Rust. To use nightly:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Switch to nightly
|
|
156
|
+
rustup default nightly
|
|
157
|
+
|
|
158
|
+
# Or use nightly for specific project
|
|
159
|
+
rustup override set nightly
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Cargo Configuration
|
|
163
|
+
|
|
164
|
+
Create `.cargo/config.toml` in project root:
|
|
165
|
+
|
|
166
|
+
```toml
|
|
167
|
+
[build]
|
|
168
|
+
# Use all CPU cores
|
|
169
|
+
jobs = 8
|
|
170
|
+
|
|
171
|
+
[target.x86_64-unknown-linux-gnu]
|
|
172
|
+
# Use lld linker for faster builds
|
|
173
|
+
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
|
|
174
|
+
|
|
175
|
+
[alias]
|
|
176
|
+
# Custom aliases
|
|
177
|
+
b = "build"
|
|
178
|
+
r = "run"
|
|
179
|
+
t = "test"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Application Integration
|
|
183
|
+
|
|
184
|
+
### Web Server with Axum
|
|
185
|
+
|
|
186
|
+
**Cargo.toml:**
|
|
187
|
+
|
|
188
|
+
```toml
|
|
189
|
+
[dependencies]
|
|
190
|
+
axum = "0.7"
|
|
191
|
+
tokio = { version = "1", features = ["full"] }
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**main.rs:**
|
|
195
|
+
|
|
196
|
+
```rust
|
|
197
|
+
use axum::{routing::get, Router};
|
|
198
|
+
|
|
199
|
+
#[tokio::main]
|
|
200
|
+
async fn main() {
|
|
201
|
+
let app = Router::new()
|
|
202
|
+
.route("/", get(|| async { "Hello from Rust!" }));
|
|
203
|
+
|
|
204
|
+
let listener = tokio::net::TcpListener::bind("0.0.0.0:8080")
|
|
205
|
+
.await
|
|
206
|
+
.unwrap();
|
|
207
|
+
|
|
208
|
+
axum::serve(listener, app).await.unwrap();
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Run:**
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
cargo run
|
|
216
|
+
# Access at http://localhost:8080
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### PostgreSQL with sqlx
|
|
220
|
+
|
|
221
|
+
```rust
|
|
222
|
+
use sqlx::postgres::PgPoolOptions;
|
|
223
|
+
|
|
224
|
+
#[tokio::main]
|
|
225
|
+
async fn main() -> Result<(), sqlx::Error> {
|
|
226
|
+
let pool = PgPoolOptions::new()
|
|
227
|
+
.max_connections(5)
|
|
228
|
+
.connect("postgres://postgres:postgres@postgres/mydb")
|
|
229
|
+
.await?;
|
|
230
|
+
|
|
231
|
+
let row: (i64,) = sqlx::query_as("SELECT COUNT(*) FROM users")
|
|
232
|
+
.fetch_one(&pool)
|
|
233
|
+
.await?;
|
|
234
|
+
|
|
235
|
+
println!("User count: {}", row.0);
|
|
236
|
+
Ok(())
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Troubleshooting
|
|
241
|
+
|
|
242
|
+
### Issue: rust-analyzer not working
|
|
243
|
+
|
|
244
|
+
**Symptoms:**
|
|
245
|
+
|
|
246
|
+
- No IntelliSense
|
|
247
|
+
- "rust-analyzer failed to load workspace" error
|
|
248
|
+
|
|
249
|
+
**Solution:**
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
# Install rust-src component
|
|
253
|
+
rustup component add rust-src
|
|
254
|
+
|
|
255
|
+
# Reload VS Code window
|
|
256
|
+
# Command Palette -> "Developer: Reload Window"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Issue: Slow compilation times
|
|
260
|
+
|
|
261
|
+
**Solution:**
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
# Use sccache for caching
|
|
265
|
+
cargo install sccache
|
|
266
|
+
export RUSTC_WRAPPER=sccache
|
|
267
|
+
|
|
268
|
+
# Use lld linker (faster)
|
|
269
|
+
sudo apt-get install lld
|
|
270
|
+
# Add to .cargo/config.toml (see Configuration section)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Issue: Cargo.lock conflicts
|
|
274
|
+
|
|
275
|
+
**Solution:**
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# Update Cargo.lock
|
|
279
|
+
cargo update
|
|
280
|
+
|
|
281
|
+
# Or delete and regenerate
|
|
282
|
+
rm Cargo.lock
|
|
283
|
+
cargo build
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## References
|
|
287
|
+
|
|
288
|
+
- [Official Rust Documentation](https://doc.rust-lang.org/) - The Rust Book and reference
|
|
289
|
+
- [Rust by Example](https://doc.rust-lang.org/rust-by-example/) - Learn by examples
|
|
290
|
+
- [crates.io](https://crates.io/) - Rust package registry
|
|
291
|
+
- [rust-analyzer](https://rust-analyzer.github.io/) - Language server
|
|
292
|
+
- [Clippy Lints](https://rust-lang.github.io/rust-clippy/) - All clippy lints
|
|
293
|
+
|
|
294
|
+
**Related Overlays:**
|
|
295
|
+
|
|
296
|
+
- `postgres` - PostgreSQL with sqlx/diesel
|
|
297
|
+
- `redis` - Redis with redis-rs
|
|
298
|
+
- `docker-sock` - Bollard Docker SDK
|
|
299
|
+
- `prometheus` - Prometheus Rust client
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
|
|
3
|
+
"features": {
|
|
4
|
+
"./features/cross-distro-packages": {
|
|
5
|
+
"apt": "build-essential pkg-config libssl-dev",
|
|
6
|
+
"apk": "build-base pkgconfig openssl-dev"
|
|
7
|
+
},
|
|
8
|
+
"ghcr.io/devcontainers/features/rust:1": {
|
|
9
|
+
"version": "latest",
|
|
10
|
+
"profile": "default"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"customizations": {
|
|
14
|
+
"vscode": {
|
|
15
|
+
"extensions": ["rust-lang.rust-analyzer", "vadimcn.vscode-lldb"],
|
|
16
|
+
"settings": {
|
|
17
|
+
"rust-analyzer.checkOnSave.command": "clippy",
|
|
18
|
+
"[rust]": {
|
|
19
|
+
"editor.formatOnSave": true,
|
|
20
|
+
"editor.defaultFormatter": "rust-lang.rust-analyzer"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"remoteEnv": {
|
|
26
|
+
"PATH": "${containerEnv:HOME}/.cargo/bin:${containerEnv:PATH}"
|
|
27
|
+
},
|
|
28
|
+
"forwardPorts": [8080, 3000],
|
|
29
|
+
"portsAttributes": {
|
|
30
|
+
"8080": {
|
|
31
|
+
"label": "Web Server",
|
|
32
|
+
"onAutoForward": "openBrowser"
|
|
33
|
+
},
|
|
34
|
+
"3000": {
|
|
35
|
+
"label": "Dev Server",
|
|
36
|
+
"onAutoForward": "notify"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Rust setup script - Install Rust components and tools
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
echo "🔧 Setting up Rust development environment..."
|
|
7
|
+
|
|
8
|
+
# Install common Rust components and tools
|
|
9
|
+
echo "📦 Installing Rust components..."
|
|
10
|
+
|
|
11
|
+
# rustfmt (Code formatter)
|
|
12
|
+
rustup component add rustfmt || echo "⚠️ rustfmt already installed"
|
|
13
|
+
|
|
14
|
+
# clippy (Linter)
|
|
15
|
+
rustup component add clippy || echo "⚠️ clippy already installed"
|
|
16
|
+
|
|
17
|
+
# rust-src (Source code for standard library)
|
|
18
|
+
rustup component add rust-src || echo "⚠️ rust-src already installed"
|
|
19
|
+
|
|
20
|
+
# Install common cargo tools
|
|
21
|
+
echo "📦 Installing cargo tools..."
|
|
22
|
+
|
|
23
|
+
# cargo-watch (Auto-rebuild on file changes)
|
|
24
|
+
cargo install cargo-watch || echo "⚠️ cargo-watch already installed"
|
|
25
|
+
|
|
26
|
+
# cargo-edit (Manage dependencies from CLI)
|
|
27
|
+
cargo install cargo-edit || echo "⚠️ cargo-edit already installed"
|
|
28
|
+
|
|
29
|
+
# Install project dependencies if Cargo.toml exists
|
|
30
|
+
if [ -f "Cargo.toml" ]; then
|
|
31
|
+
echo "📦 Rust project detected, building dependencies..."
|
|
32
|
+
cargo fetch || echo "⚠️ cargo fetch failed"
|
|
33
|
+
cargo build || echo "⚠️ cargo build failed or skipped"
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
echo "✓ Rust setup complete"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Verification script for Rust overlay
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
echo "🔍 Verifying Rust overlay..."
|
|
7
|
+
echo ""
|
|
8
|
+
|
|
9
|
+
# Check Rust is installed
|
|
10
|
+
echo "1️⃣ Checking Rust..."
|
|
11
|
+
if command -v rustc &> /dev/null; then
|
|
12
|
+
rustc --version
|
|
13
|
+
echo " ✅ Rust found"
|
|
14
|
+
else
|
|
15
|
+
echo " ❌ Rust not found"
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
# Check Cargo is installed
|
|
20
|
+
echo ""
|
|
21
|
+
echo "2️⃣ Checking Cargo..."
|
|
22
|
+
if command -v cargo &> /dev/null; then
|
|
23
|
+
cargo --version
|
|
24
|
+
echo " ✅ Cargo found"
|
|
25
|
+
else
|
|
26
|
+
echo " ❌ Cargo not found"
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Check rustfmt
|
|
31
|
+
echo ""
|
|
32
|
+
echo "3️⃣ Checking rustfmt..."
|
|
33
|
+
if command -v rustfmt &> /dev/null; then
|
|
34
|
+
rustfmt --version
|
|
35
|
+
echo " ✅ rustfmt found"
|
|
36
|
+
else
|
|
37
|
+
echo " ⚠️ rustfmt not found"
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Check clippy
|
|
41
|
+
echo ""
|
|
42
|
+
echo "4️⃣ Checking clippy..."
|
|
43
|
+
if command -v cargo-clippy &> /dev/null; then
|
|
44
|
+
cargo clippy --version
|
|
45
|
+
echo " ✅ clippy found"
|
|
46
|
+
else
|
|
47
|
+
echo " ⚠️ clippy not found"
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
echo ""
|
|
51
|
+
echo "✅ Rust overlay verification complete"
|