Giter Site home page Giter Site logo

Comments (4)

eayin2 avatar eayin2 commented on May 22, 2024 1

I agree, @eayin2 ... the hard-coding of cloud-config is a deal breaker for me ... discourages me from using this most useful effort. OTOH, one can just add the bits required in the hardcoded cloud-config and still run with it.

If I recall correctly, a non hard coded version with an optional python dependency was made in the pull request #56 (comment)

from kvm-install-vm.

eayin2 avatar eayin2 commented on May 22, 2024

Cause

The reason it's not picked is because -s user-data.sh allows to execute a shell script and not add cloud-config settings, as seen by the Content-Type: text/x-shellscript; charset="us-ascii" boundary.

Feature request

Can you allow supplying a custom cloud-config? If no cloud-config has been supplied, then the default can be used. I think the cloud config should not be hardcoded. By default kvm-install-vm uses NOPASSWD for sudo users. I prefer to provide a hashed password to cloud-init like so:

Example without sudo's NOPASSWD

users:                                                                                                                                                                                                             
    - default                                                                                                                                                                                                      
    - name: ${ADDITIONAL_USER}                                                                                                                                                                                     
      groups: ['${SUDOGROUP}']                                                                                                                                                                                     
      shell: /bin/bash                                                                                                                                                                                             
      sudo: ALL=(ALL) ALL                                                                                                                                                                                          
      ssh-authorized-keys:                                                                                                                                                                                         
        - ${KEY}        
                                                                                                                                                                                           
chpasswd:                                                                                                                                                                                                          
  list: | 
    root:\$6\$some-hash                                                                                             
    myuser:\$6\$some-hash                                                                                          
  expire: false
  • The hash password can be stored encrypted with openssl and decrypted interactively before running kvm-install-vm.

Note

Because the hashes are within a heredoc format $-sign has to be escaped by a backslash and not single quotes.

from kvm-install-vm.

laymonk avatar laymonk commented on May 22, 2024

I agree, @eayin2 ... the hard-coding of cloud-config is a deal breaker for me ... discourages me from using this most useful effort. OTOH, one can just add the bits required in the hardcoded cloud-config and still run with it.

from kvm-install-vm.

laymonk avatar laymonk commented on May 22, 2024

@eayin2, thanks for the update ... and yes, I agree with the maintainer on adding python as a dependency, that can throw up a whole pile of complications (with modules, python versions, and whatnot) ...

If I was to try and address this, I would prefer that people create their ISO cloud-config files, and then supply it as a parameter ... yeah, not smooth, but easier to accommodate in the existing eco-system ... just an optional flag/param to avoid generating ISO and read it from a given path.

from kvm-install-vm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.