Unclear Instructions how to check if Docker Images build is working - stack-create-site error

I successfully created a Plone6 Volto project using cookiecutter and followed the procedures described in Pone Training 2023.

The project is running locally without errors and now the challenge is to get a deployment to run on a virtual server in the cloud.

I am using the ansible approach and the boilerplate created in the deploy folder of the repo described at Plone Deployment โ€” Plone Training 2024 documentation until step Start the project using the make commands.

The server is running and reachable by ansible for basic operations. I am stuck when it comes to execute the step Creating a New Plone Site make stack-create-site described at Deploying the Project โ€“ Plone Deployment โ€” Plone Training 2024 documentation (and Start the Project โ€“ Plone Deployment โ€” Plone Training 2024 documentation)

I got this error running make stack-create-site in the local deploy folder context:

==> Stack aeme-acsr-de: Create site in context prod 
Error: No such container: ./docker-entrypoint.sh
make: *** [stack-create-site] Error 1

I am guessing there is something wrong with the Docker image creation.

What I did before

In the process before I got this output after setting up the git repo

make stack-deploy
==> Stack aeme-acsr-de: Deploy to context prod 
Updating service aeme-acsr-de_backend (id: jx1t18q3br5knczkztul4cb3t)
image ghcr.io/acsr/aeme-backend:latest could not be accessed on a registry to record
its digest. Each node will access ghcr.io/acsr/aeme-backend:latest independently,
possibly leading to different nodes running different
versions of the image.

Updating service aeme-acsr-de_db (id: pzldfizcmaqjdhj5h7k4zxqcx)
Updating service aeme-acsr-de_traefik (id: jqtza7qz9ffb80k4nsyxlprka)
Updating service aeme-acsr-de_frontend (id: wodhhwc0n3v434l2mxi6adsmh)
image ghcr.io/acsr/aeme-frontend:latest could not be accessed on a registry to record
its digest. Each node will access ghcr.io/acsr/aeme-frontend:latest independently,
possibly leading to different nodes running different
versions of the image.

In the section Create a new project it is mentioned like this:

4. Push to GitHub

Push your commits to the remote repository hosted on GitHub. This command will trigger the GitHub Actions that test the codebase and generate Docker images for the Backend and for the Frontend.

When it comes to Building Docker Images

it says:

Ensure you build the Docker images for the Frontend and Backend servers before deployment. GitHub Actions, configured in .github/workflows/backend.yml and .github/workflows/frontend.yml , facilitate this process.

and an important admonition follows:

Before deploying, push all code changes and ensure GitHub Actions successfully complete their runs. Execute these commands to format the code and run tests:

make format
make i18n
make test

For me the implicit tonality in the training docs is not helpful.

Why? Because we are dancing on multiple floors while deploying (Volto, Backend, Local Machine, Github Actions, Remote Server) it would be great to include the explicit context, where actions take place and where and how the results can be tracked.

When I try to execute some make commands in the deploy folder context, I get get

make format
# output
make: *** No rule to make target `format'.  Stop.

the same for:

make i18n
make test

# and as well (when trying to reinitialize)
make stack-rm
make stack-stop
make stack-start

Any ideas how to make sure the images build process works?

There was also a hint to the Docker Account:

Setting Up Docker

Ensure you're logged into your Docker account as the deployment uses public images.

I am logged in into my local Docker Desktop on macOS Ventura.
But the exact context is missing in the docs text.

  • make docker-setup -> works
  • make docker-info -> results are not dropping any obvious missing things.

I got this error running make stack-create-site in the local deploy folder context:

The make stack-create-site command is essentially

docker exec `docker ps -qf 'name=aeme-acsr-de_backend'|head -n1` ./docker-entrypoint.sh create-site

The part in backticks is trying to look up the id of the currently running container named aeme-acsr-de_backend. The error you got sounds like this container was not found, so the result was empty, and docker tried to interpret ./docker-entrypoint.sh as the id of the container, which is wrong.

What do make stack-status and make stack-logs-backend say about the current state of the deployed services?

Any ideas how to make sure the images build process works?

It makes sense to check that the images were built successfully. If that happened, in Github on the Actions tab you should be able to see successful runs of the Backend CI and Frontend CI workflows, and you should see the resulting images at acsr (Armin Stross-Radschinski) / Packages ยท GitHub

1 Like

Thx for the hints,

The workflows on github were not triggered during initial push in spite of the expectation from the training docs.

I triggered them manually and both failed:

A. The frontend workflow failed during the code analysis in the last 3 steps of 4:

Test Status
Prettier :white_check_mark:
ESLint :x:
i18n :x:
Unit Tests :x:

Annotations

4 errors and 2 warnings

code-analysis

code-analysis Error
Process completed with exit code 1.

code-analysis Error
Process completed with exit code 2.

code-analysis Error
Some specified paths were not resolved, unable to cache dependencies.

code-analysis Error
Process completed with exit code 2.

code-analysis Warning
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@v3. For more information see: GitHub Actions: Transitioning from Node 16 to Node 20 - The GitHub Blog.
Show more (Link)

code-analysis Warning
No existing directories found containing cache-dependency-path="frontend/yarn.lock"

This does not reach the release Step

B. The backend workflow completed all steps except the last one release with the following message:

buildx failed with: ERROR: failed to solve: failed to push ghcr.io/acsr/aeme-backend:main: unexpected status from POST request to https://ghcr.io/v2/acsr/aeme-backend/blobs/uploads/: 403 Forbidden

My Next Steps:

The repo at https://github.com/acsr-industrialdesign/aeme-acsr-de exists.

The url https://ghcr.io/v2/acsr is not pointing at the same organisation and the repo aeme-backend does not exists there yet. Need to figure out where to fix that and how to change. I expect it writes either to a github repo or more likely into the docker environment of the vm or a place to store the stuff before use by Ansible.

I come back later on this after grinding down the detailled error messages.