Announcement

Collapse
No announcement yet.

VMware Integrated Openstack Cloud-Init

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • VMware Integrated Openstack Cloud-Init

    Hello

    We haven't posted for a while but here is a problem we cannot seem to work out.

    We have a fully functioning VMware Integrated Openstack Install and we want to use Cloud-init to inject passwords.

    We are using the VMware hypervisor so we cannot use the KVM images that are already setup for Openstack.

    All we want to do is have Centos, Ubuntu and Debian Images with preset passwords and then on first login be forced to change the password.

    We can create a VMware image then export as an .ova and import into glance and all that works fine. If we could add user-data to that image before we export as an .ova then when the instance boots the customer is provided with the pre installed password but they are forced to change the password on first login. How would this be done?

    Secondly how would be manage this so that a random hostname is created on each instance provision?

    I guess all we want is the following:-

    * Have a pre-configured password for all instances
    * Force password change on first login
    * Assign Random hostname
    * Remove all information specific to the initial VM so the customer gets a clean instance.

    I am sure all this can be achieved with Cloud-init but we cannot see how to do it. We have tried but cloud-init wants to always get metadata from the openstack metadata service. Is it possible for cloud-init to get information locally?

    We would be will to pay someone to get this working as per our requirements as currently we are manually setting up Instances and providing passwords.

    If someone is will be spend time doing this we can provide more detailed information and contact details via PM

  • #2
    I assume you have read through this

    https://docs.openstack.org/kilo/conf...nt/vmware.html

    This also appears to point to a solution

    http://talk.manageiq.org/t/cloud-ini...ovider/1254/12

    Can't help any further as i have never used cloud-init

    Comment


    • #3
      Hello

      Yes we read the docs and even some of the links provided in these.

      We have spent the night working out how to generate SSH keys on boot as a part of the cloning process we remove the ssh key and other info pertaining to the image, otherwise everyone would get the same ssh keys. I though if there are not ssh key present then on boot they are automatically generated,,,,This is not the case of after we clone and upload into glance and boot an instance we are unable to ssh into the machine....we can login using the password and correctly are prompted for a password change which is what we want. We found a script that checks for ssh keys and if none are present the script generates them but we cannot get it to work.

      As we are using Ubuntu 16.10 we needed to put the script in /ect/profile but still no avail

      #!/bin/sh
      # sshd-key-gen.sh
      # post-apply script that properly manages ssh authentication keys
      # Install in /var/radmind/postapply

      SSHKEYGEN=/usr/bin/ssh-keygen

      if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
      $SSHKEYGEN -q -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" \
      -C "" < /dev/null > /dev/null 2> /dev/null
      echo "Created /etc/ssh_host_rsa_key"
      fi

      if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
      $SSHKEYGEN -q -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" \
      -C "" < /dev/null > /dev/null 2> /dev/null
      echo "Created /etc/ssh_host_dsa_key"
      fi

      exit 0


      At this point everything is how we want it EXCEPT for the ssh key issue.

      Comment

      Working...
      X