Project:Planet/Administration

From Gentoo Wiki
Jump to:navigation Jump to:search

Instructions for Planet and Blogs administrators

Introduction

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://anongit.gentoo.org/sites/planet.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).

Adding users

...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.

Removing users

...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.

To disable the comments in all posts, perform a bulk edit on all posts changing Comments and Pings to Do not allow. Alternatively, ask an infra guy to run the following SQL command (blog ID can be found under Super Admin -> Sites):

CODE Disable comments in all posts of a specific blog
UPDATE wp_ID_posts SET comment_status='closed', ping_status='closed' WHERE comment_status='open' OR ping_status='open';
Important
The above actions should be taken either by a user request, or when the planet team is CC'd at a developer retirement bug

After completion add [retired] to the end of the last name. This is done so that from the workflow perspective the planet team is aware that all actions have been completed.

Updating plugins/themes in Wordpress

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 /var/www/blogs.gentoo.org/blogs-gentoo . 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.


This page is based on a document formerly found on our main website gentoo.org.
The following people contributed to the original document: Theo Chatzimichos (tampakrap)
They are listed here because wiki history does not allow for any external attribution. If you edit the wiki article, please do not add yourself here; your contributions are recorded on each article's associated history page.