Install with RubyGems
If can install sonic via RubyGems:
gem install sonic-screwdriver
You can also add sonic to your Gemfile in your project if you are working with a ruby project. It is not required for your project to be a ruby project to use sonic.
Install with Bolts Toolbelt
If you want to install sonic without having to worry about sonic’s ruby dependency you can simply install the Bolts Toolbelt which has sonic included.
brew cask install boltopslabs/software/bolts
For more information about the Bolts Toolbelt or to get an installer for another operating system visit: https://boltops.com/toolbelt
Server Side Dependencies
For a small set of the commands there are server side dependencies.
sonic ecs-* dependencies
sonic ecs-* commands to work
jq is required on the server side. This is covered in the How It Works section.
One way to install
jq quickly is by using the
sonic execute command. For example:
sonic execute hi-web-stag yum install -y jq
It is recommended that you install
jq with the UserData script or bake it into the AMI though.
sonic execute dependencies
sonic execute works alongside Amazon EC2 Run Command. So it is required to be installed on the servers for
sonic execute to work.
Amazon EC2 Run Manager Installation
Installing the EC2 Run Manager agent on your Linux servers is super simple and is only one command.
sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
The full recommended instructions are on the official Amazon EC2 Systems Manager Install SSM Agent documentation.
The trickiest part of installing is likely making sure that the agent on the server has successfully checked into the SSM service. Verify it by tailing
If you are having issues, it is most likely IAM issues. Amazon also provides Configuring Security Roles docs to fix any IAM issues.
You can verify the instances that have successfully checked into SSM with
aws ssm describe-instance-information:
aws ssm describe-instance-information --output text --query "InstanceInformationList[*]"
Here’s an example of the output:
$ aws ssm describe-instance-information --output text --query "InstanceInformationList[*]" 2.0.822.0 ip-10-10-41-38 10.10.41.38 i-030033c20c54bf149 True 1497482505.12 Online Amazon Linux AMI Linux 2017.03 EC2Instance 2.0.822.0 ip-10-10-110-135 10.10.110.135 i-0f7f833131a51ce35 True 1497482686.53 Online Amazon Linux AMI Linu2016.09 EC2Instance $
More information is provided in the AWS Run Command Walkthrough Using the AWS CLI.
Pro tip: Use the <- and -> arrow keys to move back and forward.