_ _ _ David McNett _ __ ___| |_ ___| | _____| | | '_ \ / _ \ __/ __| |/ / _ \ | http://macnugget.org/ | | | | __/ |_\__ \ < __/ | |_| |_|\___|\__|___/_|\_\___|_| netskel environment synchronizer INTRODUCTION netskel is an http(s) based file synchronization tool which can be used to mirror a central repository of files to multiple UNIX shell accounts. It was built to create a simple and automated mechanism for users to push out their various shell environment config files to all the machines where they have shell accounts. In particular it's useful for pushing out a common .cshrc, .bashrc, or ssh authorized_keys file to all your hosts. Using netskel will allow you to make centralized changes and updates to your unix enviornment without suffering through the tedium of applying those changes to the multitude of hosts where you have an account. Multiple users (repositories) can all use the same server. REQUIREMENTS The client-side code is written is vanilla bourne shell (/bin/sh) and relies on as few local binaries as possible. This means that you can reliably use netskel not just on your crazy, bleeding-edge, high-zoot, dev-branch Linux hosts but also on your "salt of the earth" SunOS and HPUX accounts that haven't seen new software in a decade. The server side is implemented in php, but it's quite lightweight and doesn't need a database or any fancy php modules. It does expect apache to be set with AllowOverrides and to have a working mod_rewrite module (see .htaccess). You'll also need to have this installed on a server which is accessible via http (proxying should be fine) to all the machines you wish to use as netskel clients. INSTALLATION 1. Place these files in a web-accessible directory with a static URL. Edit the .htaccess file and set the RewriteBase line to correspond to the externally-visible path to your install directory. So, if you're installing the files to http://www.example.com/~user/netskel/ you'd want to set the RewriteBase to /~user/netskel/ 2. create a "db" directory. 3. create a directory named after your desired username. It is not necessary that this username match the unix account name on a client machine. 4. Create any files you wish to sync within this ./db/username/ directory. For example, mine contains something like this: ./db/nugget/.cshrc ./db/nugget/.vimrc ./db/nugget/.ssh/authorized_keys 5. Make sure the permissions on the db tree allow your web server to read them. 6. Now we have to "prime" the first netskel client host by grabbing a custom copy of the netskel client shell script. Do this by downloading the file at an URL resembling this: http://www.example.com/netskel_directory/username/bin/netskel This will emit a configured script for your configuration. Stick that in ~/bin/ on your remote host. 7. Now run a "netskel init" to set up the netskel working directory and add netskel to your local crontab (to run a sync nightly at midnight). 8. Lastly, do a full sync to grab all the files in your netskel repository by running "netskel sync". 9. Once you've got a netskel client host that's successfully synchronizing with your server, it's really simple to propogate netskel out to other hosts. Just issue a "netskel push <hostname>" from a configured netskel machine to replicate the sync client onto that second hostname. This is done via ssh, so it's presumed you can ssh from host a to host b.