CloudForms in AWS part 3

This will be the last part of the blog series but probably the most interesting one. When you launch a smartstate analysis you will see the following in you evm log files.

There are a few interesting parts here. What is the AgentCoordinator? The code can be found here:

/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. 

So when you look at the evm log, you see that it says “find_or_create_keypair KeyPair smartstate-2ae1670a-2fcc-4bbb-abcc-3fa962895096″

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.

Let’s explain how you can get that key so you can SSH into the atomic instance and see whats going on.

In my case its the first key as I did not create another one yet.

Then go ahead and decrypt that key.

Copy your RSA private key to cfme.pem and format it correctly:

Next you need to fix perms

If you want you can also compare fingerprints

This should match what you see in the Compute> Cloud -> KeyPairs.

As I assume that you already launched the smartstate analysis. 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 in the AWS console you will see.

Here is the s3 bucket

When running smartstate you will actually have a message in the request queue. This will the CFME to launch the smartstate instance.

As you probably noticed a security group named smartstate was created for you as well.

Now I was wondering if everything on the atomic host is actually kosher. So that’s where our ssh-key comes in

Lets ssh into the atomic host

If everything is working correctly you should see the that the cfme-amazon-smartstate image gets pulled.


The next step, of course, is that CFME will launch it.

If the scan completes successfully you will see vm_scan_complete

Now you probably wondering, What happens during the smartstate analysis? I’ve created the following diagram for you to understand the magic:


Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

Hit Counter provided by laptop reviews