Commit Graph
5 Commits
Author SHA1 Message Date
soreavis bb6f46c104 fix(docker): recommend label=disable, not :z, when SELinux blocks the Podman socket (#7434)
The Podman docs and the web console's start-failure message told SELinux users to relabel the socket mount with :z. On a rootless podman machine (SELinux enforcing) that recipe fails: the web console cannot start and a Lambda invoke returns "Docker is not reachable (Permission denied)". :z fixes access to the socket file, but SELinux also denies connectto from the Floci container (container_t) to the Podman service (container_runtime_t), which a relabel can't fix; --security-opt label=disable avoids it. With it, the same recipe starts the console and invokes a Python Lambda.
2026-11-03 14:17:49 -04:00
Hector Ventura 258994c1b9 feat(ui): serve the Console Contract v2 manifest and pass its URL to the console (#6711)
* feat(ui): serve the Console Contract v2 manifest and pass its URL to the console

/_floci/info and /_localstack/info now carry manifest_version, console_contract, cloud, endpoint, health_url, tls, services, defaults and ui, keeping their existing keys. FlociUiManager injects FLOCI_INFO_URL so the console can read it.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* test(ui): drop the DisplayName from the manifest test

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-26 23:42:00 -04:00
Hector Ventura d4d4f16dfd feat(ui): add a light and dark theme toggle to the landing page (#5695)
* feat(ui): add a light and dark theme toggle to the landing page

The landing page was dark only. A button in the top bar, shown on the
dashboard and on the /_floci/ui wait view, switches between a dark and a
light theme. With no choice made the page follows the OS colour scheme,
including a change while it is open; a choice is remembered in
localStorage under floci.theme, next to the news setting, and the page
still switches for the current view when storage is blocked. The theme
is set by the head script before the stylesheet paints, so a light page
does not flash dark on load.

The dark palette is unchanged. The light one keeps the same accent
family with every text colour at 4.5:1 or better against the page
backgrounds, and the five colours that were written as literals (logo
dot, button text, code snippets, error box, the copied border) are now
variables both themes set.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* feat(ui): name the emulator in the top bar and keep a page-view theme choice

The page will be shared by the other Floci emulators, so the top bar now
says which one serves it, floci-aws, next to the logo, and the page title
and the version pill's tooltip name it too.

A theme picked with the toggle while storage is blocked could be undone
by an OS colour-scheme change later in the same page view, because the
OS listener only checked the stored choice. The click is now remembered
in memory as well, so the OS is followed only until the user picks.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* chore(ui): pin the floci-ui console image to 0.7.0

The console image defaulted to floci/floci-ui:latest, and a cached
latest tag is never pulled again, so a machine kept whatever console it
first downloaded. The default is now the released 0.7.0 tag, in the
config default, application.yml and the three docs tables that list it.
FLOCI_SERVICES_UI_IMAGE still overrides it.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-15 00:03:24 -04:00
Abhigya 899c6f5ec1 feat(ui): add a bind address for the web console sidecar (#4175)
The console sidecar is published with a bare host port, so Docker binds it on every
interface. That matches the documented deployment, where Floci's own port is published
the same way, but it does not follow an operator who narrowed theirs: a
"127.0.0.1:4566:4566" mapping keeps the API off the network while the console, which is
unauthenticated and can drive every emulated service, stays reachable on 4500.

floci.services.ui.bind-address (FLOCI_SERVICES_UI_BIND_ADDRESS) names the host interface
the console publishes on. It is unset by default, so nothing changes for anyone who has
not asked; setting it to 127.0.0.1 is how the narrowed deployment keeps the console where
the API is. A blank value is a hard error rather than a silent fall back to the wildcard.

ContainerBuilder.withPortBinding(containerPort, hostPort, hostIp) and a portBindingHostIps
component on ContainerSpec carry the address through to the Docker binding.
withLoopbackPortBinding is unchanged, and a port that asks for neither still publishes on
every interface, which is Docker's own default.
2026-09-22 23:33:14 -04:00
Hector Ventura a5ebda01fb feat(ui): publish a console contract so any web console can be the sidecar (#3641)
Floci could run exactly one web console, the image it ships. This publishes the contract
between Floci and a console so any image can take that slot, and an operator gets there by
setting one image name rather than by configuring seven fields.

Three things make a console a Floci console: it listens on the port in PORT, it serves
GET /api/health, and it talks to Floci at AWS_ENDPOINT_URL. Everything else is detail the
contract spells out, including the AWS baseline every launched container already receives,
so a console built on any AWS SDK is configured by that SDK's ordinary endpoint and
credential discovery.

Floci learns a console's shape from three sources, in order. The image's own
io.floci.console.* labels come first, so a console describes itself and needs no operator
input at all. A built-in profile covers the consoles Floci already knows. The contract
defaults (/api/health, port 4500, status: ok) cover the rest. Configuration overrides all
three, for a console that describes itself neither way.

That ladder is why the new config keys ship commented out in application.yml. They exist for
the console that fits none of the three sources, and setting one silently disables the
discovery that would otherwise just work. Every accessor is Optional or OptionalInt, so
nothing is required and the test configuration needs no entry.

A malformed label is ignored rather than fatal: a console that declares port="banana" starts
on the default instead of failing the emulator, and the reason is logged.

Docs: docs/ui/console-contract.md is the contract itself, written for console authors, and
docs/ui/index.md is the operator's page. Both are in the mkdocs nav.

Tests: 608 lines. ConsoleProfileResolverTest covers the resolution ladder including the
precedence between its three sources; ContainerLifecycleManagerImageLabelsTest covers reading
labels off an image; FlociUiManagerTest grows to cover the manager against the contract.
Neutralising the label arm fails 5 of the 13 resolver tests, so the ladder is genuinely
exercised rather than the tests only asserting defaults.
2026-09-14 21:53:59 -05:00