Replaces the ubuntu.py module with more generic linux functions.
Adds additional sources as defined in LINUX_PACKAGE_REPOSITORIES.
Adds the username
For security woven changes the default ssh port.
Disables root and creates a new sudo user as specified by HOST_USER in your settings or your host_string
The normal pattern for hosting is to get a root account which is then disabled.
returns True on success
apt-get install [package]
Install a set of baseline packages and configure where necessary
Get the linux distribution information and return in an attribute dict
The following attributes should be available: base, distributor_id, description, release, codename
For example Ubuntu Lucid would return base = debian distributor_id = Ubuntu description = Ubuntu 10.04.x LTS release = 10.04 codename = lucid
Determine if the default port and user is open for business.
Set some sensible restrictions in Ubuntu /etc/ssh/sshd_config and restart sshd UseDNS no #prevents dns spoofing sshd defaults to yes X11Forwarding no # defaults to no AuthorizedKeysFile %h/.ssh/authorized_keys
uncomments PasswordAuthentication no and restarts sshd
Set the time zone on the server using Django settings.TIME_ZONE
Setup basic ufw rules just for ssh login
Setup ufw app rules from application templates and settings UFW_RULES
apt-get autoremove –purge
Uninstall unwanted packages
apt-get update and apt-get upgrade
Upload and render all templates in the woven/etc directory to the respective directories on the nodes
Only configuration for installed packages will be uploaded where that package creates it’s own subdirectory in /etc/ ie /etc/apache2.
For configuration that falls in some other non package directories ie init.d, logrotate.d etc it is intended that this function only replace existing configuration files. To ensure we don’t upload etc files that are intended to accompany a particular package.
Upload your ssh key for passwordless logins