Giter VIP home page Giter VIP logo

hoovesup's Introduction

HoovesUp Logo

HoovesUp

Create self-provisioning and self-healing SSM agents on bare-metal devices


HoovesUp is a simple script that does three things;

  1. The provided Ansible script provisions your bare metal servers, installing the SSM Agent as well as the ssm.sh script
  2. Installs a crontab that runs every 5 minutes on the server, executing the ssm.sh bash script
  3. When the ssm.sh script gets invoked, it checks to see if SSM has been configured and is working... if not, it will enroll itself to your AWS SSM account

PREREQUISITES FOR YOUR BARE METAL TARGET:

  1. Have your AWS credentials setup in ~/.aws/credentials and ~/.aws/config of the target machine Follow these instructions; https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html

  2. Your AWS Credentials will require (at a minimum) the following IAM policies;

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "ssm:DeleteActivation",
                "iam:PassRole",
                "ssm:CreateActivation",
                "ssm:DescribeActivations",
                "ssm:DeleteAssociation",
                "iam:AddRoleToInstanceProfile",
                "ssm:UpdateInstanceInformation"
            ],
            "Resource": "*"
        }
    ]
}
  1. The SSM Role also needs a Trust Relationship allowing both EC2 and SSM access. Go to your shiny new role and edit the Trust Relationship with the following;
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": [
          "ssm.amazonaws.com",
          "ec2.amazonaws.com"
        ]
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
  1. The NUC's require the SSM agent, and jq to be installed. You can use the provision.yml to get the box ready. Sample command;
ansible-playbook -i hosts/dev_example provision.yml
  1. This Ansible repo only works for Ubuntu at this time. Minor modifications should allow it to work on other Linux OS's

EXAMPLE USAGE:

Once the devices have enrolled themselves in to SSM, you can use this SSM wrapper to easily interact with the devices; https://github.com/coffeesn0b/ssm-run

hoovesup's People

Contributors

coffeesn0b avatar brianchambers24 avatar

Stargazers

Kevin Kirkpatrick avatar Glenn Tatum avatar Yashwanth Lakkaraju avatar Clifton Johnson avatar Amir Y. Ahmadi avatar Alex Bumpers avatar Egidijus Ligeika avatar Kurt Dean avatar JP Espinosa avatar Anthony Scalisi avatar adam kaminski avatar Derek Murawsky avatar Ricky Lindenhovius avatar John Hollowell avatar Chris Howard avatar Eduard Hasa avatar Matt Schultz avatar  avatar James Kirkland avatar Megabyte avatar Andrew Klotz avatar André avatar Derek Williams avatar Noah Halstead avatar  avatar Leo Liu avatar  avatar Sam Mingo avatar Theo Fountain III avatar Kranthi  avatar Karl Rabe avatar zslb avatar  avatar Virgil avatar Sam "Bo" Beckwith III avatar Jim Liu avatar Evan Foster avatar Pengfei Xuan avatar Tobias Ford avatar Aldrin Piri avatar  avatar Ryan Williams avatar Denis Denisov avatar Brian Karani Ndwiga avatar B.G.Adrian avatar Josué Rodriguez avatar  avatar Xavi Ablaza avatar DW Lee avatar Nikolay Kolev avatar Adam Shannon avatar Daniel Okey-Okoro avatar  avatar Nick Kampe avatar Idi Eradiri avatar mr-elepfontius avatar  avatar jacobi petrucciani avatar Chris Hills avatar Jenny Zhang avatar Eric Barch avatar  avatar Daniel Blendea avatar Russell Leake avatar Arun Ramakani avatar  avatar Ryan Means avatar Nick Vissari avatar  avatar

Watchers

mr-elepfontius avatar JP Espinosa avatar James Cloos avatar Robert Davis avatar  avatar Tyler Parkerson avatar Pratap Sisodia avatar  avatar Clifton Johnson avatar

hoovesup's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.