Docker on 11.0

Status
Not open for further replies.

SavageAUS

Patron
Joined
Jul 9, 2016
Messages
418
In case any of the Devs are poking around here, I'd like to second this sentiment. Brand new user, just got my NAS drives the week Corral was released and immediately installed it. I have over 4TB of data on my FreeNAS Corral box now and four Docker VMs up and running. I plan to hold off on the upgrade until Docker is point and click again. It was so simple to just download an image from the Web UI and have it ready to go and fully functional, and I'd never used Docker before in my life. Passing through folders from my main SMB share was easy too!

I definitely recognize the need for getting rid of the Corral UI and returning to a stable codebase, I'm a programmer too, but if there's one thing that Corral got right, it was that Docker implementation. Please Devs, give me that beautiful pointy-clicky goodness in 11.1, and I promise I won't ask for anything else!
+1

Sent from my SM-G930F using Tapatalk
 

Nick R

Dabbler
Joined
Jan 27, 2016
Messages
22
Because it's not all clickity clickity done.

Don't fear the command line.

No, indeed, but then there's still a minimum skill set required to install FreeNAS and build a complete NAS setup. It's not far-fetched to assume that you can read a doc and install a RacherOS VM for docker use (that is until it is natively supported). There's already at least 2 how-to's for creating VM's in FreeNAS 11.
 

SavageAUS

Patron
Joined
Jul 9, 2016
Messages
418

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I cant get the RancherOS iso to boot in a FreeNAS VM.

I'm not surprised if you are trying to use the webUI as it doesn't support UEFI.
 

SavageAUS

Patron
Joined
Jul 9, 2016
Messages
418
I'm not surprised if you are trying to use the webUI as it doesn't support UEFI.
Thanks, ill switch to iohyve in cli.
 

eroji

Contributor
Joined
Feb 2, 2015
Messages
140
Docker works perfectly fine for me in a CentOS 7 VM. I have it running Nextcloud and Transmission without problems and will add more later. I have the volume storage mounted as a NFS share and pointed to when I create the containers and snapshot task to keep 2 weeks worth in case I need to retrieve something.
 

SavageAUS

Patron
Joined
Jul 9, 2016
Messages
418
Docker works perfectly fine for me in a CentOS 7 VM. I have it running Nextcloud and Transmission without problems and will add more later. I have the volume storage mounted as a NFS share and pointed to when I create the containers and snapshot task to keep 2 weeks worth in case I need to retrieve something.
Feel like writing a how to?

Sent from my SM-G930F using Tapatalk
 

Cody White

Dabbler
Joined
Dec 5, 2015
Messages
16
I was able to get RancherOS running in iohyve and installed the Rancher Server docker to give it a nice front end. I even created a github repository to start playing with REPO's for installing dockers with Rancher Server options to make things clicky clicky since it cannot just pull from docker hub from what I can tell. Dockers install and boot up and work however I am unable to get NFS pass-though to work and load my config files like I could with the coral pass-though.

I am willing to assist anyone or maybe make a small tutorial on how to do this step by step. Its not 100% perfect but its stable and well lacking the NFS. I just dont want to have to index my Plex library's AGAIN... I really want to use my old config files.
 

Moonlight

Cadet
Joined
Jan 15, 2017
Messages
1
Cody, I would love to see a write up of the process. I've been wanting to re-do my nas system for a while, and thought that coral would be my chance to do it, but... anyway. I'm still very new to freenas and have never touched the 9.x builds. Coral was my only experience with freenas. Up until now I have been using XPEnology, but I want to switch because I think freenas will be more stable. Before I do that though I really need to get docker working so that I can load the plugins I want. Rancher seems the best way to do this, but I have no idea how to get started past using the gui, which doesn't work....
 

Cody White

Dabbler
Joined
Dec 5, 2015
Messages
16
Well, I wasn't sure where to build this how to as its a bit long and I wanted to explain how and why I did each step the way I did. So I think I have everything listed properly, I ran though a second install to make sure my steps worked as I hoped. So this article is only step one, getting rancher os installed. I will be posting another 2 articles over the next day or so to get you to where I am today. Please note, I have not be able to replace corral yet due to the missing NFS part, but I am close.

Go here to find Part 1
 

SavageAUS

Patron
Joined
Jul 9, 2016
Messages
418
Well, I wasn't sure where to build this how to as its a bit long and I wanted to explain how and why I did each step the way I did. So I think I have everything listed properly, I ran though a second install to make sure my steps worked as I hoped. So this article is only step one, getting rancher os installed. I will be posting another 2 articles over the next day or so to get you to where I am today. Please note, I have not be able to replace corral yet due to the missing NFS part, but I am close.

Go here to find Part 1

Working my way through this but i found a spelling mistake.


Installing Rancher…
GRUB Process does not run in background….
If your terminal appears to be hanging, check iohyve console Rancher in second terminal to complete GRUB process…

1 iohyve console RacnherOS
 

Jammin

Dabbler
Joined
Dec 28, 2016
Messages
42
I wanted to explain how and why I did each step the way I did.

Thanks very much for this! It's great to share findings.

I have not be able to replace corral yet due to the missing NFS part, but I am close.

There's some info here about setting up the NFS shares. Have you tried them?
https://www.cod3r.com/2017/01/docker-in-freenas-9-10/
https://forums.freenas.org/index.php?threads/docker-on-11-0.54150/#post-375169
(earlier in this thread but easy to miss!)
 

Cody White

Dabbler
Joined
Dec 5, 2015
Messages
16
Working my way through this but i found a spelling mistake.


Installing Rancher…
GRUB Process does not run in background….
If your terminal appears to be hanging, check iohyve console Rancher in second terminal to complete GRUB process…

1 iohyve console RacnherOS

Whoops, thanks, fixed, I was typing so fast tonight ;)
 

Cody White

Dabbler
Joined
Dec 5, 2015
Messages
16
Thanks very much for this! It's great to share findings.



There's some info here about setting up the NFS shares. Have you tried them?
https://www.cod3r.com/2017/01/docker-in-freenas-9-10/
https://forums.freenas.org/index.php?threads/docker-on-11-0.54150/#post-375169
(earlier in this thread but easy to miss!)

Thanks for the links, I have tried to get NFS working with rancher tools for at least a good 4-6 hours with no luck thus far. These links are setting NFS up on ubuntu base which we are not using in my tutorial. We are using RancherOS as the base OS, every time I try to connect to an NFS share it hangs and times out, but I think this will be what I need to figure out. I might be on to something though, on my installs its installs the RancherOS on a VMNet, not on my local subnet I might have to find a way to get Rancher a private IP on my local subnet to fix this issue, I figured the NAT rules would take care of it but it just hangs... more things to try another day.

I also noticed the RancherOS is not auto-booting on reboot, you have to manually start it each time, looking into that next, might have an answer by tomorrow.
 

SavageAUS

Patron
Joined
Jul 9, 2016
Messages
418
iohyve setup pool=<storage pool> kmod=1 net=<NIC>

iohyve set RancherOS loader=grub-bhyve ram=8G cpu=2 os=debian con=nmdm1

I had to modify your commands to this to get it working.
 

Cody White

Dabbler
Joined
Dec 5, 2015
Messages
16
interesting, I might have set kmod and net on my first install and when I redid it was already configured. I will update that, however, the second part is weird, might have something to do with system configuration. My main rancher OS is 12GB 6 Cores but I reduced it because people might not have that many resources available to be allocated.

I will update the first and make a note for the second as this might change from build to build, not sure.
 

eroji

Contributor
Joined
Feb 2, 2015
Messages
140
Feel like writing a how to?

Sent from my SM-G930F using Tapatalk

  1. Download CentOS 7 minimal install ISO onto a share on NAS
  2. Create a VM with a small-ish OS drive zvol and assign it as disk device for the VM (Both NIC and disk devices can use VirtIO drivers since it's fully support)
  3. Add cdrom device and point to the ISO
  4. Boot up and perform install, leave disk partition to auto if you don't care (or do it manually if you know how to for UEFI bootloader)
  5. Configure IP, hostname etc
  6. Finish install and restart and remove the cdrom device
  7. Turn off wait to boot for VNC device as I believe this makes the VM wait until you VNC in on subsequent bootup or restart
  8. Once booted, log in as root
  9. yum -y update
  10. Do Docker CE install (https://store.docker.com/editions/community/docker-ce-server-centos?tab=description)
  11. Install NFS client (https://www.howtoforge.com/nfs-server-and-client-on-centos-7, look for NFS client section)
  12. Create NFS share on NAS for container volumes and mount it in the VM (I put it under /mnt/docker), be sure to edit /etc/fstab so the mount is persistent (map all user to root/wheel for the share because Docker will try to chown the share and if it can't it won't start)
  13. docker run with -v flag to point volumes in container to the path you mounted the NFS share
  14. Profit??
This way if and when Docker becomes fully baked-in, the volume share can be reused.
 
Last edited:

Mega Man

Explorer
Joined
Jun 29, 2015
Messages
55
ima try this tonight
 
Status
Not open for further replies.
Top