Compare commits
8 Commits
55b6e24f1e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
2cb5540a7b
|
|||
|
002ad2ca62
|
|||
|
7710231fc4
|
|||
|
|
d68deb96e9 | ||
|
01cdd000cb
|
|||
|
ea8e2de70a
|
|||
|
8ad3674c4d
|
|||
|
|
25192ad3ce
|
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"name": "garage-14",
|
"name": "garage-14",
|
||||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqNY8AuaM4byhaTZacfRJ\nv/qyHxcDJOMX/ElF1H908spdbB2ZiLXHOH1Ucw1d+NV6/QUtWk+ikKFPpasnatD7\nmjE57noH+H47Rll0nD7oT+in+fOBDHF9R0P6/qyRSdJbJkHOh0iC0MG4LcUfv0AY\nnVBW5iLZSe/PC3+PvhCv7yrx3ikSs0mg1ZWppw0ka5Ek3ZCZp5FB4L6++GYWpM+1\n6YI0CjMoRcXsaEQsJWhxHXT8/KDhW0BR8woZUGm0/Yn4teLYJzioxRfBep3lbygx\nOIsDN9IJzo2zVTGPDZQLXhVemIhzaepqTC77ibH7F0gN/1vsQBc/qf7UhbwaF4rR\ndQIDAQAB\n-----END PUBLIC KEY-----\n"
|
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAypINv1zTZ7+pyT0iRhik\n0W70ASYADo7qK7QyE9/3nu2sUrP1IjoNFsv/ceKwicH7Fw2Ei1o+yKZlKn7zJzY7\n93YRZndF04VH2bmqy0uOWK0Bdat7gCld5bvS6FmRflg7g64LFb33/64QIVsVGHGL\nYF2TO//x79t9JKcQDa4h5MOWzJNTFuEcUGa0gJjMYpWGVHEJSgRuIgyhXmyIJJgY\nguj6ymTm5+3VS7NzoNy2fbTt1LRpHb5UWrCR15oiLZiDSMLMx0CcGOCmrhvODi4k\n0umw+2NPd1G50s9z7KVbTqybuQ65se2amRnkVcNfaBIU5qk9bVqcmhZlEozmBZCd\ndwIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||||
}
|
}
|
||||||
4
clients/garage-15.json
Normal file
4
clients/garage-15.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "garage-15",
|
||||||
|
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy14sTt5gxVZi9C3KIEBu\nDyUgbb6jc3/GR22fNPTqV6uDHhxzhE2UsYwY/7yuA1RasdwHEOBWZaoC0Om5/Zmi\n8gn6//v1ILyLNaAcw+SQcxZkCN8Sk/0atRS9HYk1agE8Mvh72Fe2z3l+92VMefy7\nJwJUNNBTbnV2WVCchChoWnfhI7bkSLSHp0M2MO2pI+lkpSdmfkJSa5z9zihgxKO8\nXfvhryDCZNvfRVHhwc+ffpap0gLF0H9riGKE4FwLy4YqbuW1Tgm6bObb9bpOIw6Q\nVfH3kC/KMK5FlnxGmYtDkhRJ/wjGInRBk9WK/QOmjyd2FVxipEQmA4RdjlznRC9I\nrwIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||||
|
}
|
||||||
4
clients/leo.json
Normal file
4
clients/leo.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "leo",
|
||||||
|
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnFfQsJnREjbXTtpT6BVt\naBaUzRmCQi8Du0TzeUG0ENrY0p5Exqleye2rC6bJlB3PER1xr5zdtuXLgbcVumIb\nzroU5JPtFbQk7r/pj0atT+UEYzl16iuEpprQ/bug+f0nE514USr6YG4G+tlZ/jBI\nSHsCQF1P8ufXFLW0ewC7rdvBkgA+DwK14naRxS4jO5MSl4wmNTjs/jymTg508mQq\nf5tG52t8qFdgn9pRdBXmyTpPtwK7I4rZ+1Qn+1E5m4oQUZsxh8Ba1bGbKotVO7Ua\nYL1yCGx7zRRUvLLIdSMvlRXTJBUSQtQ8P4QUDWTY1Na2w3t9sulKg2Lwsw8tktvC\nCwIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||||
|
}
|
||||||
4
clients/postgres-10.json
Normal file
4
clients/postgres-10.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "postgres-10",
|
||||||
|
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2oBb5omC7ZionWhudgFm\n2NGcRXsI0c7+g1+0duaxj5dziaRTltqzpRJTfiJD6R36FcvEqwGc+qQgYSMzc1Xd\nY4OTvJFIDiFAmROm/DZYgFtTDldVNJZO2bbU3COYf/Z2Poq56gC4zLLd/zf6shgb\n2Mty8PlQ82JJAY9EMI3aAifdnZ1k/g4weFC4LFg9lUcNNXOwlAjp//LJ3ku3aY1r\nwW74msSeWEjE44YZdWyMYgM7Fy1hz5giHFQtRdOLemRCWQ8h26wn/cmWld7lsLg+\nlYqxokxWXGv8r5zR8kDTBkd0dxY7ZMbo7oESY4Uhuf4UReMe2ZGHto1E7w3llSj+\n7wIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||||
|
}
|
||||||
@@ -1,23 +1,16 @@
|
|||||||
{
|
{
|
||||||
"id": "gandi_api",
|
"id": "gandi_api",
|
||||||
"key": {
|
|
||||||
"encrypted_data": "lU7/xYTmP5Sb6SsK5TNNIyegWozzBtUzpg7oDdl6gcz9FEMmG2ft0Ljh5Q==\n",
|
|
||||||
"iv": "EZPQD3C+wsP/mBhF\n",
|
|
||||||
"auth_tag": "vF9E8Pj4Z8quJJdOMg/QTw==\n",
|
|
||||||
"version": 3,
|
|
||||||
"cipher": "aes-256-gcm"
|
|
||||||
},
|
|
||||||
"access_token": {
|
"access_token": {
|
||||||
"encrypted_data": "1Uw69JkNrmb8LU/qssuod1SlqxxrWR7TJQZeeivRrNzrMIVTEW/1uwJIYL6b\nM4GeeYl9lIRlMMmLBkc=\n",
|
"encrypted_data": "+skwxHnpAj/3d3e2u7s7B9EydbETj8b0flWahvb5gt/o4JYFWHrhIyX/0IVa\n4wgmu08eDgU51i0knGA=\n",
|
||||||
"iv": "cc1GJKu6Cf4DkIgX\n",
|
"iv": "ONKrFCt8Oj3GKIQ5\n",
|
||||||
"auth_tag": "ERem4S7ozG695kjvWIMghw==\n",
|
"auth_tag": "j9Hrk8ZZFMQub4NUO+2e4g==\n",
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"cipher": "aes-256-gcm"
|
"cipher": "aes-256-gcm"
|
||||||
},
|
},
|
||||||
"domains": {
|
"domains": {
|
||||||
"encrypted_data": "scZ5blsSjs54DlitR7KZ3enLbyceOR5q0wjHw1golQ==\n",
|
"encrypted_data": "lGfoPHdXEYYdJmoIA9M119wjVl1v4UzIv5gHADwx0A==\n",
|
||||||
"iv": "oDcHm7shAzW97b4t\n",
|
"iv": "q6XKbxhW7X9ONxNt\n",
|
||||||
"auth_tag": "62Zais9yf68SwmZRsmZ3hw==\n",
|
"auth_tag": "ns9WJH8Oe75siWu+sOZkRg==\n",
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"cipher": "aes-256-gcm"
|
"cipher": "aes-256-gcm"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
"chef_environment": "production",
|
"chef_environment": "production",
|
||||||
"normal": {
|
"normal": {
|
||||||
"knife_zero": {
|
"knife_zero": {
|
||||||
"host": "10.1.1.157"
|
"host": "10.1.1.151"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"automatic": {
|
"automatic": {
|
||||||
"fqdn": "garage-14",
|
"fqdn": "garage-14",
|
||||||
"os": "linux",
|
"os": "linux",
|
||||||
"os_version": "5.15.0-1059-kvm",
|
"os_version": "5.15.0-1095-kvm",
|
||||||
"hostname": "garage-14",
|
"hostname": "garage-14",
|
||||||
"ipaddress": "192.168.122.251",
|
"ipaddress": "192.168.122.36",
|
||||||
"roles": [
|
"roles": [
|
||||||
"base",
|
"base",
|
||||||
"kvm_guest",
|
"kvm_guest",
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
"timezone_iii::debian",
|
"timezone_iii::debian",
|
||||||
"ntp::default",
|
"ntp::default",
|
||||||
"ntp::apparmor",
|
"ntp::apparmor",
|
||||||
|
"kosmos-base::journald_conf",
|
||||||
"kosmos-base::systemd_emails",
|
"kosmos-base::systemd_emails",
|
||||||
"apt::unattended-upgrades",
|
"apt::unattended-upgrades",
|
||||||
"kosmos-base::firewall",
|
"kosmos-base::firewall",
|
||||||
@@ -46,13 +47,13 @@
|
|||||||
"cloud": null,
|
"cloud": null,
|
||||||
"chef_packages": {
|
"chef_packages": {
|
||||||
"chef": {
|
"chef": {
|
||||||
"version": "18.8.54",
|
"version": "18.10.17",
|
||||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.8.54/lib",
|
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
|
||||||
"chef_effortless": null
|
"chef_effortless": null
|
||||||
},
|
},
|
||||||
"ohai": {
|
"ohai": {
|
||||||
"version": "18.2.8",
|
"version": "18.2.13",
|
||||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.8/lib/ohai"
|
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
65
nodes/garage-15.json
Normal file
65
nodes/garage-15.json
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"name": "garage-15",
|
||||||
|
"chef_environment": "production",
|
||||||
|
"normal": {
|
||||||
|
"knife_zero": {
|
||||||
|
"host": "10.1.1.82"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"automatic": {
|
||||||
|
"fqdn": "garage-15",
|
||||||
|
"os": "linux",
|
||||||
|
"os_version": "5.15.0-1095-kvm",
|
||||||
|
"hostname": "garage-15",
|
||||||
|
"ipaddress": "192.168.122.57",
|
||||||
|
"roles": [
|
||||||
|
"base",
|
||||||
|
"kvm_guest",
|
||||||
|
"garage_node"
|
||||||
|
],
|
||||||
|
"recipes": [
|
||||||
|
"kosmos-base",
|
||||||
|
"kosmos-base::default",
|
||||||
|
"kosmos_kvm::guest",
|
||||||
|
"kosmos_garage",
|
||||||
|
"kosmos_garage::default",
|
||||||
|
"kosmos_garage::firewall_rpc",
|
||||||
|
"kosmos_garage::firewall_apis",
|
||||||
|
"apt::default",
|
||||||
|
"timezone_iii::default",
|
||||||
|
"timezone_iii::debian",
|
||||||
|
"ntp::default",
|
||||||
|
"ntp::apparmor",
|
||||||
|
"kosmos-base::journald_conf",
|
||||||
|
"kosmos-base::systemd_emails",
|
||||||
|
"apt::unattended-upgrades",
|
||||||
|
"kosmos-base::firewall",
|
||||||
|
"kosmos-postfix::default",
|
||||||
|
"postfix::default",
|
||||||
|
"postfix::_common",
|
||||||
|
"postfix::_attributes",
|
||||||
|
"postfix::sasl_auth",
|
||||||
|
"hostname::default",
|
||||||
|
"firewall::default"
|
||||||
|
],
|
||||||
|
"platform": "ubuntu",
|
||||||
|
"platform_version": "22.04",
|
||||||
|
"cloud": null,
|
||||||
|
"chef_packages": {
|
||||||
|
"chef": {
|
||||||
|
"version": "18.10.17",
|
||||||
|
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
|
||||||
|
"chef_effortless": null
|
||||||
|
},
|
||||||
|
"ohai": {
|
||||||
|
"version": "18.2.13",
|
||||||
|
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"run_list": [
|
||||||
|
"role[base]",
|
||||||
|
"role[kvm_guest]",
|
||||||
|
"role[garage_node]"
|
||||||
|
]
|
||||||
|
}
|
||||||
56
nodes/leo.json
Normal file
56
nodes/leo.json
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"name": "leo",
|
||||||
|
"normal": {
|
||||||
|
"knife_zero": {
|
||||||
|
"host": "leo.kosmos.org"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"automatic": {
|
||||||
|
"fqdn": "leo",
|
||||||
|
"os": "linux",
|
||||||
|
"os_version": "5.15.0-164-generic",
|
||||||
|
"hostname": "leo",
|
||||||
|
"ipaddress": "5.9.81.116",
|
||||||
|
"roles": [
|
||||||
|
"base"
|
||||||
|
],
|
||||||
|
"recipes": [
|
||||||
|
"kosmos-base",
|
||||||
|
"kosmos-base::default",
|
||||||
|
"kosmos_kvm::host",
|
||||||
|
"apt::default",
|
||||||
|
"timezone_iii::default",
|
||||||
|
"timezone_iii::debian",
|
||||||
|
"ntp::default",
|
||||||
|
"ntp::apparmor",
|
||||||
|
"kosmos-base::journald_conf",
|
||||||
|
"kosmos-base::systemd_emails",
|
||||||
|
"apt::unattended-upgrades",
|
||||||
|
"kosmos-base::firewall",
|
||||||
|
"kosmos-postfix::default",
|
||||||
|
"postfix::default",
|
||||||
|
"postfix::_common",
|
||||||
|
"postfix::_attributes",
|
||||||
|
"postfix::sasl_auth",
|
||||||
|
"hostname::default"
|
||||||
|
],
|
||||||
|
"platform": "ubuntu",
|
||||||
|
"platform_version": "22.04",
|
||||||
|
"cloud": null,
|
||||||
|
"chef_packages": {
|
||||||
|
"chef": {
|
||||||
|
"version": "18.10.17",
|
||||||
|
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
|
||||||
|
"chef_effortless": null
|
||||||
|
},
|
||||||
|
"ohai": {
|
||||||
|
"version": "18.2.13",
|
||||||
|
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"run_list": [
|
||||||
|
"role[base]",
|
||||||
|
"recipe[kosmos_kvm::host]"
|
||||||
|
]
|
||||||
|
}
|
||||||
63
nodes/postgres-10.json
Normal file
63
nodes/postgres-10.json
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"name": "postgres-10",
|
||||||
|
"chef_environment": "production",
|
||||||
|
"normal": {
|
||||||
|
"knife_zero": {
|
||||||
|
"host": "10.1.1.176"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"automatic": {
|
||||||
|
"fqdn": "postgres-10",
|
||||||
|
"os": "linux",
|
||||||
|
"os_version": "5.15.0-1095-kvm",
|
||||||
|
"hostname": "postgres-10",
|
||||||
|
"ipaddress": "192.168.122.41",
|
||||||
|
"roles": [
|
||||||
|
"base",
|
||||||
|
"kvm_guest",
|
||||||
|
"postgresql_replica"
|
||||||
|
],
|
||||||
|
"recipes": [
|
||||||
|
"kosmos-base",
|
||||||
|
"kosmos-base::default",
|
||||||
|
"kosmos_kvm::guest",
|
||||||
|
"kosmos_postgresql::hostsfile",
|
||||||
|
"kosmos_postgresql::replica",
|
||||||
|
"kosmos_postgresql::firewall",
|
||||||
|
"apt::default",
|
||||||
|
"timezone_iii::default",
|
||||||
|
"timezone_iii::debian",
|
||||||
|
"ntp::default",
|
||||||
|
"ntp::apparmor",
|
||||||
|
"kosmos-base::journald_conf",
|
||||||
|
"kosmos-base::systemd_emails",
|
||||||
|
"apt::unattended-upgrades",
|
||||||
|
"kosmos-base::firewall",
|
||||||
|
"kosmos-postfix::default",
|
||||||
|
"postfix::default",
|
||||||
|
"postfix::_common",
|
||||||
|
"postfix::_attributes",
|
||||||
|
"postfix::sasl_auth",
|
||||||
|
"hostname::default"
|
||||||
|
],
|
||||||
|
"platform": "ubuntu",
|
||||||
|
"platform_version": "22.04",
|
||||||
|
"cloud": null,
|
||||||
|
"chef_packages": {
|
||||||
|
"chef": {
|
||||||
|
"version": "18.10.17",
|
||||||
|
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
|
||||||
|
"chef_effortless": null
|
||||||
|
},
|
||||||
|
"ohai": {
|
||||||
|
"version": "18.2.13",
|
||||||
|
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"run_list": [
|
||||||
|
"role[base]",
|
||||||
|
"role[kvm_guest]",
|
||||||
|
"role[postgresql_replica]"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -18,6 +18,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
proxy_intercept_errors on;
|
proxy_intercept_errors on;
|
||||||
proxy_cache garage_cache;
|
proxy_cache garage_cache;
|
||||||
proxy_pass http://garage_web;
|
proxy_pass http://garage_web;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
release = "20240514"
|
release = "20260320"
|
||||||
img_filename = "ubuntu-22.04-server-cloudimg-amd64-disk-kvm"
|
img_filename = "ubuntu-22.04-server-cloudimg-amd64-disk-kvm"
|
||||||
|
|
||||||
node.default["kosmos_kvm"]["host"]["qemu_base_image"] = {
|
node.default["kosmos_kvm"]["host"]["qemu_base_image"] = {
|
||||||
"url" => "https://cloud-images.ubuntu.com/releases/jammy/release-#{release}/#{img_filename}.img",
|
"url" => "https://cloud-images.ubuntu.com/releases/jammy/release-#{release}/#{img_filename}.img",
|
||||||
"checksum" => "2e7698b3ebd7caead06b08bd3ece241e6ce294a6db01f92ea12bcb56d6972c3f",
|
"checksum" => "f7173eb7137b4f0ebeaea8fffe68ecdab1e3c787bde1fd8dfdf27103554332b3",
|
||||||
"path" => "/var/lib/libvirt/images/base/#{img_filename}-#{release}.qcow2"
|
"path" => "/var/lib/libvirt/images/base/#{img_filename}-#{release}.qcow2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Recipe:: host
|
# Recipe:: host
|
||||||
#
|
#
|
||||||
|
|
||||||
package %w(virtinst libvirt-daemon-system)
|
package %w(virtinst libvirt-daemon-system libvirt-clients)
|
||||||
|
|
||||||
directory "/var/lib/libvirt/images/base" do
|
directory "/var/lib/libvirt/images/base" do
|
||||||
recursive true
|
recursive true
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ DISKSIZE=${4:-10} # 10GB default
|
|||||||
# Directory where image files will be stored
|
# Directory where image files will be stored
|
||||||
IMAGE_DIR=/var/lib/libvirt/images
|
IMAGE_DIR=/var/lib/libvirt/images
|
||||||
IMAGE_PATH=$IMAGE_DIR/${VMNAME}.qcow2
|
IMAGE_PATH=$IMAGE_DIR/${VMNAME}.qcow2
|
||||||
CIDATA_PATH=${IMAGE_DIR}/cidata-${VMNAME}.iso
|
CIDATA_PATH=${IMAGE_DIR}/${VMNAME}-cloudinit
|
||||||
BASE_FILE=<%= @base_image_path %>
|
BASE_FILE=<%= @base_image_path %>
|
||||||
|
|
||||||
# Create the VM image if it does not already exist
|
# Create the VM image if it does not already exist
|
||||||
@@ -38,9 +38,8 @@ qemu-img info "$IMAGE_PATH"
|
|||||||
# Check if the cloud-init metadata file exists
|
# Check if the cloud-init metadata file exists
|
||||||
# if not, generate it
|
# if not, generate it
|
||||||
if [ ! -r $CIDATA_PATH ]; then
|
if [ ! -r $CIDATA_PATH ]; then
|
||||||
pushd $(dirname $CIDATA_PATH)
|
mkdir -p $CIDATA_PATH
|
||||||
mkdir -p $VMNAME
|
pushd $CIDATA_PATH
|
||||||
cd $VMNAME
|
|
||||||
|
|
||||||
cat > user-data <<-EOS
|
cat > user-data <<-EOS
|
||||||
#cloud-config
|
#cloud-config
|
||||||
@@ -62,25 +61,19 @@ instance-id: $VMNAME
|
|||||||
local-hostname: $VMNAME
|
local-hostname: $VMNAME
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
genisoimage -output "$CIDATA_PATH" -volid cidata -joliet -rock user-data meta-data
|
|
||||||
chown libvirt-qemu:kvm "$CIDATA_PATH"
|
|
||||||
chmod 600 "$CIDATA_PATH"
|
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# setting --os-variant to ubuntu20.04 and ubuntu18.04 breaks SSH and networking
|
|
||||||
virt-install \
|
virt-install \
|
||||||
--name "$VMNAME" \
|
--name "$VMNAME" \
|
||||||
--ram "$RAM" \
|
--ram "$RAM" \
|
||||||
--vcpus "$CPUS" \
|
--vcpus "$CPUS" \
|
||||||
--cpu host \
|
--cpu host \
|
||||||
--arch x86_64 \
|
--arch x86_64 \
|
||||||
--os-type linux \
|
--osinfo detect=on,name=ubuntujammy \
|
||||||
--os-variant ubuntu16.04 \
|
|
||||||
--hvm \
|
--hvm \
|
||||||
--virt-type kvm \
|
--virt-type kvm \
|
||||||
--disk "$IMAGE_PATH" \
|
--disk "$IMAGE_PATH" \
|
||||||
--cdrom "$CIDATA_PATH" \
|
|
||||||
--boot hd \
|
--boot hd \
|
||||||
--network=bridge=virbr0,model=virtio \
|
--network=bridge=virbr0,model=virtio \
|
||||||
--graphics none \
|
--graphics none \
|
||||||
@@ -88,4 +81,5 @@ virt-install \
|
|||||||
--console pty \
|
--console pty \
|
||||||
--channel unix,mode=bind,path=/var/lib/libvirt/qemu/$VMNAME.guest_agent.0,target_type=virtio,name=org.qemu.guest_agent.0 \
|
--channel unix,mode=bind,path=/var/lib/libvirt/qemu/$VMNAME.guest_agent.0,target_type=virtio,name=org.qemu.guest_agent.0 \
|
||||||
--autostart \
|
--autostart \
|
||||||
--import
|
--import \
|
||||||
|
--cloud-init root-password-generate=off,disable=on,meta-data=$CIDATA_PATH/meta-data,user-data=$CIDATA_PATH/user-data
|
||||||
|
|||||||
Submodule site-cookbooks/openresty updated: b31d6b0b01...22f3aa1918
Reference in New Issue
Block a user