Scenario

%3cluster_acluster_bcluster_caabba->ba_text📥filedownloadccb->cb_text🪣s3bucketc_text📤s3object

Shell Script

bucket_name='azriel-peace-demo-bash'
file_path='web_app.tar'
object_key='web_app.tar'

curl --fail \
  -o "${file_path}" \
  --location \
  https://github.com/azriel91/web_app/releases/download/0.1.1/web_app.tar

aws s3api create-bucket \
  --bucket "${bucket_name}" \
  --acl private \
  --create-bucket-configuration LocationConstraint=ap-southeast-2 |
  bat -l json

aws s3api put-object \
  --bucket "${bucket_name}" \
  --key "${object_key}" \
  --body "${file_path}" |
  bat -l json
aws s3api delete-object \
  --bucket "${bucket_name}" \
  --key "${object_key}" |
  bat -l json

aws s3api delete-bucket --bucket "${bucket_name}" | bat -l json

rm -f "${file_path}"

What does automation look like, from the perspective of an automation tool developer, or a workflow designer.

  • Clarity between concept and code.
  • Easy to write.
  • Fast feedback when developing automation.
  • Provide good UX without needing to write UI code.

Command Context

At the bottom of every page, we will be building up a cmd_context, which holds the information about a workflow. Different commands can be invoked with the cmd_context to gather information about the workflow.

let mut cmd_context = CmdContext::builder()
    /* ?? */
    .build();

StatusCmd(&mut cmd_context).await?;
DeployCmd(&mut cmd_context).await?;