As soon as I login to an Aegir-up VM, I'll usually set some bash aliases, global username and email for Git, copy an ssh key so I can push to git.d.o easier, etc.

These kinds of things should be easy to maintain (under version control) across all projects.

Comments

ergonlogic’s picture

I guess these should live in /home/<username>/.aegir-up

ergonlogic’s picture

SO far, I'm thinking of adding a user and their group, and optionally copying the user's:

  • .bashrc
  • .vimrc
  • .bash_aliases
  • public ssh key

Then generating .bash_servers, and adding global Git username & email.

What else should go in there?

gboudrias’s picture

I can't really think of anything else. However, since you're thinking of putting these in ~/.aegir-up though, you might as well just (optionally) import everything in there into /home/vagrant, no?

ergonlogic’s picture

Version: 6.x-1.6-beta5 » 6.x-1.7-beta1
Status: Active » Fixed

I decided not to touch the vagrant user at this point, as it could cause some complications with login/authentication, which in turn could interfere with provisioning.

Otherwise this is pretty complete. I wrote a script, lib/scripts/aegir-up-user.sh, that generates a ~/.aegir-up file. The aegir-up-init.sh script reads that file, if it exists, and copies the appropriate files into the project tree, where they're accessible to Puppet from within the VM(s). It also writes some variables to settings.rb and manifests/hm.pp. Then, during provisioning, Puppet creates the user, group and home folder, then copies the files in.

The variable for the username in settings.rb currently remains commented-out. Otherwise, Vagrant tries to provision using the custom user, who doesn't currently have password-less universal sudo. Un-commenting this username allows 'vagrant ssh' directly as the custom user. Commenting it back out is required to run 'vagrant provision' though.

I'm considering a set of custom commands to work around some of this (e.g., aegir-up provision, aegir-up ssh, etc.) but either way, I'll treat it in another issue, as I feel this one is complete.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.