{"id":326634,"date":"2021-07-19T03:00:14","date_gmt":"2021-07-19T03:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=326634"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=326634","title":{"rendered":"Oracle Cloud: \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 VPS 4 \u044f\u0434\u0440\u0430 ARM\/24\u0413\u0411 \u043f\u0430\u043c\u044f\u0442\u0438: \u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0441\u043f\u0440\u043e\u0441\u0430 (OCI CLI)"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041e\u0447\u0435\u043d\u044c \u0437\u0430\u043c\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043d\u0435\u0434\u0430\u0432\u043d\u043e <a href=\"https:\/\/blogs.oracle.com\/cloud-infrastructure\/post\/moving-to-ampere-a1-compute-instances-on-oracle-cloud-infrastructure-oci\" rel=\"noopener noreferrer nofollow\">\u0430\u043d\u043e\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/a> \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 &#171;\u0412\u0441\u0435\u0433\u0434\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e&#187;.  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, &#171;\u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442&#187;, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e &#8212; \u0441\u043b\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440, \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0432\u044b\u043b\u0430\u0437\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u201cOut of Capacity\u201d. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0440\u0435\u0448\u0430\u0435\u043c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0442\u0430\u043a \u043a\u0430\u043a Oracle \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u0435\u0442 \u0451\u043c\u043a\u043e\u0441\u0442\u044c.<\/p>\n<blockquote>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0430\u0440\u0435\u043d\u0434\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u043f\u0435\u0440\u0432\u044b\u0435 3000 \u0447\u0430\u0441\u043e\u0432 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0426\u041f \u0438 18&nbsp;000 \u0413\u0411-\u0447\u0430\u0441\u043e\u0432 \u0432 \u043c\u0435\u0441\u044f\u0446 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 Ampere A1 Compute \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 VM.Standard.A1.Flex (\u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e 4 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u043c \u0426\u041f \u0438 24 \u0413\u0411 \u043f\u0430\u043c\u044f\u0442\u0438).<\/p>\n<\/blockquote>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 <a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/API\/Concepts\/cliconcepts.htm\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b<\/a><\/p>\n<p><a href=\"https:\/\/medium.com\/r\/?url=https%3A%2F%2Fdocs.oracle.com%2Fen-us%2Fiaas%2FContent%2FAPI%2FSDKDocs%2Fcliinstall.htm\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/API\/SDKDocs\/cliinstall.htm<\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PHP \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u0443\u0436\u0435 \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u0430 \u043a \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u043e\u0441\u043e\u0431\u043e \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445: <a href=\"https:\/\/github.com\/hitrov\/oci-arm-host-capacity\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/hitrov\/oci-arm-host-capacity<\/a> <\/p>\n<h2>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043b\u043e\u0433\u0438\u043d\u0430 \u0432 <a href=\"http:\/\/cloud.oracle.com\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0431-\u043a\u043e\u043d\u0441\u043e\u043b\u044c<\/a> \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u0438\u043a\u043e\u043d\u043a\u0443 \u0441 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u043c \u0438 \u0437\u0430\u0442\u0435\u043c User Settings<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6b6\/ec3\/b7a\/6b6ec3b7ad216782bdfb25cf18d00cf8.png\" width=\"487\" height=\"292\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0451\u043c \u043f\u043e \u043f\u0443\u0442\u0438 Resources -&gt; API keys, \u0436\u043c\u0451\u043c \u043a\u043d\u043e\u043f\u043a\u0443 \u201cAdd API Key\u201d<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8da\/e3b\/0ac\/8dae3b0ac6600178e892814304a28f45.png\" width=\"627\" height=\"514\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u0444\u0430\u0439\u043b\u0435 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c config. \u042f \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u0435\u0433\u043e \u0432 \u043d\u043e\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \/home\/ubuntu\/.oci \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c *.pem<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/605\/2f6\/f78\/6052f6f78ed6820b241fa27cecb1f523.png\" width=\"621\" height=\"557\"><figcaption><\/figcaption><\/figure>\n<h2>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c CLI<\/h2>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/p>\n<pre><code class=\"bash\">OCI_CLI_RC_FILE=\/home\/ubuntu\/.oci\/config<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a OCI CLI \u0441\u0435\u0431\u0435 \u0432 PATH, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435<\/p>\n<pre><code class=\"bash\">alias oci='\/home\/ubuntu\/bin\/oci'<\/code><\/pre>\n<p>(\u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043f\u0443\u0442\u044c \u043d\u0430 \u0442\u043e\u0442, \u043a\u0443\u0434\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0431\u044b\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435).<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443<\/p>\n<pre><code class=\"bash\">oci setup repair-file-permissions --file \/home\/ubuntu\/.oci\/oracleidentitycloudservice***.pem<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 user \u0431\u0435\u0440\u0451\u043c \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438)<\/p>\n<pre><code class=\"bash\">oci iam user get --user-id ocid1.user.oc1..aaaaaaaax72***d3q<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f4d\/2ad\/fc8\/f4d2adfc8d0b8855cea0f5388be1a415.png\" width=\"829\" height=\"938\"><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430<\/h2>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 (Availability Domain) \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u0435\u043d. \u0416\u043c\u0451\u043c \u043c\u0435\u043d\u044e Oracle Cloud -&gt; Compute -&gt; Instances<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e3\/c4b\/440\/8e3c4b440669d9becebe517c6f30bae5.png\" width=\"574\" height=\"219\"><figcaption><\/figcaption><\/figure>\n<p>\u0416\u043c\u0451\u043c \u201cCreate Instance\u201d \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0433\u0434\u0435 Availability Domain \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a \u201c<strong>Always Free Eligible<\/strong>\u201d. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e AD-2.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dc8\/e99\/0cd\/dc8e990cdca6ded469e146eeec68c1d9.png\" width=\"783\" height=\"171\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 compartment-id. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 tenancy \u0438\u0437 config \u0444\u0430\u0439\u043b\u0430)<\/p>\n<pre><code class=\"bash\">export C=ocid1.tenancy.oc1..aaaaaaaakpx***mpa<\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u043e\u0431\u0435\u0440\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430:<\/p>\n<ul>\n<li>\n<p>availability-domain<\/p>\n<\/li>\n<li>\n<p>shape<\/p>\n<\/li>\n<li>\n<p>subnet-id<\/p>\n<\/li>\n<li>\n<p>image-id<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">oci iam availability-domain list - all - compartment-id=$C<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430<\/p>\n<pre><code class=\"json\">{   \"data\": [     ...     {       \"compartment-id\": \"ocid1.tenancy.oc1..aaaaaaaakpx***mpa\",       \"id\": \"ocid1.availabilitydomain.oc1..aaaaaaaalcd***m2q\",       \"name\": \"FeVO:EU-FRANKFURT-1-AD-2\"     },     ...   ] }<\/code><\/pre>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e AD-2). \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/p>\n<pre><code class=\"bash\">export A=FeVO:EU-FRANKFURT-1-AD-2<\/code><\/pre>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0442\u0438\u043f (shape)<\/p>\n<pre><code class=\"bash\">oci compute shape list --compartment-id=$C<\/code><\/pre>\n<p>\u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u200a<strong>VM.Standard.A1.Flex<\/strong>:<\/p>\n<pre><code class=\"json\">{   \"data\": [     ...     {       \"baseline-ocpu-utilizations\": null,       \"gpu-description\": null,       \"gpus\": 0,       \"is-live-migration-supported\": false,       \"local-disk-description\": null,       \"local-disks\": 0,       \"local-disks-total-size-in-gbs\": null,       \"max-vnic-attachment-options\": {         \"default-per-ocpu\": 1.0,         \"max\": 24.0,         \"min\": 2       },       \"max-vnic-attachments\": 2,       \"memory-in-gbs\": 6.0,       \"memory-options\": {         \"default-per-ocpu-in-g-bs\": 6.0,         \"max-in-g-bs\": 512.0,         \"max-per-ocpu-in-gbs\": 64.0,         \"min-in-g-bs\": 1.0,         \"min-per-ocpu-in-gbs\": 1.0       },       \"min-total-baseline-ocpus-required\": null,       \"networking-bandwidth-in-gbps\": 1.0,       \"networking-bandwidth-options\": {         \"default-per-ocpu-in-gbps\": 1.0,         \"max-in-gbps\": 40.0,         \"min-in-gbps\": 1.0       },       \"ocpu-options\": {         \"max\": 80.0,         \"min\": 1.0       },       \"ocpus\": 1.0,       \"processor-description\": \"3.0 GHz Ampere\\u00ae Altra\\u2122\",       \"shape\": \"VM.Standard.A1.Flex\"     },     ...   ] }<\/code><\/pre>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u0440\u0430\u043d\u0435\u0435 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 <strong>VM.Standard.E2.1.Micro<\/strong>&nbsp;(\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c AMD) \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 &#8212; \u0434\u0432\u0430 \u0442\u0430\u043a\u0438\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u044d\u0442\u043e \u043f\u0440\u0435\u0436\u0434\u0435 &#8212; \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 VNC, subnet, route table, security list \u0438 \u0442.\u0434.<\/p>\n<pre><code class=\"bash\">oci network subnet list --compartment-id=$C<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 id<\/p>\n<pre><code class=\"json\">{   \"data\": [     {       \"availability-domain\": null,       \"cidr-block\": \"10.0.0.0\/24\",       \"compartment-id\": \"ocid1.tenancy.oc1..aaaaaaaakpx***mpa\",       \"defined-tags\": {         \"Oracle-Tags\": {           \"CreatedBy\": \"***\",           \"CreatedOn\": \"2021-01-26T13:51:31.332Z\"         }       },       \"dhcp-options-id\": \"ocid1.dhcpoptions.oc1.eu-frankfurt-1.aaaaaaaafh4***cvq\",       \"display-name\": \"subnet-20210126-1549\",       \"dns-label\": \"subnet01261551\",       \"freeform-tags\": {},       \"id\": \"ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaaahbb***faq\",       \"ipv6-cidr-block\": null,       \"ipv6-virtual-router-ip\": null,       \"lifecycle-state\": \"AVAILABLE\",       \"prohibit-internet-ingress\": false,       \"prohibit-public-ip-on-vnic\": false,       \"route-table-id\": \"ocid1.routetable.oc1.eu-frankfurt-1.aaaaaaaaqwe***p76q\",       \"security-list-ids\": [         \"ocid1.securitylist.oc1.eu-frankfurt-1.aaaaaaaaagnn***tca\"       ],       \"subnet-domain-name\": \"subnet***.vcn***.oraclevcn.com\",       \"time-created\": \"2021-01-26T13:51:31.534000+00:00\",       \"vcn-id\": \"ocid1.vcn.oc1.eu-frankfurt-1.amaaaaaalox***y4a\",       \"virtual-router-ip\": \"10.0.0.1\",       \"virtual-router-mac\": \"00:00:17:***\"     }   ] }<\/code><\/pre>\n<p>&#8230;\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e<\/p>\n<pre><code class=\"bash\">export S=ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaaahbb***faq<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u0440\u0430\u0437\u043e\u0432<\/p>\n<pre><code class=\"bash\">oci compute image list  --compartment-id=$C --shape=VM.Standard.A1.Flex<\/code><\/pre>\n<p>\u042f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0438\u043c\u0435\u0442\u044c \u0432\u0435\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043e\u0444\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0440\u0430\u0437\u0443 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 &#8212; \u043c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 &#8212; \u044d\u0442\u043e \u201c<strong>Oracle Linux Cloud Developer<\/strong>\u201d<\/p>\n<pre><code class=\"json\">{   \"data\": [     ...     {       \"agent-features\": null,       \"base-image-id\": null,       \"billable-size-in-gbs\": 14,       \"compartment-id\": null,       \"create-image-allowed\": true,       \"defined-tags\": {},       \"display-name\": \"Oracle-Linux-Cloud-Developer-8.4-aarch64-2021.06.18-0\",       \"freeform-tags\": {},       \"id\": \"ocid1.image.oc1.eu-frankfurt-1.aaaaaaaa23zlxgcvdgb2zn4ffik6rda4g5daa5wa42svsgp4enljv4ywv6wa\",       \"launch-mode\": \"NATIVE\",       \"launch-options\": {         \"boot-volume-type\": \"PARAVIRTUALIZED\",         \"firmware\": \"UEFI_64\",         \"is-consistent-volume-naming-enabled\": true,         \"is-pv-encryption-in-transit-enabled\": true,         \"network-type\": \"PARAVIRTUALIZED\",         \"remote-data-volume-type\": \"PARAVIRTUALIZED\"       },       \"lifecycle-state\": \"AVAILABLE\",       \"listing-type\": null,       \"operating-system\": \"Oracle Linux Cloud Developer\",       \"operating-system-version\": \"8\",       \"size-in-mbs\": 51200,       \"time-created\": \"2021-06-24T20:36:22.659000+00:00\"     },     ...   ] }<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c image id<\/p>\n<pre><code class=\"bash\">export I=ocid1.image.oc1.eu-frankfurt-1.aaaaaaaa23zlxgcvdgb2zn4ffik6rda4g5daa5wa42svsgp4enljv4ywv6wa<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 JSON \u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<ul>\n<li>\n<p>instanceOptions.json<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"json\">{     \"areLegacyImdsEndpointsDisabled\": false }<\/code><\/pre>\n<ul>\n<li>\n<p>shapeConfig.json (\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0438\u043b\u0438 \u041e\u0417\u0423). \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 1\/6, 2\/12, 3\/18 and 2\/24 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0437 \u201cOracle Linux Cloud Developer\u201d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c 8\u0413\u0411 \u041e\u0417\u0423 (\u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8212; \u044d\u0442\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 1\/8)<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"json\">{     \"ocpus\": 4,     \"memoryInGBs\": 24 }<\/code><\/pre>\n<ul>\n<li>\n<p>availabilityConfig.json<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"json\">{     \"recoveryAction\": \"RESTORE_INSTANCE\" }<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443, \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439 ~\/.ssh\/id_rsa \u0438 ~\/.ssh\/id_rsa.pub. \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 (\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e) \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0438\u0436\u0435. \u0412 \u0441\u0435\u0442\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e, \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u043f\u0443\u0441\u0442\u0438\u043c \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c.<\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446,<\/p>\n<pre><code class=\"bash\">oci compute instance launch \\  --availability-domain $A \\  --compartment-id $C \\  --shape VM.Standard.A1.Flex \\  --subnet-id $S \\  --assign-private-dns-record true \\  --assign-public-ip false \\  --availability-config file:\/\/\/home\/ubuntu\/availabilityConfig.json \\  --display-name my-new-instance \\  --image-id $I \\  --instance-options file:\/\/\/home\/ubuntu\/instanceOptions.json \\  --shape-config file:\/\/\/home\/ubuntu\/shapeConfig.json \\  --ssh-authorized-keys-file \/home\/ubuntu\/.ssh\/id_rsa.pub<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c crontab \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 .sh \u0444\u0430\u0439\u043b (&#171;\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435&#187; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430) \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c cron \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443. \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u043f\u0443\u0441\u0442\u0438\u043c \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c.<\/p>\n<p>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441 \u0442\u0438\u043f\u043e\u043c VM.Standard.E2.1.Micro, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b ARM)<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c1f\/213\/b7d\/c1f213b7ddd9ebedca92761a664b2db3.png\" width=\"830\" height=\"939\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/051\/567\/327\/051567327d54496503273b7fd681291d.png\" width=\"830\" height=\"939\"><figcaption><\/figcaption><\/figure>\n<p>\u042f \u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c Cloud Console \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0440\u0430\u0437 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u0433\u0434\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0431\u0443\u0434\u0435\u0442, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u043e\u0437\u0434\u0430\u043d, \u0432\u044b (API, CLI) \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0445 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e, \u0438 \u0441\u0442\u0430\u043d\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0432 \u043e\u0442\u0432\u0435\u0442 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435<\/p>\n<pre><code class=\"json\">{     \"code\": \"LimitExceeded\",     \"message\": \"The following service limits were exceeded: standard-a1-memory-count, standard-a1-core-count. Request a service limit increase from the service limits page in the console. \" }<\/code><\/pre>\n<p>\u0438\u043b\u0438 \u0436\u0435 \u0441\u043d\u043e\u0432\u0430<\/p>\n<pre><code class=\"json\">{     \"code\": \"InternalError\",     \"message\": \"Out of host capacity.\" }<\/code><\/pre>\n<p>\u0412\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u0438 \u0435\u0441\u0442\u044c \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<h2>\u041d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441<\/h2>\n<p>\u041c\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u043d\u0430\u0440\u043e\u0447\u043d\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0432\u0430 &#171;\u043d\u0435\u0434\u043e\u043b\u0433\u043e\u0432\u0435\u0447\u043d\u044b\u0445&#187; (ephemeral) \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 IP \u0430\u0434\u0440\u0435\u0441\u0430. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0440\u0435\u0443\u0441\u043f\u0435\u0435\u0442\u0435 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u0440\u043b\u044f\u0440\u0430, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0438\u0434\u0451\u043c \u043f\u043e \u043f\u0443\u0442\u0438 Instance Details -&gt; Resources -&gt; Attached VNICs, \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u0435\u0433\u043e \u0438\u043c\u044f<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/350\/6d6\/0d2\/3506d60d242cf469a2e2544ffac93101.png\" width=\"1305\" height=\"267\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430\u0442\u0435\u043c, Resources -&gt; IPv4 Addresses -&gt;&nbsp;\u2026 -&gt; Edit<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/75d\/7fe\/028\/75d7fe028e65b867d4e3da865aa4df5d.png\" width=\"1303\" height=\"267\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c ephemeral \u0438 \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435 &#171;Update&#187;<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ee4\/969\/d8a\/ee4969d8adc9fee14b5f79b328d8efd4.png\" width=\"788\" height=\"646\"><figcaption><\/figcaption><\/figure>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u043e\u0442, \u043a\u0430\u043a \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &#8212; <strong>opc<\/strong>)<\/p>\n<pre><code class=\"bash\">ssh -i ~\/.ssh\/id_rsa opc@ip.add.re.ss<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b \u043d\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 (\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439) IP \u0430\u0434\u0440\u0435\u0441, \u0432\u044b \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f (internal FQDN) \u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u043d\u044b\u0439 (private) IP \u0430\u0434\u0440\u0435\u0441 (10.x.x.x) \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b Instance Details, \u0435\u0441\u043b\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0435\u0442\u0438 VNIC, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <\/p>\n<pre><code class=\"bash\">ssh -i ~\/.ssh\/id_rsa opc@instance-20210714-xxxx.subnet.vcn.oraclevcn.com<\/code><\/pre>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0447\u043b\u0438!<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/568368\/\"> https:\/\/habr.com\/ru\/post\/568368\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041e\u0447\u0435\u043d\u044c \u0437\u0430\u043c\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043d\u0435\u0434\u0430\u0432\u043d\u043e <a href=\"https:\/\/blogs.oracle.com\/cloud-infrastructure\/post\/moving-to-ampere-a1-compute-instances-on-oracle-cloud-infrastructure-oci\" rel=\"noopener noreferrer nofollow\">\u0430\u043d\u043e\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/a> \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 &#171;\u0412\u0441\u0435\u0433\u0434\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e&#187;.  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, &#171;\u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442&#187;, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e &#8212; \u0441\u043b\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440, \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0432\u044b\u043b\u0430\u0437\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u201cOut of Capacity\u201d. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0440\u0435\u0448\u0430\u0435\u043c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0442\u0430\u043a \u043a\u0430\u043a Oracle \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u0435\u0442 \u0451\u043c\u043a\u043e\u0441\u0442\u044c.<\/p>\n<blockquote>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0430\u0440\u0435\u043d\u0434\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u043f\u0435\u0440\u0432\u044b\u0435 3000 \u0447\u0430\u0441\u043e\u0432 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0426\u041f \u0438 18&nbsp;000 \u0413\u0411-\u0447\u0430\u0441\u043e\u0432 \u0432 \u043c\u0435\u0441\u044f\u0446 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 Ampere A1 Compute \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 VM.Standard.A1.Flex (\u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e 4 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u043c \u0426\u041f \u0438 24 \u0413\u0411 \u043f\u0430\u043c\u044f\u0442\u0438).<\/p>\n<\/blockquote>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 <a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/API\/Concepts\/cliconcepts.htm\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b<\/a><\/p>\n<p><a href=\"https:\/\/medium.com\/r\/?url=https%3A%2F%2Fdocs.oracle.com%2Fen-us%2Fiaas%2FContent%2FAPI%2FSDKDocs%2Fcliinstall.htm\" rel=\"noopener noreferrer nofollow\">https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/API\/SDKDocs\/cliinstall.htm<\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PHP \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u0443\u0436\u0435 \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u0430 \u043a \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u043e\u0441\u043e\u0431\u043e \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445: <a href=\"https:\/\/github.com\/hitrov\/oci-arm-host-capacity\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/hitrov\/oci-arm-host-capacity<\/a> <\/p>\n<h2>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043b\u043e\u0433\u0438\u043d\u0430 \u0432 <a href=\"http:\/\/cloud.oracle.com\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0431-\u043a\u043e\u043d\u0441\u043e\u043b\u044c<\/a> \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u0438\u043a\u043e\u043d\u043a\u0443 \u0441 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u043c \u0438 \u0437\u0430\u0442\u0435\u043c User Settings<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0451\u043c \u043f\u043e \u043f\u0443\u0442\u0438 Resources -&gt; API keys, \u0436\u043c\u0451\u043c \u043a\u043d\u043e\u043f\u043a\u0443 \u201cAdd API Key\u201d<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u0444\u0430\u0439\u043b\u0435 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c config. \u042f \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u0435\u0433\u043e \u0432 \u043d\u043e\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \/home\/ubuntu\/.oci \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c *.pem<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c CLI<\/h2>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/p>\n<pre><code class=\"bash\">OCI_CLI_RC_FILE=\/home\/ubuntu\/.oci\/config<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a OCI CLI \u0441\u0435\u0431\u0435 \u0432 PATH, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435<\/p>\n<pre><code class=\"bash\">alias oci='\/home\/ubuntu\/bin\/oci'<\/code><\/pre>\n<p>(\u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043f\u0443\u0442\u044c \u043d\u0430 \u0442\u043e\u0442, \u043a\u0443\u0434\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0431\u044b\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435).<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443<\/p>\n<pre><code class=\"bash\">oci setup repair-file-permissions --file \/home\/ubuntu\/.oci\/oracleidentitycloudservice***.pem<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 user \u0431\u0435\u0440\u0451\u043c \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438)<\/p>\n<pre><code class=\"bash\">oci iam user get --user-id ocid1.user.oc1..aaaaaaaax72***d3q<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430<\/h2>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 (Availability Domain) \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u0435\u043d. \u0416\u043c\u0451\u043c \u043c\u0435\u043d\u044e Oracle Cloud -&gt; Compute -&gt; Instances<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0416\u043c\u0451\u043c \u201cCreate Instance\u201d \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0433\u0434\u0435 Availability Domain \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a \u201c<strong>Always Free Eligible<\/strong>\u201d. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e AD-2.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 compartment-id. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 tenancy \u0438\u0437 config \u0444\u0430\u0439\u043b\u0430)<\/p>\n<pre><code class=\"bash\">export C=ocid1.tenancy.oc1..aaaaaaaakpx***mpa<\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u043e\u0431\u0435\u0440\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430:<\/p>\n<ul>\n<li>\n<p>availability-domain<\/p>\n<\/li>\n<li>\n<p>shape<\/p>\n<\/li>\n<li>\n<p>subnet-id<\/p>\n<\/li>\n<li>\n<p>image-id<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">oci iam availability-domain list - all - compartment-id=$C<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430<\/p>\n<pre><code class=\"json\">{   \"data\": [     ...     {       \"compartment-id\": \"ocid1.tenancy.oc1..aaaaaaaakpx***mpa\",       \"id\": \"ocid1.availabilitydomain.oc1..aaaaaaaalcd***m2q\",       \"name\": \"FeVO:EU-FRANKFURT-1-AD-2\"     },     ...   ] }<\/code><\/pre>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e AD-2). \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/p>\n<pre><code class=\"bash\">export A=FeVO:EU-FRANKFURT-1-AD-2<\/code><\/pre>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0442\u0438\u043f (shape)<\/p>\n<pre><code class=\"bash\">oci compute shape list --compartment-id=$C<\/code><\/pre>\n<p>\u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u200a<strong>VM.Standard.A1.Flex<\/strong>:<\/p>\n<pre><code class=\"json\">{   \"data\": [     ...     {       \"baseline-ocpu-utilizations\": null,       \"gpu-description\": null,       \"gpus\": 0,       \"is-live-migration-supported\": false,       \"local-disk-description\": null,       \"local-disks\": 0,       \"local-disks-total-size-in-gbs\": null,       \"max-vnic-attachment-options\": {         \"default-per-ocpu\": 1.0,         \"max\": 24.0,         \"min\": 2       },       \"max-vnic-attachments\": 2,       \"memory-in-gbs\": 6.0,       \"memory-options\": {         \"default-per-ocpu-in-g-bs\": 6.0,         \"max-in-g-bs\": 512.0,         \"max-per-ocpu-in-gbs\": 64.0,         \"min-in-g-bs\": 1.0,         \"min-per-ocpu-in-gbs\": 1.0       },       \"min-total-baseline-ocpus-required\": null,       \"networking-bandwidth-in-gbps\": 1.0,       \"networking-bandwidth-options\": {         \"default-per-ocpu-in-gbps\": 1.0,         \"max-in-gbps\": 40.0,         \"min-in-gbps\": 1.0       },       \"ocpu-options\": {         \"max\": 80.0,         \"min\": 1.0       },       \"ocpus\": 1.0,       \"processor-description\": \"3.0 GHz Ampere\\u00ae Altra\\u2122\",       \"shape\": \"VM.Standard.A1.Flex\"     },     ...   ] }<\/code><\/pre>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u0440\u0430\u043d\u0435\u0435 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 <strong>VM.Standard.E2.1.Micro<\/strong>&nbsp;(\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c AMD) \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 &#8212; \u0434\u0432\u0430 \u0442\u0430\u043a\u0438\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u044d\u0442\u043e \u043f\u0440\u0435\u0436\u0434\u0435 &#8212; \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 VNC, subnet, route table, security list \u0438 \u0442.\u0434.<\/p>\n<pre><code class=\"bash\">oci network subnet list --compartment-id=$C<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 id<\/p>\n<pre><code class=\"json\">{   \"data\": [     {       \"availability-domain\": null,       \"cidr-block\": \"10.0.0.0\/24\",       \"compartment-id\": \"ocid1.tenancy.oc1..aaaaaaaakpx***mpa\",       \"defined-tags\": {         \"Oracle-Tags\": {           \"CreatedBy\": \"***\",           \"CreatedOn\": \"2021-01-26T13:51:31.332Z\"         }       },       \"dhcp-options-id\": \"ocid1.dhcpoptions.oc1.eu-frankfurt-1.aaaaaaaafh4***cvq\",       \"display-name\": \"subnet-20210126-1549\",       \"dns-label\": \"subnet01261551\",       \"freeform-tags\": {},       \"id\": \"ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaaahbb***faq\",       \"ipv6-cidr-block\": null,       \"ipv6-virtual-router-ip\": null,       \"lifecycle-state\": \"AVAILABLE\",       \"prohibit-internet-ingress\": false,       \"prohibit-public-ip-on-vnic\": false,       \"route-table-id\": \"ocid1.routetable.oc1.eu-frankfurt-1.aaaaaaaaqwe***p76q\",       \"security-list-ids\": [         \"ocid1.securitylist.oc1.eu-frankfurt-1.aaaaaaaaagnn***tca\"       ],       \"subnet-domain-name\": \"subnet***.vcn***.oraclevcn.com\",       \"time-created\": \"2021-01-26T13:51:31.534000+00:00\",       \"vcn-id\": \"ocid1.vcn.oc1.eu-frankfurt-1.amaaaaaalox***y4a\",       \"virtual-router-ip\": \"10.0.0.1\",       \"virtual-router-mac\": \"00:00:17:***\"     }   ] }<\/code><\/pre>\n<p>&#8230;\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e<\/p>\n<pre><code class=\"bash\">export S=ocid1.subnet.oc1.eu-frankfurt-1.aaaaaaaaahbb***faq<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u0440\u0430\u0437\u043e\u0432<\/p>\n<pre><code class=\"bash\">oci compute image list  --compartment-id=$C --shape=VM.Standard.A1.Flex<\/code><\/pre>\n<p>\u042f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0438\u043c\u0435\u0442\u044c \u0432\u0435\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043e\u0444\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0440\u0430\u0437\u0443 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 &#8212; \u043c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 &#8212; \u044d\u0442\u043e \u201c<strong>Oracle Linux Cloud Developer<\/strong>\u201d<\/p>\n<pre><code class=\"json\">{   \"data\": [     ...     {       \"agent-features\": null,       \"base-image-id\": null,       \"billable-size-in-gbs\": 14,       \"compartment-id\": null,       \"create-image-allowed\": true,       \"defined-tags\": {},       \"display-name\": \"Oracle-Linux-Cloud-Developer-8.4-aarch64-2021.06.18-0\",       \"freeform-tags\": {},       \"id\": \"ocid1.image.oc1.eu-frankfurt-1.aaaaaaaa23zlxgcvdgb2zn4ffik6rda4g5daa5wa42svsgp4enljv4ywv6wa\",       \"launch-mode\": \"NATIVE\",       \"launch-options\": {         \"boot-volume-type\": \"PARAVIRTUALIZED\",         \"firmware\": \"UEFI_64\",         \"is-consistent-volume-naming-enabled\": true,         \"is-pv-encryption-in-transit-enabled\": true,         \"network-type\": \"PARAVIRTUALIZED\",         \"remote-data-volume-type\": \"PARAVIRTUALIZED\"       },       \"lifecycle-state\": \"AVAILABLE\",       \"listing-type\": null,       \"operating-system\": \"Oracle Linux Cloud Developer\",       \"operating-system-version\": \"8\",       \"size-in-mbs\": 51200,       \"time-created\": \"2021-06-24T20:36:22.659000+00:00\"     },     ...   ] }<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c image id<\/p>\n<pre><code class=\"bash\">export I=ocid1.image.oc1.eu-frankfurt-1.aaaaaaaa23zlxgcvdgb2zn4ffik6rda4g5daa5wa42svsgp4enljv4ywv6wa<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 JSON \u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<ul>\n<li>\n<p>instanceOptions.json<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"json\">{     \"areLegacyImdsEndpointsDisabled\": false }<\/code><\/pre>\n<ul>\n<li>\n<p>shapeConfig.json (\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0438\u043b\u0438 \u041e\u0417\u0423). \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 1\/6, 2\/12, 3\/18 and 2\/24 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0437 \u201cOracle Linux Cloud Developer\u201d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c 8\u0413\u0411 \u041e\u0417\u0423 (\u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8212; \u044d\u0442\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 1\/8)<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"json\">{     \"ocpus\": 4,     \"memoryInGBs\": 24 }<\/code><\/pre>\n<ul>\n<li>\n<p>availabilityConfig.json<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"json\">{     \"recoveryAction\": \"RESTORE_INSTANCE\" }<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443, \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439 ~\/.ssh\/id_rsa \u0438 ~\/.ssh\/id_rsa.pub. \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 (\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e) \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0438\u0436\u0435. \u0412 \u0441\u0435\u0442\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e, \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u043f\u0443\u0441\u0442\u0438\u043c \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c.<\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446,<\/p>\n<pre><code class=\"bash\">oci compute instance launch \\  --availability-domain $A \\  --compartment-id $C \\  --shape VM.Standard.A1.Flex \\  --subnet-id $S \\  --assign-private-dns-record true \\  --assign-public-ip false \\  --availability-config file:\/\/\/home\/ubuntu\/availabilityConfig.json \\  --display-name my-new-instance \\  --image-id $I \\  --instance-options file:\/\/\/home\/ubuntu\/instanceOptions.json \\  --shape-config file:\/\/\/home\/ubuntu\/shapeConfig.json \\  --ssh-authorized-keys-file \/home\/ubuntu\/.ssh\/id_rsa.pub<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c crontab \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 .sh \u0444\u0430\u0439\u043b (&#171;\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435&#187; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430) \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c cron \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443. \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u043f\u0443\u0441\u0442\u0438\u043c \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c.<\/p>\n<p>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441 \u0442\u0438\u043f\u043e\u043c VM.Standard.E2.1.Micro, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b ARM)<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u042f \u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c Cloud Console \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0440\u0430\u0437 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u0433\u0434\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0431\u0443\u0434\u0435\u0442, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u043e\u0437\u0434\u0430\u043d, \u0432\u044b (API, CLI) \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0445 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e, \u0438 \u0441\u0442\u0430\u043d\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0432 \u043e\u0442\u0432\u0435\u0442 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435<\/p>\n<pre><code class=\"json\">{     \"code\": \"LimitExceeded\",     \"message\": \"The following service limits were exceeded: standard-a1-memory-count, standard-a1-core-count. Request a service limit increase from the service limits page in the console. \" }<\/code><\/pre>\n<p>\u0438\u043b\u0438 \u0436\u0435 \u0441\u043d\u043e\u0432\u0430<\/p>\n<pre><code class=\"json\">{     \"code\": \"InternalError\",     \"message\": \"Out of host capacity.\" }<\/code><\/pre>\n<p>\u0412\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u0438 \u0435\u0441\u0442\u044c \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<h2>\u041d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441<\/h2>\n<p>\u041c\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u043d\u0430\u0440\u043e\u0447\u043d\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0432\u0430 &#171;\u043d\u0435\u0434\u043e\u043b\u0433\u043e\u0432\u0435\u0447\u043d\u044b\u0445&#187; (ephemeral) \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 IP \u0430\u0434\u0440\u0435\u0441\u0430. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0440\u0435\u0443\u0441\u043f\u0435\u0435\u0442\u0435 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u0440\u043b\u044f\u0440\u0430, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0438\u0434\u0451\u043c \u043f\u043e \u043f\u0443\u0442\u0438 Instance Details -&gt; Resources -&gt; Attached VNICs, \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u0435\u0433\u043e \u0438\u043c\u044f<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430\u0442\u0435\u043c, Resources -&gt; IPv4 Addresses -&gt;&nbsp;\u2026 -&gt; Edit<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c ephemeral \u0438 \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435 &#171;Update&#187;<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u043e\u0442, \u043a\u0430\u043a \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &#8212; <strong>opc<\/strong>)<\/p>\n<pre><code class=\"bash\">ssh -i ~\/.ssh\/id_rsa opc@ip.add.re.ss<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b \u043d\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 (\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439) IP \u0430\u0434\u0440\u0435\u0441, \u0432\u044b \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f, <\/p>\n<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-326634","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=326634"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326634\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}