Saturday, February 20, 2016

OpenStack File Injection


OpenStack File Injection


用Inject File方式可完成,如下。

File injection Arbitrary local files can also be placed into the instance file system at creation time by using the --file option. You may store up to five files. For example, let's say you have a special authorizedkeys file named specialauthorized_keysfile that for some reason you want to put on the instance instead of using the regular SSH key injection. In this case, you can use the following command:

$ nova boot --image ubuntu-cloudimage --flavor 1  \
  --file /root/.ssh/authorized_keys=special_authorized_keysfile authkeyinstance

No comments:

Post a Comment