The fastest way to deploy Userify is to choose "Instant Deployment", which provides a simple bash one-line script to paste into your console -- and it really is instant, too.
From there, you can just create your image containing that Userify deployment (i.e., create an AMI if you're using EC2), use a popular configuration management tool like Chef, Puppet, Ansible, or CloudFormation, or even build an RPM or DEB package with your own custom version. Whereever you go, the shim can go too.
Userdata, Chef, or Shell?
UserData input screen at EC2
To install Userify onto a server, we've already created recipes for normal bash installation (at the command line via SSH), Chef, and User Data. (CloudInit is the cross-platform agent that kicks off the UserData script. CloudInit was originally developed by Canonical for Ubuntu and has been implemented so far by Ubuntu, Red Hat, Rackspace, AWS, Docker, CoreOS (compatible), and Digital Ocean.)
Any platform that supports UserData can accept the CloudInit commands, including EC2, Digital Ocean, and Rackspace.
Amazon AWS AMI on EC2
One of the easiest and most durable ways to install the shim is simply to run the installer recipe (shell script) as provided in the console for your server group, just once and then bundle that as an EC2 AMI for your server group.
For example, run the shell script on your baseline AMI for the web server in your web server auto-scaling group and bake it in, and now all of your web servers will have the same configuration and be ready to log into even if you've never logged into them before.
Amazon Autoscaling Group on EC2
As part of the UserData script for EC2 instances in an AWS Auto Scaling Group
(ASG), whether created through the AWS EC2 Console, CloudFormation, Elastic
Beanstalk, or Opsworks, is just to add either the entire cloud-config section
(for new UserData scripts) or just the
runcmd: part of the installation script
if you have an already existing UserData script. This will make Userify an
instant part of your builds from then on. This also works well with Continuous
Integration environments, such as Jenkins and Bamboo.
- OS Package
- PIP Installer
- Configuration Management
Contact email@example.com with questions or implementation ideas.
About the Shim
Userify's shim (extremely lightweight agent) requires almost no resources and is designed to be incredibly reliable, even if Userify itself goes down. You can even modify the source code for the shim or include it in your internal RPM or DEB packages.
How the Shim Works
There are two parts of the Userify installation: creating the agent (readable only by root) in /opt/userify, and setting the agent to start at bootup. Setting the agent to start at bootup is a bit trickier, but the installation process attempts to detect the server type and set it up properly.
Once installed, the shim checks back in every so often to see if there are any updates.
So, that's it -- you've mastered Userify. If you haven't already, go sign up and give it a try!