Difference between revisions of "Service/git"
< Service
Jump to navigation
Jump to search
(→Notes) |
|||
Line 32: | Line 32: | ||
|} | |} | ||
− | === | + | === Database tweaks === |
− | + | To make runtime changes in Gitorious database, follow regular Rails workflow - run {{Code|scripts/console}}: | |
− | |||
− | |||
− | + | cd /srv/gitorious/app | |
− | + | sudo -u gitorious RAILS_ENV=production script/console | |
− | |||
− | |||
− | + | It is regular Ruby console and all feature like {{Code|TAB}} completion work. To tweak Gitorious data, just use its [http://gitorious.org/gitorious/mainline/trees/master/app/models model classes], e.g.: | |
− | |||
− | |||
− | == | + | # search of particular object by its attributes |
− | + | user = User.find_by_login("user") | |
+ | project = User.find_by_title("project") | ||
+ | |||
+ | # change object attributes | ||
+ | project.owner = User.find_by_email("foo@bas") | ||
+ | project.save! | ||
+ | |||
+ | # destroy object and all its dependencies | ||
+ | user.destroy | ||
− | === | + | === Tips === |
− | |||
− | + | # reset user password | |
− | + | user = User.find_by_login("user") | |
− | + | password_key = user.forgot_password! | |
− | + | Mailer.deliver_forgotten_password(user, password_key) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Upgrade notes == | == 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. | 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. |
Revision as of 12:56, 10 November 2010
Hostnames
Hardware
Administrative contact
git AT sugarlabs DOT org
Sysadmins
For non-emergency calls, preferably send email to the administrative contact.
- Aleksey Lim
- puppet related stuff is still in progress of settling down
Notes
Gitorious hosting.
Home | /srv/gitorious
|
---|---|
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 = User.find_by_title("project") # change object attributes project.owner = User.find_by_email("foo@bas") project.save! # destroy object and all its dependencies user.destroy
Tips
# reset user password user = User.find_by_login("user") password_key = user.forgot_password! Mailer.deliver_forgotten_password(user, password_key)
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.