Skip to content

canonical/johnny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Johnny

Johnny is some generic client, nothing special -- just your average johnny.

It is intended to be used by other charm test suites that need a simple consumer of the following interfaces for testing purposes:

  • ceph (ceph-client)
  • ceph-rgw-ready (ceph-rgw-client)
  • role-assignment provider

Behaviour

Johnny currently does four things:

  1. requests a replicated Ceph pool when the broker becomes available
  2. reports blocked with RGW is not ready until the related app sets ready=true on the ceph-rgw-ready relation
  3. returns to active when the ceph-rgw-ready relation is removed
  4. provides role-assignment data. By default, the first 3 registered units on each relation receive control, storage, and gateway roles plus workload-params={"flavors": ["rgw"]}.

Role assignment configuration

The default role assignment can be tuned with:

juju config johnny default-assignment-limit=3
juju config johnny default-assignment-roles=control,storage,gateway
juju config johnny default-assignment-workload-params='{"flavors": ["rgw"]}'

For explicit topology, set role-assignments to JSON:

{
  "units": {
    "microceph/0": {
      "roles": ["control", "storage", "gateway"],
      "workload-params": {"flavors": ["rgw"]}
    }
  },
  "machines": {
    "0": {
      "roles": ["control", "storage", "gateway"],
      "workload-params": {
        "microceph": {"flavors": ["rgw"]}
      }
    }
  }
}

Build locally

charmcraft pack

Deploy from Charmhub

juju deploy johnny --channel edge

Use a local artifact in another test suite

For local development, consumer repos can point their tests at a built charm:

export JOHNNY_CHARM=/path/to/johnny.charm

Or point at a local source checkout and let the consumer repo build it:

export JOHNNY_SOURCE=/path/to/johnny

Publishing to Charmhub

A GitHub Actions release workflow publishes johnny to Charmhub on pushes to main and via manual dispatch. It expects a repository secret named CHARMHUB_TOKEN and releases to latest/edge.

Typical manual release flow:

charmcraft login
charmcraft pack
charmcraft upload *.charm
charmcraft release johnny --revision <revision> --channel latest/edge

CI

GitHub Actions workflows are included to:

  • validate that charmcraft pack continues to work for pull requests and pushes
  • release johnny to Charmhub from main

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages