From Gentoo Wiki
Jump to:navigation Jump to:search

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:
    • helper script to add new user
    • 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 venus version
  • git clone git:// /var/www/
  • sh /var/www/ (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 (for the topdir's one), or$user/wp-admin to enter someone else's admin panel (which you should avoid).

Adding users planet

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

Go to -> 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';
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/ . 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
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.