Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2992

cf-remote should be able to spawn VMs in AWS (or DO or GC)

    XMLWordPrintable

    Details

      Description

      Proposal for CLI usage:

      $ cf-remote spawn --provider aws --os rhel-8 --count 1 --role hub --name rhel-8-hub
      $ cf-remote spawn --provider aws --os rhel-8 --count 3 --role clients --name rhel-8-clients
      $ cf-remote install --hub rhel-8-hub --clients rhel-8-clients --bootstrap rhel-8-hub
      
      $ cf-remote sudo "cf-agent -KIf update.cf"
      $ cf-remote sudo "cf-agent -KIf promises.cf"
      
      $ cf-remote destroy rhel-8-clients
      $ cf-remote destroy --all
      

      Some things to consider:

      • Internal state should be stored in cf-remote dir as json ~/.cfengine/cf-remote/cloud_state.json or similar.
      • When spawning droplets / instances, IPs should be stored in the state, including AWS private IP (which will be used for bootstrap command).

      Cloud config:

      {
        "aws":
        {
          "REGION_ID": "eu-west-1",
          "AMI_ID": "ami-0e12cbde3e77cbb98",
          "REGION_ID": "eu-west-1",
          "SIZE_ID": "t2.micro",
          "KEYPAIR_NAME": "olehermanse",
          "SECURITY_GROUP_NAMES": ["cfengine-test"],
        }
      }
      

      Cloud secrets:

      {
        "aws":
        {
          "ACCESS_ID" : "ZAIKCXUABUDFHABJUYUG",
          "SECRET_KEY" : "ASDVjhvb123ASD816+ABC123BDASDasdacSADASd",
        }
      }
      

      Cloud state:

      Add json format here
      

        Attachments

          Activity

            People

            • Assignee:
              vpodzime Vratislav Podzimek
              Reporter:
              olehermanse Ole Herman Schumacher Elgesem
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel