{"id":2319,"date":"2018-04-02T13:43:26","date_gmt":"2018-04-02T17:43:26","guid":{"rendered":"http:\/\/blog.domb.net\/?p=2319"},"modified":"2018-04-02T13:43:26","modified_gmt":"2018-04-02T17:43:26","slug":"cloudforms-in-aws-part-3","status":"publish","type":"post","link":"https:\/\/blog.domb.net\/?p=2319","title":{"rendered":"CloudForms in AWS part 3"},"content":{"rendered":"<p>This will be the last part of the blog series but probably the most interesting one. When you launch a smartstate\u00a0analysis you will see the following in you evm log files.<\/p>\n<pre class=\"lang:default decode:true\">[----] I, [2018-03-11T16:12:10.941498 #3004:4f7130]  INFO -- : MIQ(ManageIQ::Providers::Amazon::CloudManager::Vm#raw_scan) NAME [Scan from Vm vmtosmartstate] SCAN [nil] [NilClass]\r\n[----] I, [2018-03-11T16:12:11.068516 #3004:4f7130]  INFO -- : Job created: guid: [b0c7c318-2844-436c-bc44-21a29dfa3cce], userid: [admin], name: [Scan from Vm vmtosmartstate], target class: [VmOrTemplate], target id: [99000000000166], process type: [VmScan], server id: [], zone: [default]\r\n[----] I, [2018-03-11T16:12:15.868847 #3014:4f7130]  INFO -- : MIQ(MiqQueue.put) Message id: [99000000000427],  id: [], Zone: [default], Role: [smartstate], Server: [], Ident: [generic], Target id: [], Instance id: [], Task id: [job_dispatcher], Command: [JobProxyDispatcher.dispatch], Timeout: [600], Priority: [20], State: [ready], Deliver On: [], Data: [], Args: []\r\n[----] I, [2018-03-11T16:12:21.133242 #3004:4f7130]  INFO -- : MIQ(MiqPriorityWorker::Runner#get_message_via_drb) Message id: [99000000000427], MiqWorker id: [99000000000004], Zone: [default], Role: [smartstate], Server: [], Ident: [generic], Target id: [], Instance id: [], Task id: [job_dispatcher], Command: [JobProxyDispatcher.dispatch], Timeout: [600], Priority: [20], State: [dequeue], Deliver On: [], Data: [], Args: [], Dequeued in: [5.266320951] seconds\r\n[----] I, [2018-03-11T16:13:05.374585 #3424:4f7130]  INFO -- : MIQ(ManageIQ::Providers::Amazon::AgentCoordinator#find_or_create_keypair) KeyPair smartstate-2ae1670a-2fcc-4bbb-abcc-3fa962895096 will be created!\r\n[----] I, [2018-03-11T16:13:05.877668 #3424:4f7130]  INFO -- : MIQ(ManageIQ::Providers::Amazon::AgentCoordinator#deploy_agent) Smartstate agent will be deployed in vpc: [vpc-076ad862], zone: [us-east-1a] subnet: [subnet-3cc6154b]\r\n[----] I, [2018-03-11T16:13:11.145451 #3424:4f7130]  INFO -- : MIQ(ManageIQ::Providers::Amazon::AgentCoordinator#get_agent_image_id) AMI Image: RHEL-Atomic_7.4_HVM_GA-20180104-x86_64-1-Access2-GP2 [ami-d97120a3] is used to launch smartstate agent.\r\n[----] I, [2018-03-11T16:15:55.976224 #2716:4f7130]  INFO -- : MiqServer: local=Y, master=Y, status= started, id=99000000000001, pid=02716, guid=c5b77187-7fc9-426e-b3cb-6f0ce7860c8e, name=EVM, zone=default, hostname=ip-172-31-44-62.ec2.internal, ipaddress=172.31.44.62, version=5.9.0.22, build=20180221205805_f93a675, active roles=automate:database_operations:datab<\/pre>\n<p>There are a few interesting parts here. What is the AgentCoordinator? The code can be found here:<\/p>\n<p><span style=\"font-weight: 400\">\/opt\/rh\/cfme-gemset\/bundler\/gems\/manageiq-providers-amazon-9620e26f4381\/app\/models\/manageiq\/providers\/amazon\/agent_coordinator.rb . Its out of scope to discuss the entire ruby code, but it will tell you, how we do it.\u00a0<\/span><\/p>\n<p>So when you look at the evm\u00a0log, you see that it says <strong>&#8220;find_or_create_keypair KeyPair <\/strong>smartstate<strong>-2ae1670a-2fcc-4bbb-<\/strong>abcc<strong>-3fa962895096&#8243;<\/strong><\/p>\n<p>This means that the key used for the ssh login to the RHEL-Atomic_7.4_HVM_GA-20180104-x86_64-1-Access2-GP2 (ami-d97120a3) is generated on the fly.<\/p>\n<p>Let&#8217;s explain how you can get that key so you can SSH into the atomic instance and see whats going on.<\/p>\n<pre class=\"lang:default decode:true \">vmdb\r\nbin\/rails c\r\n$evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)\r\n$evm.vmdb(:ManageIQ_Providers_CloudManager_AuthKeyPair).all.first\r\n$ssa=$evm.vmdb(:ManageIQ_Providers_CloudManager_AuthKeyPair).find_by_resource_id(99000000000001)\r\n$ssa[:auth_key]\r\nirb(main):007:0&gt; $ssa[:auth_key]\r\n=&gt;\r\n\"v2:{UOjuc9OSrBm2AcOU5HmnLi1+7XVumlIlfX2SO7fbe1FyAwt9RGqEqyJD5VSRD4QG8RhoFt0yBe0fk5LCq0RGxgdiuIClv50mePsgTyx7f4cOCT94MKM5s3NkfeEq3BdNCzL+CWji+WSXZZn7zE9l\/4ezFW7eesfJzsW6npMlH\/SNUBdAgiVZzbsKrHZuP4n5agPBYSX+APf+1KvAOGLYaMREGfw4E7OytKGIfOAD\/dSKXRx\/bhEadCOvnf6sG6XKYGzi82aa+AMzgexszx\/93Ce+Pp6fbODxxXJmoDNyzJEoKyuavDiWBEK2SHMV5t2G8U\/pb0mjYvavNCl86gtqOGJQ26bZNuUkJlRoSyErOMyrOOhreq0\/2RMJvI4Uy6ekCBggyPFS3iPDduQTNM1tPhZPVAW2H+RB8UKZOtf+Oo+eqfkGvQYlnsJt2a4XET+alDxpDT6TEVRCrMpAUUiJt2B1AG3uQ8wL3RDRMvj54uR\/uRsvlFMkO9HYrlcKKrQ4myBa3UbVETNcwT844sYwXEP8thmIVMFwIp03oY5ZQOXoPikD1wJJSHQON2bmIbh\/xZ3e2ggPwuLkc9ROSBUxkRK4zXhdezwjI3UfP3LVwujHJVmsIBpUDR7oXw2CUwr0be72MFKoWpmvbXf7E8KZaJz1FNZUoOGpMPz5j3eDetlCEwgjJF2UVElT8+2dLosxN2NeLpFY6vpZXm3erOG6WVLM\/v5kiX3V2S2JHaUOZdVRrHvk9yoSF5YhQgn72LlpG+Y4DhT3QOf9HMwzg4A4D6EgkRmZfWdr8ABMMoEFonIkPX08ZwJnr3iNAtam8HCvnGGcs49eTPrAzNG\/9zjn6ViS4tvGk9EaYYU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Yr8Isg00sCDFBrMG9P6nxbZsipeIklTjyCUWFA8rFPBMDfETFhNCkcpZ7TQqZsQtzBgc3gbgIemXw2ORSKvO6RB++b3s81Xj4OPgwG6cH\/rvNGvf1ZsE3ONQFXCoVx0ZCXhdiLcvqovSrMctJKFzZdAVTSLKBARc7nc2JQx3Tam+29nn3cTvHH++zx52roTmpO2eI3gWkqpM8TEYAWQVLK8KaK33WCbu7Q6\/iCOEKuHPz9v2L1oJBt\/7zpU8wxbfafcxOzYuUTbw74EykGzUVaDUuSCbh14oZO9Z1vuBxWO8U}\"\r\n\r\n<\/pre>\n<p>In my case its the first key as I did not create another one yet.<\/p>\n<p>Then go ahead and decrypt that key.<\/p>\n<pre class=\"lang:default decode:true\">MiqPassword.decrypt(\"v2:{UOjuc9OSrBm2AcOU5HmnLi1+7XVumlIlfX2SO7fbe1FyAwt9RGqEqyJD5VSRD4QG8RhoFt0yBe0fk5LCq0RGxgdiuIClv50mePsgTyx7f4cOCT94MKM5s3NkfeEq3BdNCzL+CWji+WSXZZn7zE9l\/4ezFW7eesfJzsW6npMlH\/SNUBdAgiVZzbsKrHZuP4n5agPBYSX+APf+1KvAOGLYaMREGfw4E7OytKGIfOAD\/dSKXRx\/bhEadCOvnf6sG6XKYGzi82aa+AMzgexszx\/93Ce+Pp6fbODxxXJmoDNyzJEoKyuavDiWBEK2SHMV5t2G8U\/pb0mjYvavNCl86gtqOGJQ26bZNuUkJlRoSyErOMyrOOhreq0\/2RMJvI4Uy6ekCBggyPFS3iPDduQTNM1tPhZPVAW2H+RB8UKZOtf+Oo+eqfkGvQYlnsJt2a4XET+alDxpDT6TEVRCrMpAUUiJt2B1AG3uQ8wL3RDRMvj54uR\/uRsvlFMkO9HYrlcKKrQ4myBa3UbVETNcwT844sYwXEP8thmIVMFwIp03oY5ZQOXoPikD1wJJSHQON2bmIbh\/xZ3e2ggPwuLkc9ROSBUxkRK4zXhdezwjI3UfP3LVwujHJVmsIBpUDR7oXw2CUwr0be72MFKoWpm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ap7noKtfYa0K3GPCa41pXHwaMrG6jeM3Oi0KaoXTBmlfqeDKtqJ1YOzqQ5+qoVd\/Um8nWq\/HWvjhtoEK7K4zXaEsaVBlPeqrDqUY+sppbvKENXRRfotim9QG+b5ujINRCLl95HSNIQ5J6zDjYPqDToQuRF72L2SdoDHNSotcSzMDf3m91Idoec5oV8M+jPwqjm7BgzCK7RxW8aAAgh0Ht6j+QHYr8Isg00sCDFBrMG9P6nxbZsipeIklTjyCUWFA8rFPBMDfETFhNCkcpZ7TQqZsQtzBgc3gbgIemXw2ORSKvO6RB++b3s81Xj4OPgwG6cH\/rvNGvf1ZsE3ONQFXCoVx0ZCXhdiLcvqovSrMctJKFzZdAVTSLKBARc7nc2JQx3Tam+29nn3cTvHH++zx52roTmpO2eI3gWkqpM8TEYAWQVLK8KaK33WCbu7Q6\/iCOEKuHPz9v2L1oJBt\/7zpU8wxbfafcxOzYuUTbw74EykGzUVaDUuSCbh14oZO9Z1vuBxWO8U}\")\r\n=&gt; \"-----BEGIN RSA PRIVATE KEY-----\\nMIIEpAIBAAKCAQEA4VajXvftedVzvG .......\r\n<\/pre>\n<p>Copy your RSA private key to cfme.pem and format it correctly:<\/p>\n<pre class=\"lang:default decode:true \">sed -i 's\/\\\\n\/\\n\/g' cfme.pem\r\n<\/pre>\n<p>Next you need to fix perms<\/p>\n<pre class=\"lang:default decode:true \">chmod\u00a0400 cfme.pem<\/pre>\n<p>If you want you can also compare fingerprints<\/p>\n<pre class=\"lang:default decode:true \">openssl  pkcs8 -in smartstate-1c6df722-bf49-4e32-ad6c-e0aea84a842a.pem -nocrypt -topk8 -outform DER | openssl sha1 -c\r\n(stdin)= 70:6f:cc:40:10:ea:97:43:26:6e:f5:73:4c:e8:0d:15:e8:59:5a:c1\r\n<\/pre>\n<p>This should match what you see in the Compute&gt; Cloud -&gt; KeyPairs.<\/p>\n<p>As I assume that you already launched the smartstate\u00a0analysis. 3 SQS queues were created in the meantime for you as well as an s3 bucket for the heartbeat where it will store the instance id for the agent. If you go to SQS\u00a0in the AWS console you will see.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2324\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.41.19-PM.png\" alt=\"\" width=\"2146\" height=\"192\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.41.19-PM.png 2146w, https:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.41.19-PM-300x27.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.41.19-PM-768x69.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.41.19-PM-1024x92.png 1024w\" sizes=\"auto, (max-width: 2146px) 100vw, 2146px\" \/><\/p>\n<p>Here is the s3 bucket<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2326\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.47.11-PM.png\" alt=\"\" width=\"659\" height=\"438\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.47.11-PM.png 659w, https:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.47.11-PM-300x199.png 300w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/p>\n<p>When running smartstate\u00a0you will actually have a message in the request queue. This will the CFME to launch the smartstate\u00a0instance.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2331\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.46.14-PM.jpg\" alt=\"\" width=\"1838\" height=\"799\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.46.14-PM.jpg 1838w, https:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.46.14-PM-300x130.jpg 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.46.14-PM-768x334.jpg 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2018-03-11-at-10.46.14-PM-1024x445.jpg 1024w\" sizes=\"auto, (max-width: 1838px) 100vw, 1838px\" \/><\/p>\n<p>As you probably noticed a security group named smartstate was created for you as well.<\/p>\n<p>Now I was wondering if everything on the atomic host is actually kosher. So that&#8217;s\u00a0where our ssh-key comes in<\/p>\n<p>Lets ssh into the atomic host<\/p>\n<pre class=\"lang:default decode:true \">ssh -i \"cfme.pem\" ec2-user@ec2-57-88-166-140.compute-1.amazonaws.com<\/pre>\n<p>If everything is working correctly you should see the that the cfme-amazon-smartstate image gets pulled.<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:default decode:true \">[root@ip-172-31-22-123 ~]# atomic images list\r\n\r\n\u00a0\u00a0REPOSITORY \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0TAG IMAGE ID CREATED VIRTUAL SIZE TYPE \u00a0\u00a0\r\n\r\n&gt; \u00a0registry.access.redhat.com\/cloudforms46\/cfme-amazon-smartstate \u00a0\u00a0latest 53c8509ae76a 2018-02-22 16:20 311.44 MB docker<\/pre>\n<p>The next step, of course, is that CFME will launch it.<\/p>\n<pre class=\"lang:default decode:true \">[root@ip-172-31-22-123 ~]# atomic containers list\r\n\r\n\u00a0\u00a0CONTAINER ID IMAGE \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0NAME COMMAND CREATED \u00a0\u00a0\u00a0\u00a0STATE BACKEND RUNTIME\r\n\r\n\u00a0\u00a060cb45e8e0d4 registry.access.redh silly_nort \/bin\/sh -c 2018-03-11 20:18 running \u00a0\u00a0\u00a0docker docker<\/pre>\n<p>If the scan completes successfully you will see vm_scan_complete<\/p>\n<pre class=\"lang:default decode:true \">[----] I, [2018-03-11T16:20:46.085250 #2978:4f7130]  INFO -- : Q-task_id([b0c7c318-2844-436c-bc44-21a29dfa3cce]) MIQ(MiqEvent#process_evm_event) target = [#&lt;ManageIQ::Providers::Amazon::CloudManager::Vm id: 99000000000166, vendor: \"amazon\", format: nil, version: nil, name: \"vmtosmartstate\", description: nil, location: \"ec2-54-160-15-44.compute-1.amazonaws.com\", config_xml: nil, autostart: nil, host_id: nil, last_sync_on: \"2018-03-11 20:20:08\", created_on: \"2018-03-11 20:08:19\", updated_on: \"2018-03-11 20:20:42\", storage_id: nil, guid: \"13f6cdd0-69db-4ce6-b7eb-3f04f38ce739\", ems_id: 99000000000001, last_scan_on: \"2018-03-11 20:18:45\", last_scan_attempt_on: \"2018-03-11 20:12:10\", uid_ems: \"i-0de0a2338f41c40a4\", retires_on: nil, retired: nil, boot_time: \"2018-03-11 20:03:10\", tools_status: nil, standby_action: nil, power_state: \"on\", state_changed_on: \"2018-03-11 20:08:19\", previous_state: nil, connection_state: nil, last_perf_capture_on: nil, registered: nil, busy: nil, smart: nil, memory_reserve: nil, memory_reserve_expand: nil, memory_limit: nil, memory_shares: nil, memory_shares_level: nil, cpu_reserve: nil, cpu_reserve_expand: nil, cpu_limit: nil, cpu_shares: nil, cpu_shares_level: nil, cpu_affinity: nil, ems_created_on: nil, template: false, evm_owner_id: nil, ems_ref_obj: nil, miq_group_id: 99000000000001, linked_clone: nil, fault_tolerance: nil, type: \"ManageIQ::Providers::Amazon::CloudManager::Vm\", ems_ref: \"i-0de0a2338f41c40a4\", ems_cluster_id: nil, retirement_warn: nil, retirement_last_warn: nil, vnc_port: nil, flavor_id: 99000000000002, availability_zone_id: 99000000000002, cloud: true, retirement_state: nil, cloud_network_id: nil, cloud_subnet_id: nil, cloud_tenant_id: nil, raw_power_state: \"running\", publicly_available: nil, orchestration_stack_id: nil, retirement_requester: nil, tenant_id: 99000000000001, resource_group_id: nil, deprecated: nil, storage_profile_id: nil, cpu_hot_add_enabled: nil, cpu_hot_remove_enabled: nil, memory_hot_add_enabled: nil, memory_hot_add_limit: nil, memory_hot_add_increment: nil&gt;]\r\n[----] I, [2018-03-11T16:20:46.098293 #2978:4f7130]  INFO -- : Q-task_id([b0c7c318-2844-436c-bc44-21a29dfa3cce]) MIQ(MiqAlert.evaluate_alerts) [vm_scan_complete] Target: ManageIQ::Providers::Amazon::CloudManager::Vm Name: [vmtosmartstate], Id: [99000000000166]\r\n[----] I, [2018-03-11T16:21:01.555276 #2716:4f7130]  INFO -- : MiqServer: local=Y, master=Y, status= started, id=99000000000001, pid=02716, guid=c5b77187-7fc9-426e-b3cb-6f0ce7860c8e, name=EVM, zone=default, hostname=ip-172-31-44-62.ec2.internal, ipaddress=172.31.44.62, version=5.9.0.22, build=20180221205805_f93a675, active roles=automate:database_operations:database_owner:ems_inventory:ems_operations:event:reporting:scheduler:smartproxy:smartstate:user_interface:web_services:websocket<\/pre>\n<p>Now you probably wondering, What happens during the smartstate\u00a0analysis? I&#8217;ve created the following diagram for you to understand the magic:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2329\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/smartstate-aws-Page-1.jpg\" alt=\"\" width=\"2813\" height=\"1913\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/smartstate-aws-Page-1.jpg 2813w, https:\/\/blog.domb.net\/wp-content\/uploads\/smartstate-aws-Page-1-300x204.jpg 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/smartstate-aws-Page-1-768x522.jpg 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/smartstate-aws-Page-1-1024x696.jpg 1024w\" sizes=\"auto, (max-width: 2813px) 100vw, 2813px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This will be the last part of the blog series but probably the most interesting one. When you launch a smartstate\u00a0analysis you will see the following in you evm log files. [&#8212;-] I, [2018-03-11T16:12:10.941498 #3004:4f7130] INFO &#8212; : MIQ(ManageIQ::Providers::Amazon::CloudManager::Vm#raw_scan) NAME [Scan from Vm vmtosmartstate] SCAN [nil] [NilClass] [&#8212;-] I, [2018-03-11T16:12:11.068516 #3004:4f7130] INFO &#8212; : Job&#8230;<\/p>\n","protected":false},"author":2,"featured_media":2048,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[37],"tags":[144,108,29,57,143],"class_list":["post-2319","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloudforms","tag-analysis","tag-aws","tag-cloudforms","tag-introspection","tag-smartstate"],"_links":{"self":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/2319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2319"}],"version-history":[{"count":8,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/2319\/revisions"}],"predecessor-version":[{"id":2341,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/2319\/revisions\/2341"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/media\/2048"}],"wp:attachment":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}