# Configure environment and secrets for Echo

## Summary
Configuration and secrets for a Echo app on Ample. Verified on Echo: an --env value delivered encrypted and reported as present without being echoed (secret=set). Build and start: CGO_ENABLED=0 go build -o app ./... then ./app on the ubuntu-24.04 template (go.sum committed for a reproducible build).

## Resource Requirements
- **Compute**: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.

## Prerequisites
- A Echo project (CGO_ENABLED=0 go build -o app ./... then ./app on the ubuntu-24.04 template (go.sum committed for a reproducible build))
- An Ample account token with servers:write

## Workflow Steps
1. **Build and start**: CGO_ENABLED=0 go build -o app ./... then ./app on the ubuntu-24.04 template (go.sum committed for a reproducible build); the server must bind 0.0.0.0 on PORT.
2. **Pass values on deploy**: Use --env KEY=value (repeatable) or --env-file; values are encrypted at rest and reused on redeploys. Declare names only in ample.toml.
   
   Command: `ample deploy . --name  --public --env MY_SECRET=...`
3. **Verify**: Fetch the live URL and /p/configuration-secrets on the example; on failure read the build and runtime logs.
   
   Command: `ample logs  --kind build`

## Tested Configuration
- **Template**: ubuntu-24.04
- **Runtime**: go
- **Size**: s-1vcpu-1gb
- **Build**: CGO_ENABLED=0 go build -o app ./...
- **Start**: ./app

## Examples
### Echo pattern fixture
**Description**: Verified configuration and secrets on Echo.
**Source Ref**: tests/deploy-canaries/echo-patterns

## Success Checks
- **App responds on its public URL**:  Check by using `/` and expect to see `ample canary echo patterns`.
- **Configuration-secrets check from the example**: Check by using `/p/configuration-secrets` and expect to see `see the pattern fixture checks`.

## Limitations
- Verified on the ubuntu-24.04 template at s-1vcpu-1gb; other sizes and Echo major versions are not verified.
- Region, compliance attestations and request-duration limits are unknown and not claimed.

## Cost Estimate
- **Currency**: USD
- **Monthly Amount**: 5.0
**Note**: Always-on monthly price of the tested sizes; apps auto-pause when idle. Buckets are allocation-priced per quota and not included.

### Cost Breakdown
- **App Server**: 
  - **Size**: s-1vcpu-1gb
  - **Quantity**: 1.0
  - **Monthly Amount**: 5.0

## Evidence Summary
- **Kind**: canary_run  
  **Summary**: Echo pattern fixture deployed on Ample (CGO_ENABLED=0 go build -o app ./... then ./app on the ubuntu-24.04 template (go.sum committed for a reproducible build)); for this guide: an --env value delivered encrypted and reported as present without being echoed (secret=set).
  **Observed At**: 2026-09-21T02:34:39Z  
  **Expires At**: 2027-03-20T02:34:39Z  
  **Scope**: checks=[/p/configuration-secrets], template=ubuntu-24.04

## Next Actions
- **Action**: Browse the catalog index  
  **Method**: GET  
  **Relative Path**: /v1/catalog  
- **Action**: Search published recipes by intent, stack and constraints  
  **Method**: POST  
  **Relative Path**: /v1/catalog/search  
- **Action**: Prepare a side-effect-free deployment plan for an authorized project  
  **Method**: POST  
  **Relative Path**: /v1/catalog/plan  
- **Action**: Read the existing agent authentication setup  
  **Method**: GET  
  **Relative Path**: /mcp/setup  
- **Action**: Browse Echo  
  **Method**: GET  
  **Relative Path**: /v1/catalog/nodes/stack%3Aframework-echo  
- **Action**: Browse Configure deployment  
  **Method**: GET  
  **Relative Path**: /v1/catalog/nodes/intent%3Aconfigure-deployment  
- **Action**: Browse Public web service  
  **Method**: GET  
  **Relative Path**: /v1/catalog/nodes/pattern%3Apublic-web-service
