Available commands and how to use them¶
Commands are separated into two grops:
- Project: commands for setting up and managing Plone/Python projects
- Server: commands for setting up and managing servers
Project commands¶
- niteoweb.fabfile.project.configure_nginx(shortname=None)[source]¶
Upload Nginx configuration for this site to /etc/nginx/sites-available and enable it so it gets included in the main nginx.conf.
- niteoweb.fabfile.project.download_code(shortname=None, prod_user=None, svn_params=None, svn_url=None, svn_repo=None, svn_dir=None)[source]¶
Pull project code from code repository.
- niteoweb.fabfile.project.enable_nginx_config(shortname=None)[source]¶
Make a link from sites-available/ to sites-enabled/ and reload Nginx.
- niteoweb.fabfile.project.prepare_buildout(prod_user=None, python_version=None, production_cfg=None)[source]¶
Prepare zc.buildout environment so we can use bin/buildout -c production.cfg to build a production environment.
- niteoweb.fabfile.project.run_buildout(prod_user=None, production_cfg=None)[source]¶
Run bin/buildout -c production.cfg in production user’s home folder on the production server.
- niteoweb.fabfile.project.start_supervisord(prod_user=None)[source]¶
Start supervisord process monitor which in turn starts Zope and optionally others (Varnish, HAProxy, etc.).
- niteoweb.fabfile.project.upload_blobs(prod_user=None, path=None)[source]¶
Upload BLOB part of Zope’s data to the server.
- niteoweb.fabfile.project.upload_nginx_config(shortname=None, nginx_conf=None)[source]¶
Upload Nginx configuration to /etc/nginx/sites-available.
Server commands¶
- niteoweb.fabfile.server.add_to_bacula_master(shortname=None, path=None, bacula_host_string=None)[source]¶
Add this server’s Bacula client configuration to Bacula master.
- niteoweb.fabfile.server.configure_bacula_client(path=None)[source]¶
Upload configuration for Bacula File Deamon (client) and restart it.
- niteoweb.fabfile.server.configure_bacula_master(path=None)[source]¶
Upload configuration files for Bacula Master.
- niteoweb.fabfile.server.configure_egg_cache()[source]¶
Configure a system-wide egg-cache so we have a local cache of eggs that we use in order to add speed and reduncancy to zc.buildout.
- niteoweb.fabfile.server.configure_hetzner_backup(duplicityfilelist=None, duplicitysh=None)[source]¶
Hetzner gives us 100GB of backup storage. Let’s use it with Duplicity to backup the whole disk.
- niteoweb.fabfile.server.configure_nginx(nginx_conf=None)[source]¶
Upload Nginx configuration and restart Nginx so this configuration takes effect.
- niteoweb.fabfile.server.configure_postgres()[source]¶
Upload Postgres configuration from etc/ and restart the server.
- niteoweb.fabfile.server.configure_racoon(racoonconf=None, psktxt=None)[source]¶
Upload racoon configuration files and restart the service.
- niteoweb.fabfile.server.create_admin_account(admin, default_password=None)[source]¶
Create an account for an admin to use to access the server.
- niteoweb.fabfile.server.create_admin_accounts(admins=None, default_password=None)[source]¶
Create admin accounts, so admins can access the server.
- niteoweb.fabfile.server.create_project_user(prod_user)[source]¶
Add a user for a single project so the entire project can run under this user.
- niteoweb.fabfile.server.create_projects_group()[source]¶
Create a group that will hold all project users -> users that are dedicated for running one project.
- niteoweb.fabfile.server.disable_root_login()[source]¶
Disable root login for even more security. Access to root account is now possible by first connecting with your dedicated maintenance account and then running sudo su -.
- niteoweb.fabfile.server.generate_selfsigned_ssl(hostname=None)[source]¶
Generate self-signed SSL certificates and provide them to Nginx.
- niteoweb.fabfile.server.install_bacula_client()[source]¶
Install and configure Bacula backup client, which listens for instructions from Bacula master and backups critical data when told to do so.
- niteoweb.fabfile.server.install_ipsec(racoonconf=None, psktxt=None, server_ip=None)[source]¶
Install and configure IPsec server.
- niteoweb.fabfile.server.install_munin_node(add_to_master=True)[source]¶
Install and configure Munin node, which gathers system information and sends it to Munin master.
- niteoweb.fabfile.server.install_mysql(default_password=None)[source]¶
Install MySQL database server.
- niteoweb.fabfile.server.install_nginx(nginx_conf=None)[source]¶
Install and configure Nginx webserver.
- niteoweb.fabfile.server.install_php()[source]¶
Install FastCGI interface for running PHP scripts via Nginx.
- niteoweb.fabfile.server.install_postgres()[source]¶
Install and configure Postgresql database server.
- niteoweb.fabfile.server.install_sendmail(email=None)[source]¶
Prepare a localhost SMTP server for sending out system notifications to admins.
- niteoweb.fabfile.server.install_system_libs(additional_libs=None)[source]¶
Install a bunch of stuff we need for normal operation such as gcc, rsync, vim, libpng, etc.
- niteoweb.fabfile.server.install_ufw(rules=None)[source]¶
Install and configure Uncomplicated Firewall.
- niteoweb.fabfile.server.install_unattended_upgrades(email=None)[source]¶
Configure Ubuntu to automatically install security updates.