1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
"use strict";(self.webpackChunkthreetwo_docs=self.webpackChunkthreetwo_docs||[]).push([[115],{93:function(e,t,n){n.r(t),n.d(t,{frontMatter:function(){return l},contentTitle:function(){return s},metadata:function(){return p},toc:function(){return d},default:function(){return k}});var a=n(7462),i=n(3366),o=(n(7294),n(3905)),r=["components"],l={sidebar_position:2,id:"unraid_install",title:"Install ThreeTwo! on unRaid"},s=void 0,p={unversionedId:"unraid_install",id:"unraid_install",isDocsHomePage:!1,title:"Install ThreeTwo! on unRaid",description:"Notes",source:"@site/docs/unraid_install.md",sourceDirName:".",slug:"/unraid_install",permalink:"/threetwo-docs/docs/unraid_install",editUrl:"https://github.com/facebook/docusaurus/edit/main/website/docs/unraid_install.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2,id:"unraid_install",title:"Install ThreeTwo! on unRaid"},sidebar:"tutorialSidebar",previous:{title:"Introduction",permalink:"/threetwo-docs/docs/intro"},next:{title:"Resources & Help",permalink:"/threetwo-docs/docs/resources"}},d=[{value:"Notes",id:"notes",children:[]},{value:"Pre-requisites",id:"pre-requisites",children:[]},{value:"Getting the VM up and running",id:"getting-the-vm-up-and-running",children:[]},{value:"Installing Debian on the VM",id:"installing-debian-on-the-vm",children:[]},{value:"Docker pre-requisites",id:"docker-pre-requisites",children:[]},{value:"VM pre-requisites",id:"vm-pre-requisites",children:[]},{value:"Installation",id:"installation",children:[]},{value:"Post-install checks",id:"post-install-checks",children:[]},{value:"To get updates",id:"to-get-updates",children:[]},{value:"Troubleshooting",id:"troubleshooting",children:[]}],m={toc:d};function k(e){var t=e.components,n=(0,i.Z)(e,r);return(0,o.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h3",{id:"notes"},"Notes"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Currently, ",(0,o.kt)("inlineCode",{parentName:"li"},"ThreeTwo!")," is installed along with its dependencies using ",(0,o.kt)("inlineCode",{parentName:"li"},"docker-compose"),". The easiest way to install it on ",(0,o.kt)("inlineCode",{parentName:"li"},"unRAID")," is to use a VM."),(0,o.kt)("li",{parentName:"ul"},"Skip the VM creation steps, if you already have a Debian VM")),(0,o.kt)("h3",{id:"pre-requisites"},"Pre-requisites"),(0,o.kt)("p",null,"This guide assumes the following is installed or readily available:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("inlineCode",{parentName:"p"},"unRaid 6.9.2")," (this version was tested against ",(0,o.kt)("inlineCode",{parentName:"p"},"6.9.2"),")")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("inlineCode",{parentName:"p"},"Debian 10.x")," (Grab the install ",(0,o.kt)("inlineCode",{parentName:"p"},".iso")," ",(0,o.kt)("a",{parentName:"p",href:"https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.1.0-amd64-netinst.iso"},"here"),")")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"You need to create the following folder structure on your ",(0,o.kt)("inlineCode",{parentName:"p"},"unRaid")," host. "),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre"}," - comics\n - userdata\n |- covers\n |- expanded\n |- temporary\n")),(0,o.kt)("p",{parentName:"li"}," ",(0,o.kt)("inlineCode",{parentName:"p"},"comics")," could be where your final; downloaded, renamed comics reside. ",(0,o.kt)("inlineCode",{parentName:"p"},"userdata")," is purely for ",(0,o.kt)("inlineCode",{parentName:"p"},"ThreeTwo!"),". "),(0,o.kt)("p",{parentName:"li"}," ",(0,o.kt)("em",{parentName:"p"},"You absolutely need both these folders with the structure described above. Many core functions won't work otherwise!")))),(0,o.kt)("h3",{id:"getting-the-vm-up-and-running"},"Getting the VM up and running"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Download the ",(0,o.kt)("inlineCode",{parentName:"li"},"Debian")," install ",(0,o.kt)("inlineCode",{parentName:"li"},".iso")),(0,o.kt)("li",{parentName:"ol"},"Place it in a folder accessible by the VM"),(0,o.kt)("li",{parentName:"ol"},"Go to the ",(0,o.kt)("inlineCode",{parentName:"li"},"VM")," tab in your ",(0,o.kt)("inlineCode",{parentName:"li"},"unRaid")," navigation"),(0,o.kt)("li",{parentName:"ol"},"Click ",(0,o.kt)("inlineCode",{parentName:"li"},"Add VM")),(0,o.kt)("li",{parentName:"ol"},"From the list presented to you, click ",(0,o.kt)("inlineCode",{parentName:"li"},"Debian")," under ",(0,o.kt)("inlineCode",{parentName:"li"},"Linux")),(0,o.kt)("li",{parentName:"ol"},"On the VM configration page, enter the desired options for memory, CPU cores, vdisk allocation"),(0,o.kt)("li",{parentName:"ol"},"Make sure that you have set the volume containing the ",(0,o.kt)("inlineCode",{parentName:"li"},"comics")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"userdata")," folders correctly for ",(0,o.kt)("inlineCode",{parentName:"li"},"Unraid Share")),(0,o.kt)("li",{parentName:"ol"},"Make sure that you have also set the ",(0,o.kt)("inlineCode",{parentName:"li"},"Unraid Mount tag")," option"),(0,o.kt)("li",{parentName:"ol"},"Make sure that the network bridge is set to ",(0,o.kt)("inlineCode",{parentName:"li"},"br0")),(0,o.kt)("li",{parentName:"ol"},"Set a password for ",(0,o.kt)("inlineCode",{parentName:"li"},"VNC")," so you can follow through with a graphical install if you so wish")),(0,o.kt)("h3",{id:"installing-debian-on-the-vm"},"Installing Debian on the VM"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Launch the VM via ",(0,o.kt)("inlineCode",{parentName:"li"},"VNC Remote")," option"),(0,o.kt)("li",{parentName:"ol"},"Follow the steps of the graphical installer"),(0,o.kt)("li",{parentName:"ol"},"Create a ",(0,o.kt)("inlineCode",{parentName:"li"},"root")," user and a normal ",(0,o.kt)("inlineCode",{parentName:"li"},"user")," and set the passwords for both")),(0,o.kt)("h3",{id:"docker-pre-requisites"},"Docker pre-requisites"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("a",{parentName:"li",href:"https://unix.stackexchange.com/questions/354928/bash-sudo-command-not-found"},"Make sure you have")," ",(0,o.kt)("inlineCode",{parentName:"li"},"sudo")),(0,o.kt)("li",{parentName:"ol"},"Make sure you have ",(0,o.kt)("inlineCode",{parentName:"li"},"ssh")," access for the user you created earlier"),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"ssh")," into the VM as the non-root user"),(0,o.kt)("li",{parentName:"ol"},"Install ",(0,o.kt)("a",{parentName:"li",href:"https://docs.docker.com/engine/install/debian/"},"Docker Engine")),(0,o.kt)("li",{parentName:"ol"},"Install ",(0,o.kt)("a",{parentName:"li",href:"https://docs.docker.com/compose/install/#install-compose-on-linux-systems"},"docker-compose")),(0,o.kt)("li",{parentName:"ol"},"Verify that ",(0,o.kt)("inlineCode",{parentName:"li"},"docker")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"docker-compose")," commands work")),(0,o.kt)("h3",{id:"vm-pre-requisites"},"VM pre-requisites"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Once you have mapped the ",(0,o.kt)("inlineCode",{parentName:"li"},"unRaid")," share containing ",(0,o.kt)("inlineCode",{parentName:"li"},"comics")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"userdata")," to the mountpoint of the VM, add this line to your ",(0,o.kt)("inlineCode",{parentName:"li"},"/etc/fstab"))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"unraidshare /mnt/unraidshare 9p trans=virtio,version=9p2000.L,_netdev,rw 0 0\n")),(0,o.kt)("p",null," where, ",(0,o.kt)("inlineCode",{parentName:"p"},"unraidshare")," is the ",(0,o.kt)("inlineCode",{parentName:"p"},"unRaid")," host folder you chose to map to the VM mountpoint during the VM creation process."),(0,o.kt)("p",null," ",(0,o.kt)("inlineCode",{parentName:"p"},"/mnt/unraidshare")," is simply a location where you want ",(0,o.kt)("inlineCode",{parentName:"p"},"unraidshare")," mounted."),(0,o.kt)("ol",{start:2},(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Add the current user to the ",(0,o.kt)("inlineCode",{parentName:"p"},"docker")," group:"),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"sudo gpasswd -a $USER docker\n"))),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Reboot the VM for posterity")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Check that ",(0,o.kt)("inlineCode",{parentName:"p"},"/mnt/unraidshare")," correctly shows the folder contents."))),(0,o.kt)("h3",{id:"installation"},"Installation"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Clone the repo: ",(0,o.kt)("inlineCode",{parentName:"p"},"git clone https://github.com/rishighan/threetwo.git"),". If you have already cloned the repo and want updates, run ",(0,o.kt)("inlineCode",{parentName:"p"},"git pull")," from ",(0,o.kt)("inlineCode",{parentName:"p"},"threetwo")," directory.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Change the directory: ",(0,o.kt)("inlineCode",{parentName:"p"},"cd threetwo"))),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Create an external docker network using ",(0,o.kt)("inlineCode",{parentName:"p"},"docker network create proxy"))),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("em",{parentName:"p"},"Remember to substitute things enclosed in ",(0,o.kt)("inlineCode",{parentName:"em"},"<...>")," with your actual values!"),"\nYou need to add the VM's hostname to ",(0,o.kt)("inlineCode",{parentName:"p"},"environment.list"),".\nAdd this line: "),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"UNDERLYING_HOST=<YOUR VM\\'s HOSTNAME> \n"))),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"You also need to provide your own ",(0,o.kt)("a",{parentName:"p",href:"https://comicvine.gamespot.com/api/"},"ComicVine API KEY"),". To do so, create a folder called ",(0,o.kt)("inlineCode",{parentName:"p"},".env")," and add the environment variable ",(0,o.kt)("inlineCode",{parentName:"p"},"COMICVINE_API_KEY")," to a file called ",(0,o.kt)("inlineCode",{parentName:"p"},"service.env"),". See below:"),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"mkdir .env\nnano .env/service.env\n"))),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Add ",(0,o.kt)("inlineCode",{parentName:"p"},"COMICVINE_API_KEY=<YOUR COMICVINE API KEY>")," to this file, then save ",(0,o.kt)("inlineCode",{parentName:"p"},"Ctrl O")," and exit ",(0,o.kt)("inlineCode",{parentName:"p"},"Ctrl X")," ")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Run the stack using: (",(0,o.kt)("em",{parentName:"p"},"Windows users please remove the trailing slashes ",(0,o.kt)("inlineCode",{parentName:"em"},"\\")," at the end of each line, when you copy-paste"),")"),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"COMICS_DIRECTORY=<PATH TO YOUR COMICS DIRECTORY> \\\nUSERDATA_DIRECTORY=<PATH TO YOUR USERDATA DIRECTORY> \\\nSERVICE_ENV_FILE=<PATH TO service.env> \\\ndocker-compose up --force-recreate -d\n")))),(0,o.kt)("h3",{id:"post-install-checks"},"Post-install checks"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Once the ",(0,o.kt)("inlineCode",{parentName:"li"},"docker-compose up")," command successfully completes, you can check the spun-up containers using ",(0,o.kt)("inlineCode",{parentName:"li"},"docker ps")),(0,o.kt)("li",{parentName:"ol"},"You should see the following services up:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"threetwo-ui\nthreetwo-import-api\nimage-transformation\nimport\ncomicvine-api\nqueue\ntraefik\ndatabase\ntransporter\ncomicvine-service\n")),(0,o.kt)("ol",{start:3},(0,o.kt)("li",{parentName:"ol"},"Past this, you can try accessing the ",(0,o.kt)("inlineCode",{parentName:"li"},"ThreeTwo!")," UI at ",(0,o.kt)("inlineCode",{parentName:"li"},"<VM IP>:8050")," (Replace ",(0,o.kt)("inlineCode",{parentName:"li"},"<server IP>")," with your VM's IP or hostname)")),(0,o.kt)("h3",{id:"to-get-updates"},"To get updates"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"First, take the stack down:",(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose down\n"))),(0,o.kt)("li",{parentName:"ol"},"To get the updates from upstream, run the following, one command at a time:",(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose rm -f\ndocker-compose pull\nCOMICS_DIRECTORY=<PATH TO YOUR COMICS DIRECTORY> \\\nUSERDATA_DIRECTORY=<PATH TO YOUR USERDATA DIRECTORY> \\\nSERVICE_ENV_FILE=<PATH TO service.env> \\\ndocker-compose up --force-recreate -d\n \n")))),(0,o.kt)("h3",{id:"troubleshooting"},"Troubleshooting"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"You aren't seeing all the services listed in ",(0,o.kt)("inlineCode",{parentName:"p"},"#2")," in the previous section spun up\nNote any errors listed at the end of ",(0,o.kt)("inlineCode",{parentName:"p"},"docker-compose up --force-recreate -d"),"\nRun ",(0,o.kt)("inlineCode",{parentName:"p"},"docker ps -a")," and look for any services with an ",(0,o.kt)("inlineCode",{parentName:"p"},"... (exited x seconds ago)")," message. Note the container name, typically under the ",(0,o.kt)("inlineCode",{parentName:"p"},"NAMES")," column.\nRun ",(0,o.kt)("inlineCode",{parentName:"p"},"docker logs <service name>")," for the service that exited.\nCopy the error and open an issue on the repo's issue page.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Check the browser's inspector and the network tab. Note any calls that may have failed."))))}k.isMDXComponent=!0}}]); |