< Service
Revision as of 23:29, 22 November 2010 by Alsroot (talk | contribs) (→‎Notes)




Administrative contact

git AT sugarlabs DOT org


For non-emergency calls, preferably send email to the administrative contact.

  • Aleksey Lim
  • puppet related stuff is still in progress of settling down


Gitorious hosting.

Home /srv/gitorious
Logs /srv/gitorious/app/log
Main service gitorious-all

Database tweaks

To make runtime changes in Gitorious database, follow regular Rails workflow - run scripts/console:

cd /srv/gitorious/app
sudo -u gitorious RAILS_ENV=production script/console

It is regular Ruby console and all feature like TAB completion work. To tweak Gitorious data, just use its model classes, e.g.:

# search of particular object by its attributes
user = User.find_by_login("user")
project = Project.find_by_title("project")

# get object attributes

# change object attributes
project.owner = User.find_by_email("foo@bar")!

# destroy object and all its dependencies


# reset user password
user = User.find_by_email("user")
password_key = user.forgot_password!
Mailer.deliver_forgotten_password(user, password_key)

# add repository committer
committer = User.find_by_login("user")
repo = Repository::find_by_path("sugar/mainline")
repo.committerships.create_with_permissions!({:committer => committer}, (Committership::CAN_COMMIT))

# delete repository committer
committer = User.find_by_login("user")
repo = Repository::find_by_path("sugar/mainline")
repo.committerships = {|i| !i.members.include? committer }

# change repository owner
new_owner = User.find_by_login("user")
repo = Repository::find_by_path("sugar/mainline")
cs = {|i| i.committer == new_owner}.pop
cs.permissions = (Committership::CAN_ADMIN | Committership::CAN_COMMIT | Committership::CAN_REVIEW)!
repo.owner = new_owner!

# move repository to another project
new_project = Project.find_by_title('sl-tweaks')
repo = Repository::find_by_path("sat-solver/mainline")
repo.project = new_project = "sat-solver"!

Upgrade notes

Upgrade will be triggered on every puppet session (if there is such need), vcs repository will be rebased to the HEAD commit with all related changes like database migration.