-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vagrant build environment #2594
Comments
@TD-er I have an ascii screen recording, about 275KB ... What is easiest to get this too you? From what I can see, I think the problem is an missing |
On linux tools/build_espeasy.sh should still work easily without vargant virtualbox has got recording feature |
There is a call to apt-get update in the Vagrant file:
Maybe you could run |
The error I saw might have been my VB plugin to upgrade the VB Tools. But later, I have the following red/errors
The following in red
Later, but I think it's just a warning ...
then alot of red ...
Might be just easier with the screen recording? |
Just make sure you are running the current state of the Github. |
Clean up the test, and did a git pull and looks much better. Testing again, just to make sure ... But I think this is working as expected!!! Thanks @TD-er |
Clean re-run works as expected
|
@TD-er ping me if you need anything else tested, else I think the base of the vagrant build system seems to work. |
Maybe @micropet (see #2590 (comment) ) can test by changing the version of the Vagrant image to see if it also works on HyperV. Described here |
Hi @TD-er , |
@workgroupengineering Why should we? Please give pros and cons. |
Just as a reply to @micropet on his post here: #2590 (comment) You do need any of the supported visualization platforms. @workgroupengineering Also this is very easy to explain to the inexperienced and took me about 3 - 4 hours yesterday to setup. |
So I can't demand a DOS build env? Hahaha ... Just adding my +1, because this will/does make it easier for me to build custom firmware for the ESPEasy eco system, thanks @TD-er |
Thanks for the information. I can not get any further. d:\Soft\ESPEasy-mega\tools\vagrant>vagrant up There was an error while executing Command: ["--version"] Stderr: Der Befehl ""c:\Program Files\Oracle\VirtualBox\VBoxManage.exe"" ist entweder falsch geschrieben oder |
OK, I think you'll also need to patch the Vagrantfile then to set a provider. |
Great. |
Have a look at Vagrant providers It seems like we can add a set of providers here. Edit:
|
With the original Vagrant File I get the following message: vagrant up --provider=hyperv Vagrant requires administrator access for pruning SMB shares and Vagrant requires administrator access to create SMB shares and As another option, you can manually specify an IP for the machine |
Hi @Grovkillen , Why docker?
Why not docker?
|
Compiling on a R'pi is not really fun. Like I said, we can later look into it, but for now the 'con' outweighs the 'pros'. |
Right now I did not add the option for routable IPs, since it is for now a test setup to see where people run into. So for the first test I explicitly did not add the routed IP option. Did it build a version for you? |
on linux (rpi) you not need this, just use buildESPEasy.sh script it use virtualenv so will no mess with your system/profile dir |
Only thing may be that the reported packages you should install using apt-get may have different names on the Pi, since it is Debian based. |
Good question. Not in my ESPEasy folder. Where should the version be found? |
In a newly created build folder at the same location where the Vagrantfile is located. N.B. you should also have the bootstrap.sh file in the same directory as the Vagrantfile or else it will do nothing. Maybe you have run it multiple times already, so it is not considering it a provision step.
You can also trigger a provision with adding |
Where do you try to connect to? If that doesn't work, please show all output of the provisioning of the VM. |
I connect on the IP that is displayed to me and on port 22. ==> default: Waiting for machine to boot. This may take a few minutes... here the complete Output: vagrant>vagrant up Vagrant requires administrator access to create SMB shares and As another option, you can manually specify an IP for the machine d:\Soft\ESPEasy-mega\tools\vagrant> I try with password and username vagrant |
I still have the impression something is really different with that image.
|
Yes, that's how it looks. |
works for me :)
|
I think this part is the key here:
I will later this week or beginning next week enable HyperV here on my computer. |
you need to call this in command line first: |
OK, it is now downloading (slowly)....
|
OK, some things are more clear now.... Vagrant HyperV limitations
However, I don't have a SMB share defined on my host and I'm not sure if the defaults of Windows 10 will allow me to create a SMB/CIFS share compatible with Samba on Linux. The reason why I wanted to use a shared folder is to allow for easy definition of build parameters in a text file. So for now, HyperV is not (yet) a supported platform for this use case. |
OK, one big fat warning here. DO NOT try to run HyperV as a test.Disabling it, does also disable other stuff, so even after several reboots, it will not run any Virtualbox environment anymore. Also tried these steps
I have no clue anymore whatsoever and right now I really don't know if I should continue with this Vagrant option, which was meant to make stuff easy for people. Edit:
This should allow again to run VirtualBox etc. at full speed (not software emulated virtualization). |
Oh man, I've done you a lot of work, sorry. |
Yep, that's the only way to learn things, by failing. |
this is exactly what have found some posts up about work on hyperv and virtualbox on one machine, you need to add menu to choose before boot what you want to use |
Well, that may already be outdated information, since Virtualbox also does seem to support HyperV as a hypervisor. But at least it has made it clear to me that Vagrant does not work the same on any existing Windows install out there. |
I have tested the Vagrant environment on Ubuntu 18.04 LTS with Virtualbox, it looks to be working fine but I am missing an info how to configure the plugins custom selection or change the preselected ESP Easy firmware compilation list. Could you please direct me to the most accurate information source? Thanks in advance! |
@ghtester You're not only missing the instructions, but also the functionality to make it easy to select. Like I said, it is until now just a test setup to see what problems do arise. But I thought to have it tested first instead of making a completely fool proof system which takes 100's of hours to develop only to find out almost anybody had issues with starting a Vagrant environment. |
Thanks @TD-er ... I hope the M$ Hyper-V problem does not slow or stop this option to build custom firmware. So far this has been the easiest for this n00b to build a test custom firmware. Almost a single click/command, thou some deps are needed, which in my case are already in place. I don't believe this option will be for everybody, but I really hope there might be enough energy and time to take this to the next level. All said by a n00b that can mostly test and help a little with debugging and poking fun at the guys that paid for their OS ... Last part a joke ... }-) |
just add test if custom-build.h exist so copy it to source dir and use it |
@uzi18 That's a pretty neat one :) |
Last night I added the option to use your own I did include all plugin/controller/notifier defines with comment |
@TD-er - Is the
Also quite a few warnings, is it possible to change the output text for warnings to yellow? Would be easier to spot real errors in red. Really looking forward to easy builds ... And now with pre-setup configs, this is just awesome! |
Answering my own question, by experimenting, still could be wrong, the shipped An idea might be to have a default working build to start with - ie |
I can add a version which will build a very minimal version. Also there must be some extra feedback if a build failed, why it failed. About the colors. I don't know if the Windows command prompt or PowerShell has ANSI terminal enabled by default. |
Minimal build version would be nice. Also can be a ref, ie if you can't build the minimal, you have a big problem ... ;-) Build log is a good idea. Detailed vs warnings. I am just thinking if something fail, an error log would be quickest. Just looking throu a very big log file for an error in the middle a pain in the @$$. Colour output would have been a nice to have, but log files I think are better. Thanks @TD-er |
I went back into the past, uninstalled Hyper-V and installed Virtualbox. In Custem.h is a controller and a few plugins enabled. default: Checking size .pio/build/custom_ESP8266_4M1M/firmware.elf I have another question: If I change something, how does the Compieler process restarted? Edit: Thank you.. |
The script does fetch the latest ESPeasy branch from Github and uses that. Currently I think it is the easiest to just call |
Thank you. |
Today I added the option to define a list of PIO environments to build in Vagrant. For example:
|
A warning to start with:
DO NOT try to run HyperV as a test.
See: #2594 (comment) to help fully disabling HyperV again.
For now, HyperV is not supported as build platform since we have no easy way to share the build files.
As shortly introduced here: #2590 (comment)
This is the first initial test to see if using Vagrant is a viable option for quickly building your own binaries.
To get started:
In Windows it can be CMD or Windows PowerShell and in Linux it can be any terminal.
N.B. in Windows you can also quickly open a command shell by holding the shift and right click on the folder and select the Windows Power Shell.
In the opened shell:
vagant up
Please let me know if anything fails.
If it is finished building something in the newly created
build
folder, then you can typevagrant halt
in the same window you typedvagrant up
.Ideas for improving on this concept:
tools
already has a-p
flag for building a PR)For debugging:
When the Vagrant box is running, you can connect to it using Putty (or any other ssh client).
vagrant
vagrant
localhost
The Github repository is cloned into:
~/GitHub/letscontrolit/ESPEasy
vagrant
At boot of the Vagrant VM, the file
bootstrap.sh
is copied to the home directory of the vagrant user and stripped of typical Windows line endings (if present) (CRLF => Unix line endings)This is then executed, so for now, you can test with it to see if it needs to build some other environment.
Please note there is a shared folder between the Vagrant VM and your own OS.
This is the same folder as where the
Vagrantfile
(no extension) andbootstrap.sh
are located.From within the Vagrant VM these are available as a mount on
/vagrant
The build is zipped like any nightly build and then this zip file is moved to the shared folder in a separate directory called
build
. (will be created by the script)So from within Vagrant this is
/vargant/build/
One last note on the
Vagrantfile
. Do not use tabs in there, only spaces.On every call of the
vagrant
command, this file will be checked for errors.To start over with a clean instance, call:
vagrant destroy
So in short, the commands:
vagrant up
vagrant up --provision
(to run the apt-get install commands again)vagrant halt
vagrant destroy
The build script will not (yet) update the Git Repository if the directory is already present.
So either start over, or remove the Git directory or run from within
~/GitHub/letscontrolit/ESPEasy
:git fetch
git pull
The text was updated successfully, but these errors were encountered: