User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
project:coopcloud_spike [2025/11/25 13:04] jadeproject:coopcloud_spike [2025/12/05 13:24] (current) – [Experiment 3: Run Kiwix on Raspberry Pi] jade
Line 30: Line 30:
 ===== Experiments ===== ===== Experiments =====
  
-  - Install an existing Co-op Cloud app with abra +  - ✅ Install an existing Co-op Cloud app with abra 
-  - Build a [[https://kiwix.org/en/|Kiwix]] recipe for Co-op Cloud +  - ✅ Build a [[https://kiwix.org/en/|Kiwix]] recipe for Co-op Cloud 
-  - Run the Co-op Cloud Kiwix recipe on a Raspberry Pi +  - ✅ Run the Co-op Cloud Kiwix recipe on a Raspberry Pi 
-  - //(unknown experiment to verify extending capabilities, determine how to test this once we know more)//+  - ✅ Deploy a dummy app that can list other installed apps
  
 ==== Experiment 1: Try using abra ==== ==== Experiment 1: Try using abra ====
Line 51: Line 51:
  
 This was pretty straightforward to build. I used abra locally, which seems pretty essential for local development of a recipe. It handled things pretty well. It's up and running (for the moment) at [[https://kiwix.spike2.merri-bek.tech/|https://kiwix.spike2.merri-bek.tech/]] This was pretty straightforward to build. I used abra locally, which seems pretty essential for local development of a recipe. It handled things pretty well. It's up and running (for the moment) at [[https://kiwix.spike2.merri-bek.tech/|https://kiwix.spike2.merri-bek.tech/]]
 +
 +==== Experiment 3: Run Kiwix on Raspberry Pi ====
 +
 +There seems to be no fundamental obstacle to running kiwix on a Raspberry Pi, providing you pick a container image built for the pi. My recipe uses the image provided by [[https://www.offlineinternet.org/|offline internet]] - [[https://hub.docker.com/r/offlineinternet/kiwix|offlineinternet/kiwix]]. 
 +
 +The recipe that I build is a draft at this stage. It has the following compose
 +
 +<code>
 +---
 +services:
 +  kiwix-serve:
 +    image: offlineinternet/kiwix:latest
 +    networks:
 +      - proxy
 +    volumes:
 +      - kiwix_data:/data
 +    deploy:
 +      restart_policy:
 +        condition: on-failure
 +      labels:
 +        - "traefik.enable=true"
 +        - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8080"
 +        - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
 +        - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
 +        - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
 +        - "coop-cloud.${STACK_NAME}.version="
 +networks:
 +  proxy:
 +    external: true
 +volumes:
 +  kiwix_data:
 +</code>
 +
 +Here are some things I learned:
 +
 +  * There is no way to mark the Coop Cloud recipe as supporting particular platforms, despite the fact that the docker image is tagged that way.
 +  * As part of this I ran this on a pi on my local network at radish house. Accessing it on my local network as both radish.local and via an external domain like radish.nodes.merri-bek.tech was hard. I had to pick one. There is an EXTRA_DOMAINS feature in the traefik recipe to play with though.
 +  * If serving locally, eg at radish.local, Traefik SSL certificate generation isn't going to work. Instead, locally signed certificates are needed. There is information about how to do that in handbook under [[https://docs.coopcloud.tech/operators/handbook/#running-an-offline-coop-cloud-server|Running an Offline Coop Cloud Server]]. There is also a certificate generator called [[https://git.coopcloud.tech/escuela-comun/certificados|certificados]].
 +==== Experiment 4: Ensure that an app can get access to the running stacks ====
 +
 +I conducted this by building a dummy recipe which I called spikespy. It had the following config: [[https://gist.github.com/jadehopepunk/8ed43d9bdf57b5eaaa66e5b3f0fadece|compose.yml]]
 +
 +When I log into the debian/nginx image that is connected to the socket proxy, I can ''apt update && apt install docker-cli''. Then docker is there and I can use it without having the normal docker socket mounted, by specifying the host.
 +
 +For example, it works if I do:
 +
 +<code>
 +docker -H tcp://socket-proxy:2375 ps
 +</code>
 +
 +But, it is configured to not allow docker exec, and so if I do:
 +
 +<code>
 +docker -H tcp://socket-proxy:2375 exec -it effe902f3e66 sh
 +</code>
 +
 +I get a forbidden error.
  
 ===== Notes for Coop Cloud ===== ===== Notes for Coop Cloud =====

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information