Readme
Gitolite Juju Charm
Copyright 2011 by Chris Hardee
<shazzner@gmail.com>
1. Overview
This is the juju charm for deploying Gitolite/Gitweb. It initially deploys Gitolite which is fine if you want a secure git server.
One may optionally install Gitweb, which will install apache and create a /gitweb page accessable from your browser.
2. Getting Started
To get started, simply copy your public key into the config file and set the initial user (which can be left as default).
If you don't have a keypair generated, it's absoluately needed for Gitolite to function. Run this command to generate a keypair:
ssh-keygen -t dsa
I don't have an easy script to copy your pub key to the config file (if someone does let me know and I'll add it here), but you can cat out your key:
cat ~/.ssh/id_dsa.pub
Then copy the output into your config.yaml on the pubkey: default: line.
If you'd like to install Gitweb, change the setting to Default: True under the Install-Gitweb option in the config.yaml.
Lastly, if you'd like for initial admin repos to be viewable from Gitweb change show-admin-repositories to true. This is usually not a good idea.
I left it for testing to make sure Gitweb was working and some people whom don't have issues (like on an intranet I suppose).
Keep in mind without that, no repositories will be shown in Gitweb after initial deployment, they must be made viewable from the gitolite-admin repository.
Check the documentation on how to do that.
Gitweb can also be setup post installation by going:
juju set gitolite install-gitweb="true"
Also note that during installation your public key will be deleted off the deployed server.
After deployment you'll need to expose the service, this isn't needed for just Gitolite but very much needed for Gitweb.
Run juju status to find out the public-address of your newly created gitolite server.
3. Using Gitolite
After deploying Gitolite you can clone the admin repository with this command (assuming you didn't change the initial user):
git clone gitolite@<public address>:gitolite-admin
If you receive a message like bad-keypair or something, then unfortunately your key didn't copied correctly or you're trying to connect from a computer without that key.
At this time there isn't a way to automatically switch keys, so you'll either have to ssh into it and manually run the setup script (check the charm install script on how-to) or delete the key and redeploy.
If the gitolite-admin clone works, then feel free to delete your kind in the config.yaml as it's no longer needed.
After which consult the Gitolite documentation on how to add additional keys and make new repositories:
http://sitaramc.github.com/gitolite/support.html
4. Contact
Any additional features or suggestions can be emailed to me or filed a bug report against.
4. TODOs
Some features I'm currently mulling about adding:
Distributed file system support ie. Ceph or Hadoop
Config settings for Gitweb themes
Gitlab support (will probably be a separate charm)
Anything else, let me know!
Changes
| 2012/04/06 Chris Hardee Fixed issues as per Clint Byrum suggestions, thanks Clint (revno 19) |
| 2012/03/26 Chris Hardee forgot to blank key (revno 18) |
| 2012/03/26 Chris Hardee needed quotes around bool values (revno 17) |
| 2012/03/26 Chris Hardee typo (revno 16) |
| 2012/03/26 Chris Hardee Added start/stop for apache (revno 15) |
| 2012/03/26 Chris Hardee Added checks for config (revno 14) |
| 2012/03/26 Chris Hardee Added instructions in readme (revno 13) |
| 2012/03/22 Chris Hardee Added config option and interface in metadata for gitweb
(revno 12) |
| 2012/03/21 Chris Hardee Gitweb working out of the box now, need to add full configurations etc
(revno 11) |