Skip to content
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

Unified script command #12

Open
casr opened this issue Jan 13, 2014 · 8 comments
Open

Unified script command #12

casr opened this issue Jan 13, 2014 · 8 comments

Comments

@casr
Copy link
Member

casr commented Jan 13, 2014

This is a work in progress. I will update this comment when new ideas arise.

% ./box -h
usage: ./box cleanup
             create
             destroy
             initialize
             interactive
             package

Short summary:
   cleanup     -- prepare the VM for distribution (delete CD-ROMs, etc.)
   create      -- perform an initialize, cleanup and package
   destroy     -- remove the VM from VirtualBox
   initialize  -- setup a box from ks.cfg and shutdown
   interactive -- perform a create step but prompt for options
   package     -- produce a box file for Vagrant consumption

Options:
   -h --help
   -N --name [VM Name]
@casr
Copy link
Member Author

casr commented Jan 13, 2014

/cc @javornikolov @pinepain

You've both updated the scripts to in the directory to enhance the process in some way. I think I would prefer to unify all of these steps into one script and would appreciate any feedback you have.

@pinepain
Copy link

Hi @casr, sure, I will put my hands on it to cleanup a bit and try to push pr asap.

TL;DR
I use PXE to do all steps in fully automated way but some things (like mounting ISO image) should be made cross-platform and sometimes ks.cfg uploading via nc hangs at ~48% (at least on OS X 10.9) so I would like to figure out why and try to fix that. In addition I also use virtualbox guest additions from current user installation (from default location) and want to add auto-pick first (latest) image from box folder to use it by default if no one specified.

Also I have in mind to make ks.cfg modular to easy remove virtualbox part and utilize it in production environment.

P.S. I also tried to run net install, is it worth to be added as an option?

@casr
Copy link
Member Author

casr commented Jan 13, 2014

sometimes ks.cfg uploading via nc hangs at ~48% (at least on OS X 10.9)

Yup, it's a little temperamental! It's because nc immediately delivers it's payload before waiting for all the HTTP headers from Anaconda. Then Anaconda gets confused. I think the -i option for nc does help here but personally I've been using python -m SimpleHTTPServer as it recently became unbearably annoying! I'll open a separate issue for that.

I've been intrigued by the PXE stuff in your repo so looking forward to trying that out!

Also I have in mind to make ks.cfg modular to easy remove virtualbox part and utilize it in production environment.

P.S. I also tried to run net install, is it worth to be added as an option?

Modularising ks.cfg is desirable which would hopefully would help for removing the VirtualBox part but I must admit it probably won't be a focus of this repo (depends how it is done, I guess). Again, if it is modular then assembling a ks.cfg file for a net install suddenly becomes an option too.

@casr
Copy link
Member Author

casr commented Jan 13, 2014

... hopefully would help for removing the VirtualBox part but I must admit it probably won't be a focus of this repo

Just to be clear, I meant that removing VirtualBox bits isn't a focus. I would very much like to modularise.

@javornikolov
Copy link
Contributor

Just to add one idea here regarding configuration (variables with directory paths, etc. - presently in vars.sh). It could be several levels:

  • defaults
  • local overrides (e.g. in current folder, or somewhere under user's ${HOME}
  • command-line parameters

@javornikolov
Copy link
Contributor

In another project: https://github.com/opscode/bento and related the Packer - there is already the idea of modularization. Maybe it's a bit too complicated but it could provide some ideas for this PR.
It somehow manages to deal with the auto-boot (no need to manually provide the kickstart url), I'm haven't delved to see how.

@javornikolov
Copy link
Contributor

P.S. I also tried to run net install, is it worth to be added as an option?

I was trying something like that to build box with Oracle Linux with UEK kernel (needs some manual assembling of setup files). For some reason the simple http servers which I tried (based on python and node.js) didn't play well with it. NFS worked OK.

@pinepain
Copy link

In general, there are already jedi4ever/veewee project which builds various linuxes vm.

casr added a commit that referenced this issue Aug 21, 2014
Parse the command line arguments and forward them to respective
subroutines. Just the `./setup` side of things have been implemented
here.

Work done for GH-12
casr added a commit that referenced this issue Aug 26, 2014
Parse the command line arguments and forward them to respective
subroutines. Just the `./setup` side of things have been implemented
here.

Work done for GH-12
casr added a commit that referenced this issue Aug 26, 2014
Parse the command line arguments and forward them to respective
subroutines. Just the `./setup` side of things have been implemented
here.

Work done for GH-12
casr added a commit that referenced this issue Aug 26, 2014
Parse the command line arguments and forward them to respective
subroutines. Just the `./setup` side of things have been implemented
here.

Work done for GH-12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants