boxen / our-boxen

Copy me for your team.
https://github.com/boxen/our-boxen/
MIT License
2.58k stars 882 forks source link

our-boxen install is painfully slow #736

Closed wxactly closed 9 years ago

wxactly commented 9 years ago

I'm running through the initial boxen setup on OSX 10.10.2 (Xcode installed) with a fresh copy of this repo. I'm basically just trying to get something working on my machine before I start customizing. The script stalled for over 30 minutes on Executing 'brew boxen-install boxen/brews/gcc48'

$ ./script/boxen --no-fde --debug

...

Notice: Package[boxen/brews/git](provider=homebrew): Updating homebrew formulas
Debug: Executing 'brew update'
Debug: Executing 'brew boxen-install boxen/brews/git'
Notice: /Stage[main]/Git/Package[boxen/brews/git]/ensure: created
Debug: /Package[boxen/brews/git]: The container Class[Git] will propagate my refresh event
Debug: Class[Git]: The container Stage[main] will propagate my refresh event
Notice: /Stage[main]/Boxen::Bin/File[/opt/boxen/bin/boxen]/ensure: created
Debug: /Stage[main]/Boxen::Bin/File[/opt/boxen/bin/boxen]: The container Class[Boxen::Bin] will propagate my refresh event
Debug: Class[Boxen::Bin]: The container Stage[main] will propagate my refresh event
Debug: Class[Hub]: The container Stage[main] will propagate my refresh event
Debug: Executing 'brew info boxen/brews/gcc48'
Debug: Executing 'brew boxen-install boxen/brews/gcc48'

Is it supposed to take so long? The whole script hasn't finished yet still, as I write this issue. It's been over 45 minutes total at this point...

rafaelfranca commented 9 years ago

Yes. The initial setup usually is longer, although I think your problem is that you are not using the packages cache, and it is compiling in your machine.

wxactly commented 9 years ago

@rafaelfranca Thanks for the tip - can you clarify what you mean? I don't want to recompile everything if I don't need to. Is there some documentation available for how to use the packages cache?

rafaelfranca commented 9 years ago

Boxen by default use a package cache in a S3 bucket provided by GitHub, depending on what you use this bucket not contain the packages, and there is nothing that you can do. The best thing to do is create your own package cache and let things compile in the first time.

to configure it you just need to set https://github.com/boxen/our-boxen/blob/689633f05a16c6fc4589d5341a2e8f40a7419ead/config/boxen.rb#L10-13 and add a fact like this example https://github.com/boxen/our-boxen/blob/689633f05a16c6fc4589d5341a2e8f40a7419ead/facts.d/example.yaml#L7.

boxen_download_url_base: "http://my-packages.s3.amazonaws.com"
blackjid commented 9 years ago

@rafaelfranca @mikemcquaid

How would you add the S3 credentials if you want to have your boxen repo public?? I seams that is no a great idea to just add them to the config/boxen.rb file, right?

any idea?

MikeMcQuaid commented 9 years ago

I don't know but maybe you could use environment variables and wrap them somehow with another tool to set them?