Closed klcjr89 closed 7 years ago
I didn't know you could build it using a mac. Good to know! Since I did't test it for mac, its likely I changed something that works differently.
Can you post what you are trying to do, and what error you aarw getting? I need some more details how you are actually building with mac to support it. Output with errors would help!
I don't remember how I got it work originally, since I had help from an amazon developer that lives across the country. I just remember having to use vagrant and finding the suitable Mac alternatives for apt-get and mod-probe nfs, etc that was mentioned in the readme.
It would be super helpful if we can figure out a way to make clickable script files that create the OctoPi img automagically for the large platforms: Mac, Windows.
That is my ideal dream instead of having to use the terminal everytime to cd and sudo up / provision etc.
Thank you for your work creating OctoPi!
I was able to find the conversation my friend and I had on how we got it working originally.
1) Download & install Vagrant: https://www.vagrantup.com/downloads.html
2) In the OS X Terminal: sudo vagrant plugin install vagrant-share
3) sudo vagrant plugin install vagrant-nfs_guest
4) cd OctoPi/src/vagrant
5) sudo vagrant up
or if already provisioned, sudo vagrant provision
And step 5 automatically built the .img file, which was recently removed in the commit: https://github.com/guysoft/OctoPi/commit/bacf064f03a903149501046bb56411d3214451ce
I noticed you also changed the 'Vagrantfile' quite a bit from before.
The original one below worked:
`Vagrant.configure("2") do |o|
o.vm.box= "ubuntu/zesty64"
o.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
o.vm.synced_folder "../../", "/OctoPi", create:true, type: "nfs"
o.vm.network :private_network, ip: "192.168.55.55"
o.vm.provision :shell, :path => "setup.sh", args: ENV['SHELL_ARGS']
end`
The new Vagrantfile in the latest commits results in these errors in the Terminal:
Users-MacBook-Pro:~ user$ cd OctoPi/src/vagrant
Users-MacBook-Pro:vagrant user$ sudo vagrant up
Password:
/Users/User/OctoPi/src/vagrant/Vagrantfile:6:in read': No such file or directory @ rb_sysopen - ../custompios_path (Errno::ENOENT) from /Users/User/OctoPi/src/vagrant/Vagrantfile:6:in
block in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/config/v2/loader.rb:37:in load' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/config/loader.rb:125:in
block (2 levels) in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/config/loader.rb:119:in each' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/config/loader.rb:119:in
block in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/config/loader.rb:116:in each' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/config/loader.rb:116:in
load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/vagrantfile.rb:28:in initialize' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/environment.rb:810:in
new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/environment.rb:810:in vagrantfile' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/environment.rb:556:in
host'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/environment.rb:214:in block in action_runner' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/action/runner.rb:33:in
run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/environment.rb:543:in hook' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/lib/vagrant/environment.rb:792:in
unload'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/bin/vagrant:141:in ensure in <main>' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.7/bin/vagrant:141:in
Ok. So:
../../CustomPiOS/src/update-custompios-paths
as stated in the readme. In case you didn't you need to git clone CustomPiOS too now, see the README.vagrant/run_vagrant_build.sh
after you run sudo vagrant up
.Hope that helps, post if you have any issues. It seems like its just you didn't see the new build steps that were added.
I have no idea how to setup PiOS. It was nice that everything was within one repo before. If we can get to the point of avoiding the terminal and making an executable file you click on to build the images we are golden.
Edit 1: Just cloned PiOS, the only place in the OctoPi Readme it says ../../CustomPiOS/src/update-custompios-paths
is for Debian, etc and not Vagrant.
Seriously cannot figure this out :(
Its CustomPiOS. The reason is its a separate repo is because its a complete toolkit to build OSes now. I'll update the readme to include it also to say so for vagrant.
All that script does is add the path of CustomPiOS in custompios_path
, which you can see in your vagrant its complaining about.
Ok I got farther this time, and now this error/issue has appeared in the Terminal output:
The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!
mount -o vers=3,udp 192.168.55.1:/Users/Ken/CustomPiOS/src /CustomPiOS
Stdout from the command:
Stderr from the command:
mount.nfs: requested NFS version or transport protocol is not supported
Ok, so good news and bad news. The good new is your a not alone, its a common OS X error and you can see it here: https://github.com/mitchellh/vagrant/issues/7646
The bad news is that there are several possible causes. After reading it the mains ones that stand out are:
Looks like there was an extraneous newline character added to the custompios_path
file which generated the above error, before you replied I typed this comment. I didn't experience what you described above, but I can confirm the newline character is what caused the previous issue I posted.
However, I have ran into a new issue:
==> default: Setting up realpath (8.26-3ubuntu3) ... ==> default: Setting up zip (3.0-11) ... ==> default: Processing triggers for systemd (232-21ubuntu5) ... ==> default: Setting up qemu-user-static (1:2.8+dfsg-3ubuntu2.3) ... ==> default: Processing triggers for man-db (2.7.6.1-2) ... Kens-MacBook-Pro:vagrant Ken$ run_vagrant_build -bash: run_vagrant_build: command not found -bash: run_vagrant_build.sh: command not found Kens-MacBook-Pro:vagrant Ken$
try ./run_vagrant_build.sh
Note it has a .sh
and that some POSIX distros need the ./
at the beginning.
That worked, it appears to be building now. Crosses fingers.
I'm assuming I can make all of the above into a seperate .sh file I can just click on whenever I want to build an image.
Sure. Script what ever you want and share it :) We are using Jenkins for continuous builds
What about that newline character I mentioned, can this be patched in a new commit for OctoPi?
Maybe add a command to remove any newline in the file at the end of the script.
Update: nevermind about that newline character, It wasn't an issue at all. :)
Hello, ever since the file structure changed with the latest devel commits I am not able to build OctoPi anymore, and the instructions are pretty vague in the README.rst file in the root folder and they don't work for me using the latest Mac OS X Sierra 10.12.5.
I remember getting it setup initially with vagrant was quite a chore even before the changes, but I think it needs to be made easier to make/build the OctoPi img file such as double clicking on a .sh file or revising the readme file to give more clear instructions for Windows and OS X alike.
I would greatly appreciate help on this. :)
Thank you!