amazon-ssm-agent

module
v0.0.0-...-3f59448 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2016 License: Apache-2.0

README

ReportCard Build Status

Amazon SSM Agent

The Amazon EC2 Simple Systems Manager (SSM) Agent is software developed for the Simple Systems Manager Service. The SSM Agent is the primary component of a feature called Run Command.

Overview

The SSM Agent runs on EC2 instances and enables you to quickly and easily execute remote commands or scripts against one or more instances. The agent uses SSM documents. When you execute a command, the agent on the instance processes the document and configures the instance as specified. Currently, the SSM Agent and Run Command enable you to quickly run Shell scripts on an instance using the AWS-RunShellScript SSM document.

Verify Requirements

SSM Run Command Prerequisites

Setup
Executing Commands

SSM Run Command Walkthrough Using the AWS CLI

Troubleshooting

Troubleshooting SSM Run Command

Feedback

Thank you for helping us to improve SSM and Run Command. Please send your questions or comments to: ec2-ssm-feedback@amazon.com

Building and Running from source

sudo yum install -y rpmdevtools rpm-build
  • Cross Complile SSM Agent

  • Run make build to build the SSM Agent for Linux, Debian, Windows environment.

  • Run make release to build the agent and also packages it into a RPM, DEB and ZIP package.

The following folders are generated when the build completes:

bin/debian_386
bin/debian_amd64
bin/linux_386
bin/linux_amd64
bin/windows_386
bin/windows_amd64

Please follow the user guide to copy and install the SSM Agent

Code Layout
  • Source code is under agent/
  • Vendor package source code is under vendor/src
  • rpm and dpkg artifacts are under packaging
  • build scripts are under Tools/src
GOPATH

To use vendor dependencies, the suggested GOPATH format is :<packagesource>/vendor:<packagesource>

Make Targets

The following targets are available. Each may be run with make <target>.

