OpenCHAMI / deployment-recipes

Ochami deployment recipes
MIT License
8 stars 10 forks source link

[BUG] Instructions for "To run services with JST authentication enabled:" lack a verb and even with up fail #36

Closed jhansonhpe closed 6 months ago

jhansonhpe commented 6 months ago

Describe the bug The instructions say "To run the services without JWT authentication enabled:

docker compose -f ochami-services-noauth.yml -f ochami-krakend-ce.yml"

This is incorrect because there is no action given to docker-compose (up, down, ...) Adding up still fails.

To Reproduce Steps to reproduce the behavior: Run docker compose -f ochami-services-noauth.yml -f ochami-krakend-ce.yml

Expected behavior docker compose would run the services

Screenshots

`docker compose -f ochami-services-noauth.yml -f ochami-krakend-ce.yml

Usage: docker compose [OPTIONS] COMMAND

Define and run multi-container applications with Docker

Options: --ansi string Control when to print ANSI control characters ("never"|"always"|"auto") (default "auto") --compatibility Run compose in backward compatibility mode --dry-run Execute command in dry run mode --env-file stringArray Specify an alternate environment file -f, --file stringArray Compose configuration files --parallel int Control max parallelism, -1 for unlimited (default -1) --profile stringArray Specify a profile to enable --progress string Set type of progress output (auto, tty, plain, quiet) (default "auto") --project-directory string Specify an alternate working directory (default: the path of the, first specified, Compose file) -p, --project-name string Project name

Commands: attach Attach local standard input, output, and error streams to a service's running container build Build or rebuild services config Parse, resolve and render compose file in canonical format cp Copy files/folders between a service container and the local filesystem create Creates containers for a service down Stop and remove containers, networks events Receive real time events from containers exec Execute a command in a running container images List images used by the created containers kill Force stop service containers logs View output from containers ls List running compose projects pause Pause services port Print the public port for a port binding ps List containers pull Pull service images push Push service images restart Restart service containers rm Removes stopped service containers run Run a one-off command on a service scale Scale services start Start services stats Display a live stream of container(s) resource usage statistics stop Stop services top Display the running processes unpause Unpause services up Create and start containers version Show the Docker Compose version information wait Block until the first service container stops watch Watch build context for service and rebuild/refresh containers when files are updated

Run 'docker compose COMMAND --help' for more information on a command.`

If I add up to the end to give it an action

docker compose -f ochami-services-noauth.yml -f ochami-krakend-ce.yml up WARN[0000] /mnt/home/jhanson/Canary/deployment-recipes/lanl/docker-compose/ochami-services-noauth.yml:versionis obsolete WARN[0000] /mnt/home/jhanson/Canary/deployment-recipes/lanl/docker-compose/ochami-krakend-ce.yml:versionis obsolete service "step-ca" refers to undefined network internal: invalid compose project

Desktop (please complete the following information):

synackd commented 6 months ago

Thanks for filing this.

Yep, there should be an up in the docker compose command for disabled authentication.

In reproducing this, krakend-ce is what fails for me rather than step-ca. The authentication disabled/enabled distinguishment was recently restructured and it Krakend has not been included, which needs to be addressed which will likely fix this.

davidallendj commented 6 months ago

Is the krakend-ce failing because of something related in the JSON config?

synackd commented 6 months ago

It is because of an issue in the Krakend YAML config, yes. The internal network in ochami-services.yml was recently repurposed for the auth-enabled services while the auth-disabled services moved to a new internal-noauth in ochami-services-noauth.yml. The Krakend config currently has not been modified to use the internal-noauth network yet.

I need to see if any further effort is needed to make Krakend support both authenticated and unauthenticated endpoints.

davidallendj commented 6 months ago

Ah, I see. I'm thinking about something different that may have already been fixed. I think we need to open another issue for that, but for now, maybe it would make sense to remove ochami-krakend-ce.yml from the README for now as well as adding the verb.

jhansonhpe commented 6 months ago

Yes this works for me. Thanks.