Project:Planet/Administration

Instructions for Planet and Blogs administrators

Planet configuration files
The software that powers Planet and Universe is Venus. It consists of the python code, a config file (which consists of the site info and the list of the users aggregated) and the theme. It then parses the feed URLs and creates a static HTML page. Planet and Universe configs are stored in a git repository. The configs include the venus software configs, the Gentoo theme for venus, and the configs with the users. The git repository is here. A more detailed explanation about its structure:


 * archives: contains the index.php files that create and show the archives html files
 * configs: the actual venus config files. the scripts/update-venus cron job merges all the files in that dir into two big files, one for planet and one for universe, named venus.{planet,universe}.ini
 * base/: site information
 * planet/ universe/: each user's information


 * media: static css and image files
 * scripts:
 * adduser.py: helper script to add new user
 * gravatar.py: produces email md5 as requested by gravatar
 * update-venus: the cron job that updates the site content,


 * templates: the gentoo venus theme

In case you want to perform a local install for testing, the following steps are sufficient:


 * emerge -av venus
 * webapp-config -I -h blogs.gentoo.org venus version
 * git clone git://git.overlays.gentoo.org/proj/planet-gentoo.git /var/www/planet.gentoo.org/
 * sh /var/www/planet.gentoo.org/planet-gentoo/scripts/update-venus (This will create the necessary symlinks and create the appropriate configs for planet)

Blogs configuration
The software that powers Gentoo Blogs is WordPress, using its Network feature to support multiple blogs in a single installation. Furthermore, we store the wp-content/{plugins,themes} dirs in a git repository, so that blogs admins can easily install/update them.

The WP Network supports a Super Admin, who can enable / disable plugins, create / delete users and blogs. Furthermore, each user can also be an admin of his own blog (or more than one). Any configuration (users, blogs, permissions, plugins etc) will be done through the admin web panel, which you can enter by typing http://blogs.gentoo.org/wp-admin (for the topdir's one), or http://blogs.gentoo.org/$user/wp-admin to enter someone else's admin panel (which you should avoid).

...in planet
To add a new user in planet, either create the config by hand (under configs/{planet,universe}/nickname) or use the adduser.py script. Always check the results of the script before committing your changes though.

...in blogs
Go to https://blogs.gentoo.org/wp-admin/network/ -> Sites -> Add New on the left menu. Fill in the blanks, and the system will create a new blog, and if the admin email doesn't exist (which should not), a new user with the same name as the blog will be created. The user will get an email with his password.

An additional step is required though. In order to enable wp-stats for the user, you need to go to  (change the USER with a valid username) and add the wp API Key. If you don't know it, ask for it from an infra or a planet team member.

...from planet
To remove a user from planet/universe, just git rm his config(s)

...from blogs
We NEVER delete content from blogs.g.o. What should be done is to set a new random password at his account, and disable comments for every post. For the first go to Super Admin -> Users. Below is a python script that generates random strings:

random password generator in python

To disable the comments in all posts, ask an infra guy to run the following SQL command (blog ID can be found under Super Admin -> Sites):

Disable comments in all posts of a specific blog

Adding a new plugin/themes
To add a new plugin/theme, first commit it in the blogs-gentoo git repo, and then ask from an infra guy to run git pull in. For plugins, go to admin panel go to Plugins -> Plugins and Network Activate it. For themes, go to Super Admin -> Themes and Enable it.

Removing a plugin/theme
To remove a plugin, go to Plugins -> Plugins and deactivate it. To remove a theme, go to Super Admin -> Themes and Disable it. Then, remove the plugin/theme from the git repository and ask from an infra guy to update the clone on the server. Finally, verify it is removed completely.

Acknowledgements
We would like to thank the following authors and editors for their contributions to this guide:


 * tampakrap