{"id":2691,"date":"2024-04-03T15:46:25","date_gmt":"2024-04-03T06:46:25","guid":{"rendered":"https:\/\/manvscloud.com\/?p=2691"},"modified":"2024-04-09T18:34:56","modified_gmt":"2024-04-09T09:34:56","slug":"ncloud-%ec%97%85%eb%8d%b0%ec%9d%b4%ed%8a%b8%eb%90%9c-%ec%84%9c%eb%b2%84-%ec%9d%b4%eb%af%b8%ec%a7%80-%eb%b0%b1%ec%97%85-%ec%9e%90%eb%8f%99%ed%99%94-%ed%8e%b8-with-kvm-hypervisor","status":"publish","type":"post","link":"https:\/\/manvscloud.com\/?p=2691","title":{"rendered":"[NCLOUD] \uc5c5\ub370\uc774\ud2b8\ub41c \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5 \uc790\ub3d9\ud654 \ud3b8 (with KVM Hypervisor)"},"content":{"rendered":"\n<p>\uc548\ub155\ud558\uc138\uc694. MANVSCLOUD \uae40\uc218\ud604\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc774\uc804\uc5d0<strong> [NCLOUD] CLOUD FUNCTIONS\uc744 \uc774\uc6a9\ud55c \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5 \uc790\ub3d9\ud654 \ubc0f SLACK \uc54c\ub9bc<\/strong>(<a href=\"https:\/\/manvscloud.com\/?p=2138\">https:\/\/manvscloud.com\/?p=2138<\/a>)\uacfc <strong>[NCLOUD] \ubc31\uc5c5\uc6a9 \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubcf4\uad00\uc77c \uc124\uc815 \ubc0f \uc0ad\uc81c \uc790\ub3d9\ud654<\/strong>(<a href=\"https:\/\/manvscloud.com\/?p=2287\">https:\/\/manvscloud.com\/?p=2287<\/a>)\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uc558\uc2b5\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \uc5b4\ub290 \ub0a0\ubd80\ud130 \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5\uc774 \uac11\uc790\uae30 \uc2e4\ud328\ud558\uae30 \uc2dc\uc791\ud588\uace0 \uc6d0\uc778\uc744 \uc870\uc0ac\ud55c \uacb0\uacfc Hypervisor\uac00 KVM\uc778 g3\uc138\ub300 \uc11c\ubc84\uc5d0\uc11c\ub294 \uae30\uc874 API\ub97c \uc0ac\uc6a9\ud55c \uc11c\ubc84 \uc774\ubbf8\uc9c0 \uc0dd\uc131 \ubc0f \uc0ad\uc81c\uac00 \ubd88\uac00\ub2a5\ud558\ub2e4\ub294 \uc0ac\uc2e4\uc744 \ubc1c\uacac\ud588\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"111\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2024\/04\/03151238\/image.png\" alt=\"\" class=\"wp-image-2695\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2024\/04\/03151238\/image.png 665w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2024\/04\/03151238\/image-300x50.png 300w\" sizes=\"(max-width: 665px) 100vw, 665px\" \/><\/figure>\n\n\n\n<p>\uc774\uc5d0 \ub530\ub77c \uc624\ub298\uc740 XEN\uacfc KVM \ubaa8\ub450\uc5d0\uc11c \uc791\ub3d9\ud558\ub294 \uc5c5\uadf8\ub808\uc774\ub4dc\ub41c \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5 \uc790\ub3d9\ud654 \ubc29\ubc95\uc744 \uacf5\uc720\ud558\ub824 \ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-white-color has-vivid-green-cyan-background-color has-text-color has-background\"> Trigger<\/h3>\n\n\n\n<p>\uc774\uc804 \ud3ec\uc2a4\ud305\uacfc \uac19\uc774 Cloud Functions\uc744 \uc0ac\uc6a9\ud558\ub294 \ubc29\uc2dd\uc740 \ub3d9\uc77c\ud569\ub2c8\ub2e4. <br>Action\uc744 \uc791\uc131\ud558\uae30 \uc55e\uc11c Trigger\ub97c \uba3c\uc800 \uc0dd\uc131\ud574\uc90d\uc2dc\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"204\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2024\/04\/03151319\/image-1.png\" alt=\"\" class=\"wp-image-2696\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2024\/04\/03151319\/image-1.png 635w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2024\/04\/03151319\/image-1-300x96.png 300w\" sizes=\"(max-width: 635px) 100vw, 635px\" \/><\/figure>\n\n\n\n<ul>\n<li><strong>\ud0c0\uc785 : <\/strong>Cron<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">0 1 * * *<\/pre>\n\n\n\n<p>Cron \uc2e4\ud589 \uc635\uc158\uc744 <code><strong>0 1 * * *<\/strong><\/code>\ub85c \uc124\uc815\ud558\uba74 \ub9e4\uc77c \uc0c8\ubcbd 1\uc2dc\uc5d0 \uc2a4\ud06c\ub9bd\ud2b8\uac00 \uc2e4\ud589\ub429\ub2c8\ub2e4. <br>\ubb3c\ub860 \ud544\uc694\uc5d0 \ub530\ub77c \uc774 \uc124\uc815\uc744 \uc870\uc815\ud558\uc5ec \uc6d0\ud558\ub294 \uc2dc\uac04\uc5d0 \uc2a4\ud06c\ub9bd\ud2b8\uac00 \uc2e4\ud589\ub418\ub3c4\ub85d \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading has-white-color has-vivid-green-cyan-background-color has-text-color has-background\"> Action<\/h3>\n\n\n\n<p>g3 \ud0c0\uc785 \uc11c\ubc84\uc5d0\uc11c \uae30\uc874 \uc774\ubbf8\uc9c0 \uc0dd\uc131\/\uc0ad\uc81c API\uac00 \uc791\ub3d9\ud558\uc9c0 \uc54a\uc9c0\ub9cc \uc0c8\ub85c\uc6b4 API\ub294 g2\uc640 g3 \ud0c0\uc785 \ubaa8\ub450\uc5d0\uc11c \ubb38\uc81c\uc5c6\uc774 \ub3d9\uc791\ud569\ub2c8\ub2e4. <\/p>\n\n\n\n<p>\ub530\ub77c\uc11c \uc0c8 API\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc18c\uc2a4 \ucf54\ub4dc\ub97c \uc5c5\ub370\uc774\ud2b8\ud560 \uc608\uc815\uc785\ub2c8\ub2e4. <br>\uc0ac\uc6a9\ud560 \ub7f0\ud0c0\uc784\uc740 Python 3.11\uc774\uba70 \uc0dd\uc131 \uc2dc \uc774\uc804\uc5d0 \uc0dd\uc131\ud55c \ud2b8\ub9ac\uac70\uc640 \uc5f0\uacb0\ub418\uc5b4\uc57c \ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import requests\nimport time\nimport hashlib\nimport hmac\nimport base64\nimport json\nfrom datetime import datetime, timedelta\n\ndef get_timestamp():\n    return str(int(time.time() * 1000))\n\ndef generate_signing_key(secret_key, message):\n    return base64.b64encode(hmac.new(secret_key, message, digestmod=hashlib.sha256).digest())\n\ndef api_request(api_server, uri, access_key, secret_key, method=\"GET\"):\n    timestamp = get_timestamp()\n    message = bytes(f\"{method} {uri}\\n{timestamp}\\n{access_key}\", 'UTF-8')\n    secret_key = bytes(secret_key, 'UTF-8')\n    signingKey = generate_signing_key(secret_key, message)\n    http_header = {\n        'x-ncp-apigw-signature-v2': signingKey,\n        'x-ncp-apigw-timestamp': timestamp,\n        'x-ncp-iam-access-key': access_key\n    }\n    if method.upper() == \"GET\":\n        response = requests.get(api_server + uri, headers=http_header)\n    else:\n        response = requests.post(api_server + uri, headers=http_header)\n    return response.json()\n\ndef send_slack_message(webhook_url, message):\n    payload = {'text': message}\n    response = requests.post(webhook_url, json=payload)\n    if response.status_code != 200:\n        print(f\"Error sending message to Slack: {response.text}\")\n\ndef create_server_image(serverInstanceNo, access_key, secret_key, api_server, webhook_url):\n    today = time.strftime(\"%Y%m%d\")\n    serverImageName = f\"backup-{serverInstanceNo}-{today}\"\n    uri = f\"\/vserver\/v2\/createServerImage?regionCode=KR&amp;serverInstanceNo={serverInstanceNo}&amp;serverImageName={serverImageName}&amp;responseFormatType=json\"\n    response = api_request(api_server, uri, access_key, secret_key)\n    if 'responseError' in response:\n        message = f\"Backup creation failed for Server Instance No: {serverInstanceNo}. Error: {response['responseError']}\"\n        send_slack_message(webhook_url, message)\n    else:\n        print(f\"Backup creation for Server Instance No: {serverInstanceNo} succeeded.\")\n\ndef delete_server_image(serverImageNo, serverImageName, access_key, secret_key, api_server, webhook_url):\n    uri = f\"\/vserver\/v2\/deleteServerImage?regionCode=KR&amp;serverImageNoList.1={serverImageNo}&amp;responseFormatType=json\"\n    response = api_request(api_server, uri, access_key, secret_key)\n    if 'responseError' in response:\n        message = f\"Failed to delete Server Image: {serverImageName}. Error: {response['responseError']}\"\n        send_slack_message(webhook_url, message)\n    else:\n        print(f\"Deleted Server Image: {serverImageName} successfully.\")\n\ndef main(args):\n    access_key = args[\"NCLOUD_ACCESS_KEY\"]\n    secret_key = args[\"NCLOUD_SECRET_KEY\"]\n    webhook_url = args[\"webhook_url\"]\n    exclude_patterns = args[\"exclude_patterns\"]\n    api_server = \"https:\/\/ncloud.apigw.ntruss.com\"\n    \n    serverInstanceNos_response = api_request(\n        api_server,\n        \"\/vserver\/v2\/getServerInstanceList?regionCode=KR&amp;responseFormatType=json\",\n        access_key,\n        secret_key\n    )\n    for serverInstance in serverInstanceNos_response.get('getServerInstanceListResponse', {}).get('serverInstanceList', []):\n        if serverInstance['serverInstanceNo'] not in exclude_patterns:\n            create_server_image(serverInstance['serverInstanceNo'], access_key, secret_key, api_server, webhook_url)\n            time.sleep(1)\n\n    images_response = api_request(\n        api_server,\n        \"\/vserver\/v2\/getServerImageList?regionCode=KR&amp;responseFormatType=json\",\n        access_key,\n        secret_key\n    )\n    current_date = datetime.now()\n    # \uc774\ubbf8\uc9c0 \uc0ad\uc81c \uc8fc\uae30 \uc124\uc815\n    # days=7\uc778 Actions \ub3d9\uc791\uc77c\ub85c\ubd80\ud130 7\uc77c\uc774 \uc9c0\ub09c \uc774\ubbf8\uc9c0 \uc0ad\uc81c\n    one_day_ago = current_date - timedelta(days=7)\n\n    for image in images_response.get('getServerImageListResponse', {}).get('serverImageList', []):\n        image_name = image['serverImageName']\n        if 'backup' in image_name:\n            image_date_str = image_name.split('-')[-1]\n            image_date = datetime.strptime(image_date_str, '%Y%m%d')\n            if image_date &lt; one_day_ago and not any(exclude_pattern in image_name for exclude_pattern in exclude_patterns):\n                delete_server_image(image['serverImageNo'], image_name, access_key, secret_key, api_server, webhook_url)\n                time.sleep(1)\n\n    return {\n        \"message\": \"Function executed successfully\"\n    }\n<\/pre>\n\n\n\n<p>\uc774\ubbf8\uc9c0 \uc0ad\uc81c \uc8fc\uae30\ub294 \uae30\ubcf8\uc801\uc73c\ub85c Trigger\uac00 \uc2e4\ud589\ub41c \ud6c4 7\uc77c\uc774 \uc9c0\ub09c \uc774\ubbf8\uc9c0\ub97c \uc0ad\uc81c\ud558\ub3c4\ub85d \uc124\uc815\ub429\ub2c8\ub2e4. \uc989 \ubc31\uc5c5 \uc774\ubbf8\uc9c0\uc758 \ubcf4\uad00 \uae30\uac04\uc774 7\uc77c\uc778\ub370\uc694. \uc774\ubbf8\uc9c0 \ubcf4\uad00\uc77c \ubcc0\uacbd\uc774 \ud544\uc694\ud55c \uacbd\uc6b0 days=7\uc774\ub77c\uace0 \ub418\uc5b4\uc788\ub294 \ubd80\ubd84\uc758 7\uc744 \uc6d0\ud558\ub294 \ubcf4\uad00 \uae30\uac04\uc73c\ub85c \ubcc0\uacbd\ud574\uc904 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\ub2e8 \ubaa8\ub4e0 \uc774\ubbf8\uc9c0\uac00 7\uc77c \ud6c4\uc5d0 \uc790\ub3d9\uc73c\ub85c \uc0ad\uc81c\ub418\ub294 \uac83\uc740 \uc544\ub2d9\ub2c8\ub2e4. \uc815\ud574\uc9c4 Naming \uaddc\uce59(<code>backup-InstanceNo-Date<\/code>, \uc608: <code>backup-11111111-20240403<\/code>)\uc744 \ub530\ub974\ub294 \uc774\ubbf8\uc9c0\ub9cc\uc774 \uc0ad\uc81c \ub300\uc0c1\uc774 \ub429\ub2c8\ub2e4. \uc774 Naming \uaddc\uce59\uacfc \ub2e4\ub978 \uc774\ubbf8\uc9c0\uc758 \uacbd\uc6b0 \uc124\uc815\ub41c \uae30\uac04\uc774 \uc9c0\ub098\ub3c4 \uc0ad\uc81c\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uae30\ubcf8 \ud30c\ub77c\ubbf8\ud130 \uc124\uc815\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\"NCLOUD_ACCESS_KEY\":\"YOUR_ACCESS_KEY\",\"NCLOUD_SECRET_KEY\":\"YOUR_SECRET_KEY\",\"exclude_patterns\":[\"11111111\",\"22222222\"],\"webhook_url\":\"https:\/\/hooks.slack.com\/services\/WEBHOOK\/URLURLURLURLURLURLURLURLURLURL\"}<\/pre>\n\n\n\n<ul>\n<li><strong>NCLOUD_ACCESS_KEY : <\/strong>Server Image \uc0dd\uc131 \ubc0f \uc0ad\uc81c \uad8c\ud55c\uc744 \uac00\uc9c4 \uc561\uc138\uc2a4 \ud0a4<\/li>\n\n\n\n<li><strong>NCLOUD_SECRET_KEY : <\/strong>Server Image \uc0dd\uc131 \ubc0f \uc0ad\uc81c \uad8c\ud55c\uc744 \uac00\uc9c4 \uc561\uc138\uc2a4 \ud0a4\uc758 \uc2dc\ud06c\ub9bf \ud0a4<\/li>\n\n\n\n<li><strong>exclude_patterns : <\/strong>\uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5 \uc790\ub3d9\ud654 \uc608\uc678 \ub300\uc0c1 \uc11c\ubc84 \uc9c0\uc815 <br>                                    ex) [&#8220;111111111&#8221;] \ub610\ub294 [&#8220;111111111&#8221;, &#8220;2222222&#8221;]<\/li>\n\n\n\n<li><strong>webhook_url :<\/strong> \uc54c\ub9bc\uc744 \ubc1b\uc744 Slack\uc758 Webhook URL<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"915\" height=\"220\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2024\/04\/03153028\/image-2.png\" alt=\"\" class=\"wp-image-2697\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2024\/04\/03153028\/image-2.png 915w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2024\/04\/03153028\/image-2-300x72.png 300w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2024\/04\/03153028\/image-2-768x185.png 768w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/figure>\n\n\n\n<p>\uc554\ud638\ud654\uac00 \ud544\uc694\ud55c \ubd80\ubd84\uc740 KMS(Key Management Service)\uc5d0\uc11c \ud0a4\ub97c \uc0dd\uc131 \ud6c4 \ud574\ub2f9 \ud0a4\ub97c \uc774\uc6a9\ud558\uc5ec \ud30c\ub77c\ubbf8\ud130\ub97c \uc554\ud638\ud654\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc774 \ubaa8\ub4e0 \uc124\uc815\uc744 \uc644\ub8cc\ud558\uace0 Action\uc744 \uc0dd\uc131\ud558\uba74, \ud2b8\ub9ac\uac70\uac00 \uc2e4\ud589\ub420 \ub54c\ub9c8\ub2e4 \uc774\ubbf8\uc9c0 \ubc31\uc5c5\uc774 \uc790\ub3d9\uc73c\ub85c \uc774\ub8e8\uc5b4\uc9c0\uace0 \uc624\ub798\ub41c \ubc31\uc5c5 \uc774\ubbf8\uc9c0\ub294 \uc790\ub3d9\uc73c\ub85c \uc0ad\uc81c\ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading has-white-color has-cyan-bluish-gray-background-color has-text-color has-background\"> Personal Comments<\/h3>\n\n\n\n<p>\uc624\ub298\uc740 g3\uc138\ub300 \uc11c\ubc84\ub97c \ud3ec\ud568\ud55c \ubaa8\ub4e0 \uc11c\ubc84 \uc720\ud615\uc5d0 \ub300\ud574 \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5\uc744 \uc790\ub3d9\ud654\ud558\ub294 \uac1c\uc120\ub41c \ubc29\ubc95\uc744 \uacf5\uc720\ud574\ubcf4\uc558\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\ub3d9\uc77c\ud55c \ubb38\uc81c\ub85c \ubc31\uc5c5\uc774 \uc790\ub3d9\ud654\ub418\uc9c0 \uc54a\uace0 \uc788\ub2e4\uba74 \uc774 \ud3ec\uc2a4\ud305\uc774 \uc88b\uc740 \ucc38\uace0 \uc790\ub8cc\uac00 \ub418\uae38 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uae34 \uae00 \uc77d\uc5b4\uc8fc\uc154\uc11c \uac10\uc0ac\ud569\ub2c8\ub2e4. <\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"773\" height=\"133\" src=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/12213914\/Ncloud_Master_logo-1.png\" alt=\"\" class=\"wp-image-1234\" srcset=\"https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/12213914\/Ncloud_Master_logo-1.png 773w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/12213914\/Ncloud_Master_logo-1-300x52.png 300w, https:\/\/cdn.manvscloud.com\/wp-content\/uploads\/2021\/08\/12213914\/Ncloud_Master_logo-1-768x132.png 768w\" sizes=\"(max-width: 773px) 100vw, 773px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\uc548\ub155\ud558\uc138\uc694. MANVSCLOUD \uae40\uc218\ud604\uc785\ub2c8\ub2e4. \uc774\uc804\uc5d0 [NCLOUD] CLOUD FUNCTIONS\uc744 \uc774\uc6a9\ud55c \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5 \uc790\ub3d9\ud654 \ubc0f SLACK \uc54c\ub9bc(https:\/\/manvscloud.com\/?p=2138)\uacfc [NCLOUD] \ubc31\uc5c5\uc6a9 \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubcf4\uad00\uc77c \uc124\uc815 \ubc0f \uc0ad\uc81c \uc790\ub3d9\ud654(https:\/\/manvscloud.com\/?p=2287)\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uc558\uc2b5\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \uc5b4\ub290 \ub0a0\ubd80\ud130 \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5\uc774 \uac11\uc790\uae30 \uc2e4\ud328\ud558\uae30 \uc2dc\uc791\ud588\uace0 \uc6d0\uc778\uc744 \uc870\uc0ac\ud55c \uacb0\uacfc Hypervisor\uac00 KVM\uc778 g3\uc138\ub300 \uc11c\ubc84\uc5d0\uc11c\ub294 \uae30\uc874 API\ub97c \uc0ac\uc6a9\ud55c \uc11c\ubc84 \uc774\ubbf8\uc9c0 \uc0dd\uc131 \ubc0f \uc0ad\uc81c\uac00 \ubd88\uac00\ub2a5\ud558\ub2e4\ub294 \uc0ac\uc2e4\uc744 \ubc1c\uacac\ud588\uc2b5\ub2c8\ub2e4. \uc774\uc5d0 \ub530\ub77c \uc624\ub298\uc740 XEN\uacfc KVM \ubaa8\ub450\uc5d0\uc11c \uc791\ub3d9\ud558\ub294 \uc5c5\uadf8\ub808\uc774\ub4dc\ub41c \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5 \uc790\ub3d9\ud654 \ubc29\ubc95\uc744 \uacf5\uc720\ud558\ub824 \ud569\ub2c8\ub2e4. Trigger \uc774\uc804 \ud3ec\uc2a4\ud305\uacfc \uac19\uc774 Cloud Functions\uc744 \uc0ac\uc6a9\ud558\ub294 \ubc29\uc2dd\uc740 \ub3d9\uc77c\ud569\ub2c8\ub2e4. Action\uc744 \uc791\uc131\ud558\uae30 \uc55e\uc11c Trigger\ub97c \uba3c\uc800 \uc0dd\uc131\ud574\uc90d\uc2dc\ub2e4. Cron \uc2e4\ud589 \uc635\uc158\uc744 0 1 * * *\ub85c \uc124\uc815\ud558\uba74 \ub9e4\uc77c \uc0c8\ubcbd 1\uc2dc\uc5d0 \uc2a4\ud06c\ub9bd\ud2b8\uac00 \uc2e4\ud589\ub429\ub2c8\ub2e4. \ubb3c\ub860 \ud544\uc694\uc5d0 \ub530\ub77c \uc774 \uc124\uc815\uc744 \uc870\uc815\ud558\uc5ec \uc6d0\ud558\ub294 \uc2dc\uac04\uc5d0 \uc2a4\ud06c\ub9bd\ud2b8\uac00 \uc2e4\ud589\ub418\ub3c4\ub85d \ubcc0\uacbd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. Action g3 \ud0c0\uc785 \uc11c\ubc84\uc5d0\uc11c \uae30\uc874 \uc774\ubbf8\uc9c0 \uc0dd\uc131\/\uc0ad\uc81c API\uac00 \uc791\ub3d9\ud558\uc9c0 \uc54a\uc9c0\ub9cc \uc0c8\ub85c\uc6b4 API\ub294 g2\uc640 g3 \ud0c0\uc785 \ubaa8\ub450\uc5d0\uc11c \ubb38\uc81c\uc5c6\uc774 \ub3d9\uc791\ud569\ub2c8\ub2e4. \ub530\ub77c\uc11c \uc0c8 API\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc18c\uc2a4 \ucf54\ub4dc\ub97c \uc5c5\ub370\uc774\ud2b8\ud560 \uc608\uc815\uc785\ub2c8\ub2e4. \uc0ac\uc6a9\ud560 \ub7f0\ud0c0\uc784\uc740 Python 3.11\uc774\uba70 \uc0dd\uc131 \uc2dc \uc774\uc804\uc5d0 \uc0dd\uc131\ud55c \ud2b8\ub9ac\uac70\uc640 \uc5f0\uacb0\ub418\uc5b4\uc57c \ud569\ub2c8\ub2e4. \uc774\ubbf8\uc9c0 \uc0ad\uc81c \uc8fc\uae30\ub294 \uae30\ubcf8\uc801\uc73c\ub85c Trigger\uac00 \uc2e4\ud589\ub41c \ud6c4 7\uc77c\uc774 \uc9c0\ub09c \uc774\ubbf8\uc9c0\ub97c \uc0ad\uc81c\ud558\ub3c4\ub85d \uc124\uc815\ub429\ub2c8\ub2e4. \uc989 \ubc31\uc5c5 \uc774\ubbf8\uc9c0\uc758 \ubcf4\uad00 \uae30\uac04\uc774 7\uc77c\uc778\ub370\uc694. \uc774\ubbf8\uc9c0 \ubcf4\uad00\uc77c \ubcc0\uacbd\uc774 \ud544\uc694\ud55c \uacbd\uc6b0 days=7\uc774\ub77c\uace0 \ub418\uc5b4\uc788\ub294 \ubd80\ubd84\uc758 7\uc744 \uc6d0\ud558\ub294 \ubcf4\uad00 \uae30\uac04\uc73c\ub85c \ubcc0\uacbd\ud574\uc904 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e8 \ubaa8\ub4e0 \uc774\ubbf8\uc9c0\uac00 7\uc77c \ud6c4\uc5d0 \uc790\ub3d9\uc73c\ub85c \uc0ad\uc81c\ub418\ub294 \uac83\uc740 \uc544\ub2d9\ub2c8\ub2e4. \uc815\ud574\uc9c4 Naming \uaddc\uce59(backup-InstanceNo-Date, \uc608: backup-11111111-20240403)\uc744 \ub530\ub974\ub294 \uc774\ubbf8\uc9c0\ub9cc\uc774 \uc0ad\uc81c \ub300\uc0c1\uc774 \ub429\ub2c8\ub2e4. \uc774 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"Hypervisor\uac00 KVM\uc778 g3\uc138\ub300 \uc11c\ubc84\uc5d0\uc11c\ub294 \uae30\uc874 API\ub97c \uc0ac\uc6a9\ud55c \uc11c\ubc84 \uc774\ubbf8\uc9c0 \uc0dd\uc131 \ubc0f \uc0ad\uc81c\uac00 \ubd88\uac00\ub2a5\ud558\ub2e4\ub294 \uc0ac\uc2e4\uc744 \ubc1c\uacac\ud588\uc2b5\ub2c8\ub2e4. \ub530\ub77c\uc11c XEN\uacfc KVM \ubaa8\ub450\uc5d0\uc11c \uc791\ub3d9\ud558\ub294 \uc5c5\uadf8\ub808\uc774\ub4dc\ub41c \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5 \uc790\ub3d9\ud654 \ubc29\ubc95\uc744 \uacf5\uc720\ud558\ub824 \ud569\ub2c8\ub2e4.","jetpack_seo_html_title":"[NCLOUD] \uc5c5\ub370\uc774\ud2b8\ub41c \uc11c\ubc84 \uc774\ubbf8\uc9c0 \ubc31\uc5c5 \uc790\ub3d9\ud654 \ud3b8 (with KVM Hypervisor)","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[505,457,32,87,91,17,90,16,944,805,89,202,398,509,586,858,860,857,584],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts\/2691"}],"collection":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2691"}],"version-history":[{"count":5,"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts\/2691\/revisions"}],"predecessor-version":[{"id":2700,"href":"https:\/\/manvscloud.com\/index.php?rest_route=\/wp\/v2\/posts\/2691\/revisions\/2700"}],"wp:attachment":[{"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/manvscloud.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}