The below code snippet was used to add SSH users to RackSpace cloud CentOS Linux nodes being used as application servers and managed via RightScale. The SSH users were required during a testing phase so they could look through logs and make modifications to specific configuration files, etc. There are three things that have to happen to create the SSH user, allow them to login, and provide them the necessary rights on the server to accomplish their tasks which include adding the user, modifying the sshd config to allow password logins, and update the sudoers file to enable sudo access for wheel group users.
Recently I was working on a project that was using RightScale to manage RackSpace cloud nodes. One of the requirements of the project was to have application nodes scale automatically thus they were required to automatically install software, configure settings, and start services automatically on the RackSpace CentOS nodes being used. Most everything was fairly straight forward however some of the services we were using would not start properly and initially because of the lack of logging from the services we were unable to figure out what the problem was. Below I describe the problem in more detail along with the solution which involved updating a configuration file on the CentOS Linux servers and then restarting the services.
Recently while working on some node or instance automation using RightScale I needed to have some extra iptables rules created automatically when a new node booted. Initially I was just trying to do this via iptables commands which I note below but it would never work. After digging through the logs I realized that the iptables commands created by RightScale for the ServerTemplate I was using flushed iptables at the very end of the boot process and thus wiped out the iptables entries created by the RightScript I had created. To accomplish permanent iptables entries for a RackSpace node via RightScale you need to output the iptables command to a file in the location where the boot process picks them up after flushing the current ruleset. Below I describe my first attempt followed by the correct way to have iptables entries picked up by RightScale.