Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ body:
- type: textarea
id: report-output
attributes:
label: omakase version
description: Please paste the output of the command `omakase version`
label: docket version
description: Please paste the output of the command `docket version`
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
- type: markdown
attributes:
value: |
While pull requests are always welcome, feel free to fill this out with an idea of what you would like to happen and we can discuss if and how it should be implemented in `omakase`.
While pull requests are always welcome, feel free to fill this out with an idea of what you would like to happen and we can discuss if and how it should be implemented in `docket`.

Consider [sponsoring Dokku](https://github.com/sponsors/dokku). Sponsorship goes directly to supporting activities such as implementing new features and upgrading existing functionality.
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ validation/*
# .env files
.env*

omakase
docket
4 changes: 2 additions & 2 deletions Dockerfile.hub
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM scratch
COPY ./build/linux/omakase /omakase
ENTRYPOINT ["/omakase"]
COPY ./build/linux/docket /docket
ENTRYPOINT ["/docket"]
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
NAME = omakase
EMAIL = omakase@josediazgonzalez.com
NAME = docket
EMAIL = docket@josediazgonzalez.com
MAINTAINER = dokku
MAINTAINER_NAME = Jose Diaz-Gonzalez
REPOSITORY = omakase
REPOSITORY = docket
HARDWARE = $(shell uname -m)
SYSTEM_NAME = $(shell uname -s | tr '[:upper:]' '[:lower:]')
BASE_VERSION ?= 0.1.0
Expand Down
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# omakase
# docket

> Note: this is a heavy work in progress. YMMV.
> Should we change the name? It's a "cute" name but doesn't really help end-users
> and could be seen as fetishisation of Japanese culture. New name suggestions
> welcome!

A method to pre-package and ship applications on Dokku.

## Background

While Ansible is all well and good, having something native to Dokku for shipping applications is awesome. The `omakase` package allows users to specify exactly what it means to be an app, while allowing for some minimal customization (which is against the `omakase` spirit but here we are).
While Ansible is all well and good, having something native to Dokku for shipping applications is awesome. The `docket` package allows users to specify exactly what it means to be an app, while allowing for some minimal customization.

This package provides the above functionality by exposing the modules from `ansible-dokku` within a single Golang binary. Users of `ansible-dokku` based task lists should be able to use their existing tasks with minimal changes, while organizations can decide to expose apps in easy to use methods for their users.

Expand Down Expand Up @@ -37,24 +34,24 @@ Run it:

```shell
# from the same directory as the tasks.yml
omakase
docket
```

A task file can also be specified via flag, and may be a file retrieved via http:

```shell
# alternate path
omakase --tasks path/to/task.yml
docket --tasks path/to/task.yml

# html file
omakase --tasks http://dokku.com/omakase/example.yml
docket --tasks http://dokku.com/docket/example.yml
```

Some other ideas:

- This could be automatically applied from within a repository if a `.dokku/task.yml` was found. In such a case, certain tasks would be added to a denylist and would be ignored during the run (such as dokku_app or dokku_sync).
- Dokku may expose a command such as dokku app:install that would allow users to invoke omakase to install apps.
- A web ui could expose a web ui to customize remote task files and then call `omakase` directly on the generated output.
- Dokku may expose a command such as dokku app:install that would allow users to invoke docket to install apps.
- A web ui could expose a web ui to customize remote task files and then call `docket` directly on the generated output.

### Inputs

Expand All @@ -79,7 +76,7 @@ With the above, the following method is used to override the `name` variable. Om

```shell
# from the same directory as the tasks.yml
omakase --name lollipop
docket --name lollipop
```

Any inputs for a given task file will also show up in the `--help` output.
Expand Down Expand Up @@ -109,7 +106,7 @@ Inputs can have the following properties:
- `int`
- `string`

If all inputs are specified on the CLI, then they are injected as is. Otherwise, unless the `--no-interactive` flag is specified, `omakase` will ask for values for each input, with the cli-specified values merged onto the task file default values as defaults.
If all inputs are specified on the CLI, then they are injected as is. Otherwise, unless the `--no-interactive` flag is specified, `docket` will ask for values for each input, with the cli-specified values merged onto the task file default values as defaults.

Finally, the following input keys are reserved for internal usage:

Expand All @@ -120,7 +117,7 @@ Finally, the following input keys are reserved for internal usage:

### Tasks

All implemented tasks should closely follow those available via the `ansible-dokku` library. Additionally, `omakase` will expose a few custom tasks that are specific to this package to ease migration from pure ansible.
All implemented tasks should closely follow those available via the `ansible-dokku` library. Additionally, `docket` will expose a few custom tasks that are specific to this package to ease migration from pure ansible.

Tasks will have both a `name` and an execution context, where the context maps to a single implemented modules. Tasks can be templated out via the variables from the `inputs` section, and may also use any functions exposed by `gliderlabs/sigil`.

Expand Down
2 changes: 1 addition & 1 deletion arguments.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"
"io"
"omakase/tasks"
"docket/tasks"
"strconv"

sigil "github.com/gliderlabs/sigil"
Expand Down
12 changes: 6 additions & 6 deletions arguments_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"omakase/tasks"
"docket/tasks"
"strings"
"testing"
)
Expand Down Expand Up @@ -57,27 +57,27 @@ func TestGetTaskYamlFilename(t *testing.T) {
}{
{
name: "default when no --tasks flag",
args: []string{"omakase"},
args: []string{"docket"},
expected: "tasks.yml",
},
{
name: "separate --tasks flag",
args: []string{"omakase", "--tasks", "custom.yml"},
args: []string{"docket", "--tasks", "custom.yml"},
expected: "custom.yml",
},
{
name: "equals --tasks=flag",
args: []string{"omakase", "--tasks=custom.yml"},
args: []string{"docket", "--tasks=custom.yml"},
expected: "custom.yml",
},
{
name: "--tasks at end with no value",
args: []string{"omakase", "--tasks"},
args: []string{"docket", "--tasks"},
expected: "tasks.yml",
},
{
name: "--tasks with other flags before",
args: []string{"omakase", "--app", "myapp", "--tasks", "other.yml"},
args: []string{"docket", "--app", "myapp", "--tasks", "other.yml"},
expected: "other.yml",
},
{
Expand Down
2 changes: 1 addition & 1 deletion generate/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package main
import (
"fmt"
"log"
"omakase/tasks"
"docket/tasks"
"os"
"path/filepath"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module omakase
module docket

go 1.25.0

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"log"
"omakase/tasks"
"docket/tasks"
"os"
"strings"

Expand Down
8 changes: 4 additions & 4 deletions subprocess/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestCallExecCommandFailure(t *testing.T) {

func TestCallExecCommandNotFound(t *testing.T) {
_, err := CallExecCommand(ExecCommandInput{
Command: "nonexistent-binary-omakase-test-12345",
Command: "nonexistent-binary-docket-test-12345",
})
if err == nil {
t.Fatal("expected error for nonexistent command")
Expand All @@ -120,13 +120,13 @@ func TestCallExecCommandNotFound(t *testing.T) {
func TestCallExecCommandWithEnv(t *testing.T) {
resp, err := CallExecCommand(ExecCommandInput{
Command: "env",
Env: map[string]string{"OMAKASE_TEST_VAR": "test123"},
Env: map[string]string{"DOCKET_TEST_VAR": "test123"},
})
if err != nil {
t.Fatalf("CallExecCommand failed: %v", err)
}
if !strings.Contains(resp.StdoutContents(), "OMAKASE_TEST_VAR=test123") {
t.Errorf("stdout = %q, want it to contain 'OMAKASE_TEST_VAR=test123'", resp.StdoutContents())
if !strings.Contains(resp.StdoutContents(), "DOCKET_TEST_VAR=test123") {
t.Errorf("stdout = %q, want it to contain 'DOCKET_TEST_VAR=test123'", resp.StdoutContents())
}
}

Expand Down
2 changes: 1 addition & 1 deletion tasks/app_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package tasks

import (
"fmt"
"omakase/subprocess"
"docket/subprocess"

yaml "gopkg.in/yaml.v3"
)
Expand Down
2 changes: 1 addition & 1 deletion tasks/config_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"omakase/subprocess"
"docket/subprocess"

yaml "gopkg.in/yaml.v3"
)
Expand Down
2 changes: 1 addition & 1 deletion tasks/domains_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package tasks

import (
"fmt"
"omakase/subprocess"
"docket/subprocess"
"strings"

yaml "gopkg.in/yaml.v3"
Expand Down
2 changes: 1 addition & 1 deletion tasks/git_from_image_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package tasks
import (
"encoding/json"
"fmt"
"omakase/subprocess"
"docket/subprocess"

yaml "gopkg.in/yaml.v3"
)
Expand Down
2 changes: 1 addition & 1 deletion tasks/git_sync_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package tasks
import (
"encoding/json"
"fmt"
"omakase/subprocess"
"docket/subprocess"

yaml "gopkg.in/yaml.v3"
)
Expand Down
2 changes: 1 addition & 1 deletion tasks/http_auth_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package tasks

import (
"fmt"
"omakase/subprocess"
"docket/subprocess"
"strings"

yaml "gopkg.in/yaml.v3"
Expand Down
Loading
Loading