Project

scout-camp

0.0
The project is in a healthy, maintained state
Functionalities to deploy and use scouts in remote servers like AWS
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Project Readme

Scout-camp

Deploy and serve Scout computations. Scout workflows (defined with scout-gear) describe computation as a dependency graph independent of where it runs; scout-camp turns those workflows into deployed, remotely accessible infrastructure: provisioning via Terraform, remote execution over SSH, S3-backed storage, AWS Lambda serving, and a Sinatra web layer.

Where scout-camp sits in the Scout ecosystem

scout-essentials   core utilities: Path, Open, Persist, Resource, CMD, Log, Hook, Annotation
       ▲
scout-gear         workflow layer: Workflow, Task, Step (incl. Step#bundle_files)
       ▲
scout-camp         provisioning, remote execution, S3, Lambda, Sinatra

Scout-camp composes and extends those foundations — Hook.apply over Open/Path for S3, an Annotation over Step for offsite execution, a Resource.produce override for sync/file servers — but never re-implements workflow or path machinery. Related repositories: scout-essentials, scout-gear, scout-rig, scout-ai.

Five capabilities

Capability Entry point What it actually does
Terraform provisioning TerraformDSL → TerraformDSL::Deployment generates .tf files from Ruby (templates in share/terraform/), drives the terraform CLI
Remote execution OffsiteStep annotation + SSHLine ships a Ruby script over a persistent SSH channel; remote runs Workflow.produce(job); results rsynced back
Cloud storage Open::S3 / Path::S3 hooks s3:// URIs work in Open/Path through the Hook claim protocol
Serverless share/aws/lambda_function.rb + scout terraform add lambda packages handler + gems + workflows into a Lambda zip; all state on S3
Web serving SinatraScout* extensions + ScoutRender composable Sinatra modules; templates rendered as cached Steps

A concrete flow using three of them:

require 'scout-camp'

# 1. Provision
terraform = TerraformDSL.new
terraform.provider :aws, region: 'us-east-1'
host = terraform.add :aws, :host, ami: 'ami-…', instance_type: 't3.micro', name: 'web'
dir = Scout.var.deployments['demo']
terraform.config dir                      # writes the .tf files
deployment = TerraformDSL::Deployment.new dir
deployment.apply                          # init → plan → apply
ip = deployment.output 'web', 'aws_instance_ip'

# 2. Run a step offsite on that host
job = MyWorkflow.job(:heavy_computation, 'job-1', param: 42)
OffsiteStep.setup job, server: ip
job.run   # inputs rsynced; Workflow.produce(job) runs remotely; bundle_files synced back

# 3. Serve
class App < Sinatra::Base
  register SinatraScoutBase            # must be first
  register SinatraScoutWorkflow
  add_workflow MyWorkflow
end

What actually crosses the SSH boundary

Scout-camp does not transfer your workflow's code. For an offsite step it sends a small Ruby script that Workflow.require_workflows the workflow by name on the remote host, rebuilds the job there (optionally loading inputs rsynced to .scout/tmp/step_inputs/…), runs Workflow.produce(job) — or, with batch: true, remote orchestration through rbbt/hpc and Workflow::Orchestrator/Workflow::Scheduler — and returns job.bundle_files, which camp rsyncs back with path relocation on both ends.

Consequences: the remote host needs passwordless SSH, Ruby, scout-essentials + scout-gear, and the workflow installed; the scheduler/HPC stack it drives is rbbt's, not camp's; and paths are exchanged as resource-identified (pkgdir-relative) paths so the same artifact lands in the equivalent location on each machine. scout offsite <where> <cmd> runs arbitrary commands on the same channel, and scout sync <path> drives the same sync machinery.

Resources can also be acquired remotely: Resource.produce falls back to a sync server (Scout.etc/sync_servers.yaml, rsync) or a file server (Scout.etc/file_servers.yaml, HTTP) before producing locally.

Commands

scout terraform add lambda|relay <name>, scout terraform plan|apply|destroy|list|status|outputs|remove|task|lambda_task, scout offsite <where> <command>, scout sync <path> [<path_map>], scout find/scout glob. Note scout terraform outputs currently prints element states (it duplicates status); read output values with Deployment#outputs from Ruby. Full reference in Using Commands.

Documentation

Installation

gem 'scout-camp'

The gemspec declares scout-essentials, aws-sdk-s3, sinatra, mimemagic, omniauth, omniauth-google-oauth2. At runtime scout-camp also requires scout-gear (workflow execution), net-ssh (offsite) and tilt (rendering), none of which are declared in the gemspec. External tools per capability: terraform CLI, rsync/ssh, the aws CLI (for Open::S3.sync), zip (for Lambda packaging).

Copyright

Copyright (c) 2025 Miguel Vazquez. See LICENSE.