rename, update README

This commit is contained in:
paukstelis
2022-01-28 20:31:34 -05:00
parent e688a78032
commit b504dcd7bc
2 changed files with 21 additions and 39 deletions

View File

@@ -1,44 +1,26 @@
Updated July, 2021. Updated January 2022.
Want to support this work? Buy Me a Coffee. https://www.buymeacoffee.com/ppaukstelis Want to support this work? Buy Me a Coffee. https://www.buymeacoffee.com/ppaukstelis
# octoprint_deploy # octoprint_deploy
These files provide a simple bash script for quickly deploying multiple octoprint instances on a single computer. These files provide a simple bash script for quickly deploying multiple octoprint instances on a single computer.
# How to use # How to use
* Ready to go images: * OctoPi
* For OctoPi and OctoBuntu installations, you can download an image that contains this repo and all necessary things here: https://bit.ly/3qPfmti * Put the latest OctoPi image on your SD card
* OctoPi setup is just like for a normal OctoPi installation. OctoBuntu setup uses standard Ubuntu installation. * ssh into your Pi (pi@octopi.local; good idea to change your password now!)
* Instructions can be found in the README.txt file (either /home/pi/README.txt or /home/octouser/README.txt), but the basics: * run the command `git clone https://github.com/paukstelis/octoprint_deploy.git`
* ssh into or open a terminal on your machine * run the command `sudo octoprint_deploy/octoprint_deploy.sh`
* Update this repository: `cd octoprint_deploy; git pull; cd` * Choose `Prepare System` from the menu
* Connect to your base instance and run through the setup to establish admin user. This will be at octopi.local:5000 or whatever server name you gave your OctoBuntu installation. * Setup admin user by connecting to http://octopi.local via browser
* Run the add printer script: `sudo octoprint_deploy/addnew_printer.sh` * Back in the ssh session, choose `Add Instance` and follow the instructions.
* Follow instructions from the scripts. Defaults can be used in almost all cases. * Continue until you have added all the printers you want to use
* Default user for Octobuntu images is `octouser` with password `fooselrulz`; please change this password immediately. No root password is set, but this can be done with `sudo passwd`. * Ubuntu (may work for other deb systems, not tested yet)
* Somewhat outdated videos for both setups are available on YouTube, but will give some additional info. Follow the instructions here or the README.txt files: https://www.youtube.com/watch?v=DQn7-64aMAk and https://www.youtube.com/watch?v=YoUg0u62tc0 * Install Ubuntu 20.X on your system (make sure your user is admin for sudo)
* Stand-alone usage: * run the command `git clone https://github.com/paukstelis/octoprint_deploy.git`
* This is for more advanced users that have realtively high command line/Linux familiarity. * run the command `sudo octoprint_deploy/octoprint_deploy.sh`
* Start up Octoprint for the first time to setup a base instance profile (running on localhost:5000). The base profile will be edited in several places with `INSTANCE` to allow modifications during deployment. You can make this as extensive as you like as far as adding different printers, plugins, etc. They can be added for each instance later. This only needs to be done once. * Choose `Prepare System` from the menu. This will install necessary packages, install octoprint, and start an instance
* During setup, edit the restart script: `sudo systemctl restart INSTANCE` * Setup admin user by connecting to your system (either http://localhost:5000 or http://[hostname]:5000 via browser
![alt text](/deploy_01.png) * Continue with octoprint_deploy script and setup all your instances.
* After the initial setup is done, reload the server and edit the Additional Serial Port field: `/dev/octo_INSTANCE` * What else can you do?
![alt text](/deploy_02.png) * Remove instances
* You can also edit the server name under apperance with: `INSTANCE` * Add USB webcams AFTER you've created the instance
![alt text](/deploy_03.png) * Test USB connections
* SAVE your changes, then STOP your currently running octoprint server (Ctrl+C in the terminal you started is sufficient)
* Make sure whichever printer you are installing for is not plugged in via USB
* Go to wherever you downloaded octoprint_deploy: `$ cd octoprint_deploy`
* Run the bash script: `$ sudo ./addnew_printer.sh`
* Select 'Other' option and fill in the appropriate information.
# Other Features
* Uninstall
* Any instance installed through these scripts can be removed by running the uninstall script. If you use one of the pre-made images, don't remove your base instance!
* USB testing
* The script `usbtesting.sh` provides information to help debug auto-detection.
* Add printer udev entries
* You can use the `printer_udev.sh` script to just use the serial number/USB port detection features of these scripts to add udev entires to your machine. This way if you have multiple octoprint instances being run through other means (docker) they can always be linked to a particular device. This will default to /dev/octo_[INSTANCE], so you must change the additional serial port field (see above) in your octoprint setup in order to see these (easiest is just to use /dev/octo_*).
Because each octoprint instance is coming from the same source files, any global modifications you make to octoprint (adding/removing plugins, updating octoprint) are all automatically applied to all of your instances and will take effect when you restart that instance.
# Other
You likely want to allow the user that is running the octoprint instance to start/stop/restart services. This can be accomplished with: `sudo visudo`. It is recommended to read up on how to do this without a password. Most generally this can be done by adding `paul ALL=(ALL) NOPASSWD:ALL` to the sudoers file. However, THERE ARE RISKS TO DOING THIS, so consider wisely.