Cloud-Init 0.7.5

  1. Add the following key-value pair with an empty line above and below it:

    no_ssh_fingerprints: true
    
  2. Set ssh_pwauth. This parameter specifies whether to enable password login in SSH mode. The value true indicates that the password login in SSH mode is enabled, and the value false indicates that the function is disabled.

    ssh_pwauth: true
    
  3. Set disable_root to false. This parameter specifies whether to allow SSH login of user root.

    disable_root: false
    
  4. Add preserve_hostname: false.

    preserve_hostname: false
    
  5. Use the number sign (#) to comment out the following statements:

    mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
    resize_rootfs_tmp: /dev
    ssh_deletekeys:   0
    
  6. Modify ssh_genkeytypes as follows:

    ssh_genkeytypes: ['rsa', 'dsa']
    
  7. Modify syslog_fix_perms as follows:

    syslog_fix_perms: root:root
    
  8. Add the following statements:

    network:
       config: disabled
    datasource_list: [ OpenStack ]
    

    Important

    For Ubuntu 14.04, the following line does not need to be added:

    datasource_list: [ OpenStack ]
    
  9. Add the following statement after - final-message in cloud_final_modules:

    - power-state-change
    
  10. Check and modify the information in system info to make it consistent with the following content:

    system_info:
       default_user:
         name: root   // User name for OS login
          lock_passwd: False   // True indicates that login using a password is disabled. Note that some OSs use value 1 to disable the password login.
         gecos: redhat
         groups: [audio, cdrom, dialout, floppy]   // (optional) Add the user to other groups that have been configured in etc/group.
          sudo: ["ALL=(ALL) NOPASSWD:ALL"]  //Current user has all the root rights.
          shell: /bin/bash   //Execute shell in bash mode.
       distro: sles
       paths:
          cloud_dir: /var/lib/cloud/
          templates_dir: /etc/cloud/templates/
          upstart_dir: /etc/init/
       ssh_svcname: sshd
    

    In the preceding command, change the value of distro based on the OS, such as distro: sles, distro: rhel, distro: ubuntu, distro: debian, and distro: fedora.

  11. (Optional) For Ubuntu 14.04, perform the following operations:

    1. Use the vi editor to open the /etc/init/cloud-init-local.conf configuration file and modify the following configuration items:

      # cloud-init - the initial cloud-init job
      #   crawls metadata service, emits cloud-config
      start on mounted MOUNTPOINT=/ and mounted MOUNTPOINT=/run and stopped bms-network_config
      
    2. Run the following commands to configure the OpenStack source:

      dpkg-reconfigure cloud-init

      image1

      Run the vim /etc/cloud/cloud.cfg.d/90_dpkg.cfg command to open the configuration file and check whether the items are correctly configured in the file.

      # to update this file, run dpkg-reconfigure cloud-init
      datasource_list: [ OpenStack ]
      ~
      ~
      ~
      

      If the configuration file content is consistent with the preceding command output, the configuration is successful.