Make Target Description
build (Default) build builds the agent for Linux, Debian and Windows amd64 and 386 environment
release release checks code style and coverage, builds the agent and also packages it into a RPM, DEB and ZIP package
package package packages build result into a RPM, DEB and ZIP package
pre-build pre-build goes through Tools/src folder to make sure all the script files are executable
checkstyle checkstyle runs the checkstyle script
quick-integtest quick-integtest runs all tests tagged with integration using go test
quick-test quick-test runs all the tests including integration and unit tests using go test`
coverage coverage runs all tests and calculate code coverage
build-linux build-linux builds the agent for execution in the Linux amd64 environment
build-windows build-windows builds the agent for execution in the Windows amd64 environment
build-darwin build-darwin builds the agent for execution in the Darwin amd64 environment
build-linux-386 build-linux-386 builds the agent for execution in the Linux 386 environment
build-windows-386 build-windows-386 builds the agent for execution in the Windows 386 environment
build-darwin-386 build-darwin-386 builds the agent for execution in the Darwin 386 environment
create-rpm create-rpm builds the agent and packages it into a RPM package for Linux amd64 based distributions
create-deb create-deb builds the agent and packages it into a DEB package Debian amd64 based distributions
create-win create-win builds the agent and packages it into a ZIP package Windows amd64 based distributions
create-rpm-386 create-rpm-386 builds the agent and packages it into a RPM package for Linux 386 based distributions
create-deb-386 create-deb-386 builds the agent and packages it into a DEB package Debian 386 based distributions
create-win-386 create-win-386 builds the agent and packages it into a ZIP package Windows 386 based distributions
create-linux-package create-linux-package create update packages for Linux and Debian based distributions
create-windows-package create-windows-package create update packages for Windows based distributions
get-tools get-tools gets gocode and oracle using go get
clean clean removes build artifacts.
Contributing

Contributions and feedback are welcome! Proposals and Pull Requests will be considered and responded to. Please see the CONTRIBUTING.md file for more information.

Amazon Web Services does not currently provide support for modified copies of this software.

License

The Amazon SSM Agent is licensed under the Apache 2.0 License.

Directories

Path Synopsis
Tools
Package main represents the entry point of the agent.
Package main represents the entry point of the agent.
appconfig
Package appconfig manages the configuration of the agent.
Package appconfig manages the configuration of the agent.
context
Package context defines a type that carries context specific data such as the logger.
Package context defines a type that carries context specific data such as the logger.
contracts
Package contracts contains all necessary interface and models necessary for communication and sharing within the agent.
Package contracts contains all necessary interface and models necessary for communication and sharing within the agent.
executers
Package executers contains general purpose (shell) command executing objects.
Package executers contains general purpose (shell) command executing objects.
fileutil
Package fileutil contains utilities for working with the file system.
Package fileutil contains utilities for working with the file system.
fileutil/artifact
Package artifact contains utilities for working downloading files.
Package artifact contains utilities for working downloading files.
fingerprint
Package fingerprint contains functions that helps identify an instance this is done to protect customers from launching two instances with the same instance identifier and thus running commands intended for one on the other
Package fingerprint contains functions that helps identify an instance this is done to protect customers from launching two instances with the same instance identifier and thus running commands intended for one on the other
framework/coremanager
Package coremanager encapsulates the logic for configuring, starting and stopping core plugins
Package coremanager encapsulates the logic for configuring, starting and stopping core plugins
framework/coreplugins
Package coreplugins contains a list of implemented core plugins.
Package coreplugins contains a list of implemented core plugins.
framework/engine
Package engine contains the general purpose plugin runner of the plugin framework.
Package engine contains the general purpose plugin runner of the plugin framework.
framework/plugin
Package plugin contains general interfaces and types relevant to plugins.
Package plugin contains general interfaces and types relevant to plugins.
health
Package health contains routines that periodically reports health information of the agent
Package health contains routines that periodically reports health information of the agent
jsonutil
Package jsonutil contains various utilities for dealing with json data.
Package jsonutil contains various utilities for dealing with json data.
log
Package log is used to initialize the logger.
Package log is used to initialize the logger.
managedInstances/auth
package auth provides methods to implement managed instances auth support
package auth provides methods to implement managed instances auth support
managedInstances/registration
package registration provides managed instance information
package registration provides managed instance information
managedInstances/rolecreds
package rolecreds contains functions that help procure the managed instance auth credentials dependencies
package rolecreds contains functions that help procure the managed instance auth credentials dependencies
managedInstances/sharedCredentials
package sharedCredentials provides access to the aws shared credentials file.
package sharedCredentials provides access to the aws shared credentials file.
message/contracts
Package model contains message struct for MDS/SSM messages.
Package model contains message struct for MDS/SSM messages.
message/parameters
Package parameters provides utilities to parse ssm document parameters
Package parameters provides utilities to parse ssm document parameters
message/parser
Package parser contains utilities for parsing and encoding MDS/SSM messages.
Package parser contains utilities for parsing and encoding MDS/SSM messages.
message/processor
Package processor implements MDS plugin processor
Package processor implements MDS plugin processor
message/service
Package service is a wrapper for the SSM Message Delivery Service
Package service is a wrapper for the SSM Message Delivery Service
message/statemanager
Package bookkeeping helps persist documents state to disk
Package bookkeeping helps persist documents state to disk
platform
Package platform provides instance information
Package platform provides instance information
plugins/runcommand
Package runcommand implements the RunCommand plugin.
Package runcommand implements the RunCommand plugin.
plugins/updatessmagent
Package updatessmagent implements the UpdateSsmAgent plugin.
Package updatessmagent implements the UpdateSsmAgent plugin.
rebooter
Package rebooter provides utilities used to reboot a machine.
Package rebooter provides utilities used to reboot a machine.
s3util
Package s3util contains utilities for working with the file system.
Package s3util contains utilities for working with the file system.
sdkutil
Package sdkutil provides utilities used to call awssdk.
Package sdkutil provides utilities used to call awssdk.
sdkutil/retryer
Package retryer overrides the default aws sdk retryer delay logic to better suit the mds needs
Package retryer overrides the default aws sdk retryer delay logic to better suit the mds needs
ssm
ssm/anonauth
Package anonauth is an interface to the anonymous methods of the SSM service.
Package anonauth is an interface to the anonymous methods of the SSM service.
ssm/rsaauth
Package rsaauth is an interface to the RSA signed methods of the SSM service.
Package rsaauth is an interface to the RSA signed methods of the SSM service.
ssm/util
Package util contains helper function common for ssm service
Package util contains helper function common for ssm service
task
Package task contains a default implementation of the interfaces in the task package.
Package task contains a default implementation of the interfaces in the task package.
test
Package test contains functions used for tests.
Package test contains functions used for tests.
times
Package times provides a set of utilities related to processing time.
Package times provides a set of utilities related to processing time.
update/processor
Package processor contains the methods for update ssm agent.
Package processor contains the methods for update ssm agent.
update/updater
Package main represents the entry point of the ssm agent updater.
Package main represents the entry point of the ssm agent updater.
updateutil
Package updateutil contains updater specific utilities.
Package updateutil contains updater specific utilities.
vault
Package vault provide interface for data storage.
Package vault provide interface for data storage.
vault/fsvault
Package fsvault implements vault with file system storage.
Package fsvault implements vault with file system storage.
version
Package version contains constants to indicate the current version of the agent.
Package version contains constants to indicate the current version of the agent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL