...
Disclaimer: this is a sample script for illustrative purposes only. Please see cloud-init documentation to find out how this script works.
Code Block |
---|
#cloud-config
hostname: "userdatahostname"
users:
- name: "myuser"
# mkpasswd --method=SHA-512 --rounds=4096 mypass
passwd: "$6$rounds=4096$aD0didNw/$Pau0z3YK2Ss5MWYoxScEedfMa.1N5qRqK0xYrgs79qdjHdoFUIRmVXpeEewDduSbImu7sqIjSRm40xO6PpJhk/"
groups:
- "sudo"
ssh_authorized_keys:
- "ssh-rsa USER_ID_RSA.PUB" |
...
Code Block |
---|
#cloud-config\r\nhostname: \"userdatahostname\"\r\nusers:\r\n - name: \"myuser\"\r\n \t# mkpasswd --method=SHA-512 --rounds=4096 mypass\r\n passwd: \"$6$rounds=4096$aD0didNw\/$Pau0z3YK2Ss5MWYoxScEedfMa.1N5qRqK0xYrgs79qdjHdoFUIRmVXpeEewDduSbImu7sqIjSRm40xO6PpJhk\/\" \r\n groups:\r\n - \"sudo\"\r\nssh_authorized_keys:\r\n - \"ssh-rsa USER_ID_RSA.PUB\" |
...
Code Block |
---|
{ "links": [], "metadata": { "monitoring-metrics": [ { "name": "cpu_time" }, { "name": "used_mem" } ], "startup-script": "#cloud-config\r\nhostname: \"userdatahostname\"\r\nusers:\r\n - name: \"myuser\"\r\n \t# mkpasswd --method=SHA-512 --rounds=4096 mypass\r\n passwd: \"$6$rounds=4096$aD0didNw\/$Pau0z3YK2Ss5MWYoxScEedfMa.1N5qRqK0xYrgs79qdjHdoFUIRmVXpeEewDduSbImu7sqIjSRm40xO6PpJhk\/\" \r\n groups:\r\n - \"sudo\"\r\nssh_authorized_keys:\r\n - \"ssh-rsa USER_ID_RSA.PUB\"" } } |
...
Code Block | ||
---|---|---|
| ||
{
"links": [],
"metadata": {
"monitoring-metrics": [
{
"name": "cpu_time"
},
{
"name": "used_mem"
}
],
"startup-script":
"#cloud-config\r\nhostname: \"userdatahostname\"\r\nusers:\r\n - name: \"myuser\"\r\n \t# mkpasswd --method=SHA-512 --rounds=4096 mypass\r\n passwd: \"$6$rounds=4096$aD0didNw\/$Pau0z3YK2Ss5MWYoxScEedfMa.1N5qRqK0xYrgs79qdjHdoFUIRmVXpeEewDduSbImu7sqIjSRm40xO6PpJhk\/\" \r\n groups:\r\n - \"sudo\"\r\nssh_authorized_keys:\r\n - \"ssh-rsa USER_ID_RSA.PUB\""
}
} |
...
Code Block |
---|
{ "links": [], "metadata": { "monitoring-metrics": [ { "name": "cpu_time" }, { "name": "used_mem" } ], "startup-script": "#cloud-config\r\nhostname: \"userdatahostname\"\r\nusers:\r\n - name: \"myuser\"\r\n \t# mkpasswd --method=SHA-512 --rounds=4096 mypass\r\n passwd: \"$6$rounds=4096$aD0didNw/$Pau0z3YK2Ss5MWYoxScEedfMa.1N5qRqK0xYrgs79qdjHdoFUIRmVXpeEewDduSbImu7sqIjSRm40xO6PpJhk/\" \r\n groups:\r\n - \"sudo\"\r\nssh_authorized_keys:\r\n - \"ssh-rsa USER_ID_RSA.PUB\"" } } |
...
Code Block |
---|
{
"id": 24,
"uuid": "2fade39a-fe59-44b4-be3f-b96b63b48153",
"name": "ABQ_2fade39a-fe59-44b4-be3f-b96b63b48153",
"label": "VM_metadata",
"description": "A virtual machine",
"cpu": 1,
"ram": 48,
"vdrpEnabled": true,
"vdrpPort": 0,
"idState": 1,
"state": "NOT_ALLOCATED",
"idType": 0,
"type": "MANAGED",
"highDisponibility": 0,
"password": "uMvMpfyD",
"metadata": {
"monitoring-metrics": [
{
"name": "cpu_time"
},
{
"name": "used_mem"
}
],
"startup-script": "#cloud-config\r\nhostname: \"userdatahostname\"\r\nusers:\r\n - name: \"myuser\"\r\n \t# mkpasswd --method=SHA-512 --rounds=4096 mypass\r\n passwd: \"$6$rounds=4096$aD0didNw/$Pau0z3YK2Ss5MWYoxScEedfMa.1N5qRqK0xYrgs79qdjHdoFUIRmVXpeEewDduSbImu7sqIjSRm40xO6PpJhk/\" \r\n groups:\r\n - \"sudo\"\r\nssh_authorized_keys:\r\n - \"ssh-rsa USER_ID_RSA.PUB\""
},
"monitored": true,
"protected": false,
"variables": {},
"creationTimestamp": 1520865331000,
"backuppolicies": [],
"generateGuestInitialPassword": false,
"natrules": [],
....
}
|
...