IT/Software/Octoprint: Difference between revisions

From msgwiki
< IT‎ | Software
Jump to navigation Jump to search
Access restrictions were established for this page. If you see this message, you have no access to this page.
No edit summary
(see last commit... :()
Line 1: Line 1:
= Octoprint =
= Octoprint =
An application to control (usb) 3d*printers over the network.
An application to control (usb) 3d-printers over the network.


* send .stl over the network (no sd cards needed)
* send .stl over the network (no sd cards needed)
Line 19: Line 19:
* Recommended: ssh enabled on host (needed for ansible deployment)
* Recommended: ssh enabled on host (needed for ansible deployment)
* Docker installed [manual install](https://docs.docker.com/engine/install/ubuntu/) / (ansible playbook)
* Docker installed [manual install](https://docs.docker.com/engine/install/ubuntu/) / (ansible playbook)
* Optionally: Portainer installed [manual install](https://docs.portainer.io/start/install*ce/server/docker/linux) / (ansible playbook)
* Optionally: Portainer installed [manual install]([https://docs.portainer.io/start/install*ce/server/docker/linux https://docs.portainer.io/start/install-ce/server/docker/linux]) / (ansible playbook)


== Deploy Octoprint with 2 printers ==
== Deploy Octoprint with 2 printers ==


* Reference: https://github.com/OctoPrint/octoprint*docker
* Reference: https://github.com/OctoPrint/octoprint-docker


=== Deploy with Ansible ===
=== Deploy with Ansible ===
Line 33: Line 33:
=== Manual deployment ===
=== Manual deployment ===


* modify the docker*compose.yml according to your printers and webcams
* modify the docker-compose.yml according to your printers and webcams
* make sure each instance uses it's own port
* make sure each instance uses it's own port
* deploy the compose file on the hosts Portainer
* deploy the compose file on the hosts Portainer
Line 40: Line 40:


* copy the compose file to /srv/docker/octoprint/docker-compose.yml on the host
* copy the compose file to /srv/docker/octoprint/docker-compose.yml on the host
* `cd /srv/docker/octoprint`
* <code>cd /srv/docker/octoprint</code>
* start the containers with `sudo docker compose up -d`
* start the containers with <code>sudo docker compose up -d</code>
* check if containers are running `sudo docker ps`
* check if containers are running <code>sudo docker ps</code>
* check for any errors with `sudo docker compose logs -f`
* check for any errors with <code>sudo docker compose logs -f</code>


```
version: '3.9'


services:
<code>version: '3.9'</code>
   octoprint-1:
 
<code>services:</code>
   <code>octoprint-1:
     image: octoprint/octoprint
     image: octoprint/octoprint
     restart: unless-stopped
     restart: unless-stopped
Line 63: Line 63:
     # you add a video device
     # you add a video device
     #environment:
     #environment:
     #  - ENABLE_MJPG_STREAMER=true
     #  - ENABLE_MJPG_STREAMER=true</code>


   octoprint-2:
   <code>octoprint-2:
     image: octoprint/octoprint
     image: octoprint/octoprint
     restart: unless-stopped
     restart: unless-stopped
Line 79: Line 79:
     # you add a video device
     # you add a video device
     #environment:
     #environment:
     #  - ENABLE_MJPG_STREAMER=true
     #  - ENABLE_MJPG_STREAMER=true</code>


volumes:
<code>volumes:</code>
   octoprint-1:
   <code>octoprint-1:
   octoprint-2:
   octoprint-2:</code>
```

Revision as of 20:34, 2 May 2024

Octoprint

An application to control (usb) 3d-printers over the network.

  • send .stl over the network (no sd cards needed)
  • setup and control the print
  • monitor the progress of ongoing prints (optionally, webcams can be added to see the visual state)

Multi printer support

  • Octoprint only supports one printer per instance
  • in order to support multiple printers, we can deploy multiple docker containers
  • the different printers can then be assigned to their respective instance
  • this example sets up 2 instances for 2 priners, modify it to your needs

Requirements

Deploy Octoprint with 2 printers

Deploy with Ansible

  • local install of ansible required (ansible)
  • copy this Ansible Playbook to your local device (pb_docker-octoprint.yml)

Manual deployment

  • modify the docker-compose.yml according to your printers and webcams
  • make sure each instance uses it's own port
  • deploy the compose file on the hosts Portainer

Without Portainer

  • copy the compose file to /srv/docker/octoprint/docker-compose.yml on the host
  • cd /srv/docker/octoprint
  • start the containers with sudo docker compose up -d
  • check if containers are running sudo docker ps
  • check for any errors with sudo docker compose logs -f


version: '3.9'

services:

 octoprint-1:
   image: octoprint/octoprint
   restart: unless-stopped
   ports:
     - 81:80
   # devices:
   # use `python -m serial.tools.miniterm` to see what the name is of the printer, this requires pyserial
   #  - /dev/ttyACM0:/dev/ttyACM0
   #  - /dev/video0:/dev/video0
   volumes:
    - octoprint-1:/octoprint
   # uncomment the lines below to ensure camera streaming is enabled when
   # you add a video device
   #environment:
   #  - ENABLE_MJPG_STREAMER=true
 octoprint-2:
   image: octoprint/octoprint
   restart: unless-stopped
   ports:
     - 82:80
   # devices:
   # use `python -m serial.tools.miniterm` to see what the name is of the printer, this requires pyserial
   #  - /dev/ttyACM1:/dev/ttyACM0
   #  - /dev/video1:/dev/video0
   volumes:
    - octoprint-2:/octoprint
   # uncomment the lines below to ensure camera streaming is enabled when
   # you add a video device
   #environment:
   #  - ENABLE_MJPG_STREAMER=true

volumes:

 octoprint-1:
 octoprint-2: