Skip to content

Repository files navigation

Alfred

Is your favorite butler, who's able to run and monitor jobs to be executed on virtual machines in the cloud.

Dependencies

  • bash
  • docker
  • ssh
  • tar
  • zstd

Setup

  1. Install the required dependencies.
  2. Download Alfred's client binary and put it in your $PATH.
  3. Your SSH key must be added to Alfred remote server by an administrator. Ask @gnutix.
  4. Add the Alfred host key to your known_hosts: ssh-keyscan -H alfred.tipee.dev >> ~/.ssh/known_hosts
  5. You should now be able to run alfred version and see the version of the remote server.

With Nix, the flake's default package builds the client from source: nix profile install github:tipee-sa/alfred, or take github:tipee-sa/alfred as a flake input. Nix then handles updates, and alfred self-update refuses to run.

Usage

Run alfred --help to see the list of available commands and options.

Setup dev environment

Nix

The flake's devshell provides every tool below, with the protoc plugins pinned to the versions the generated code expects. Enter it with nix develop, or run direnv allow once to have it loaded automatically.

Docker (daemon and CLI) and SSH still come from the host.

Required tools

  • Just (command runner)
  • Go 1.24+
  • Reflex (optional, for auto-reload during development)
    • go install github.com/cespare/reflex@latest
  • Protocol Buffer (needed for gRPC)
    • Download the protoc compiler archive, unpack it
    • Move the bin/protoc file to /usr/local/bin/protoc
    • Move the include/google folder to /usr/local/include/google
    • Install Go plugins (these exact versions; newer ones generate different code):
    • If not done already, add $(go env GOPATH)/bin to your $PATH

Run alfred server in local

Commands

Run the server:

just server

Run a test job against the local server:

just run

Remote configuration

By default, the alfred client will connect to the production server.

For development, you can override the default remote by setting the ALFRED_REMOTE="localhost:25373" environment variable to point to your local server. You can also pass the --remote localhost:25373 to alfred's commands each time.

OpenStack credentials

To run alfred server with the OpenStack provisioner, you need credentials to access the OpenStack API. Ask @BastienClement.

Project maintenance

Releasing the client binary

Releasing a new version of the client binary is done by creating a release on GitHub. The binaries are automatically created for different platforms by a GitHub Action.

Deploying the server binary

Deployment is done manually using a GitHub Action. Beware that running jobs are stopped during the deployment.

Updating Alfred nodes' image

The Alfred nodes' image is maintained using Packer in a separate repository. Ask @BastienClement, he's the only one who can do it for now...

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages