Skip to content

::alice

Alice is an infrastructure automation tool designed to simplify the provisioning and configuration of a DigitalOcean droplet. It uses a combination of OpenTofu, Ansible, and Clojure/Babashka to provide a seamless setup experience.

The tool focuses on setting up a Transmission server on a DigitalOcean droplet, including local SSH configuration for easy access.

  • Infrastructure Provisioning: Uses OpenTofu to create a DigitalOcean droplet (s-1vcpu-1gb-35gb-intel, ubuntu-25-10-x64).
  • Remote Configuration: Employs Ansible to install and configure Transmission and Transmission-daemon.
  • Local Configuration: Uses Ansible locally to update your ~/.ssh/config for easy connection to the new host.
  • Workflow Management: Orchestrated by Clojure and Babashka, leveraging big-config for configuration and task execution.
  • devenv: To set up the development environment.
  • DigitalOcean API Token: Required for OpenTofu to manage resources.
  • SSH Key: The OpenTofu configuration expects an SSH key with ID 812184 (you may need to modify this in resources/io/github/amiorin/alice/tools/tofu/main.tf).

Use devenv to enter the development shell, which will automatically provide all necessary tools (Babashka, Clojure, OpenTofu, Ansible, etc.):

Terminal window
direnv allow # if you use direnv
# OR
devenv shell

Set the DIGITALOCEAN_TOKEN environment variable:

Terminal window
export TF_VAR_do_token="your_digitalocean_token"

The project uses Babashka (bb) to run tasks.

To provision the droplet, configure the server, and update your local SSH config:

Terminal window
bb alice create

You can also run tasks individually:

  • Tofu Tasks:

    Terminal window
    bb tofu render tofu:init tofu:apply:-auto-approve
    bb tofu render tofu:init tofu:destroy:-auto-approve
  • Ansible Remote Tasks:

    Terminal window
    bb ansible render ansible-playbook:main.yml
  • Ansible Local Tasks:

    Terminal window
    bb ansible-local render ansible-playbook:main.yml

To destroy the provisioned infrastructure:

Terminal window
bb alice delete
  • src/io/github/amiorin/alice/: Clojure source code for workflow orchestration.
  • resources/io/github/amiorin/alice/tools/: Configuration templates and scripts.
    • tofu/: OpenTofu (Terraform) configuration for DigitalOcean.
    • ansible/: Ansible playbook for remote server configuration.
    • ansible-local/: Ansible playbook for local machine configuration.
  • deps.edn: Clojure dependencies.
  • bb.edn: Babashka task definitions.
  • devenv.nix: Development environment configuration.

Copyright © 2026 Alberto Miorin

Distributed under the MIT License.