anyMeta VM configuration commands

Here's an overview over pre-defined function macros to configure anyVM. They are defined in /usr/local/bin/remotecfg-lib.sh which is sourced for the anyVM root user in /root/.bashrc.

These commands are used for remote-configuration. - You can re-run remotecfg.sh which downloads [.., parses, filters and executes,..] a script from https://anyvm.test.mediamatic.nl/admin.php1)

You can also execute these commands manually on a ssh-terminal or the local console. There is an user-interface that can guide you trough some common tasks: anyconfig.sh - but that's work in progress (May 31 2008).

anyconfig screenshot

Overview of commands

CommandDescriptionComments
start_mysql launches mysql server if it is not already running.
start_xmpp starts jabber and idavoll daemons FIXME: does not check if they're already running
add_hostname <hostname> adds a 127.0.0.1 entry to /etc/hosts
set_apache_envdb <DB_DSN> [apache-config-file] replaces ANY_DB_DSN in an apache config file
ddns_add <vhostname> makes a new <name>.dev.mediamatic.nl DNS record at 83.98.140.3
ddns_del <vhostname> delete this vhost's IP from <name>.dev.mediamatic.nl
ddns_purge <vhostname> removes all entries for <name>.dev.mediamatic.nl
add_apache_vhost <vhostname> creates a new apache-vhost config from template.
mysql_curl_db <ProjectKey> [dbname] download database from server and apply it to dbname. dbname needs to exist (use add_apache_vhost or create_new_default_db) Note: launches mysqld if needed
mysql_create_db <dbname> <username> <password> Note: launches mysqld if needed
mysql_dump_upload <dbname> [ProjectKey] dumps the database and uploads it to server
mysql_reset_sysadmin <dbname> Interactively change the sysadmin password.
mysql_patch_db <dbname> [vhostname] [URI] [PORT] [EMAIL-OVERRIDE]
mysql_patch_product <ProjectKey> [dbname] [vhostname]
create_new_default_db <dbname>
add_vhost <vhostname> [dbname] Note: calls a couple of the above functions.
anymeta_disable_setup disables anymeta setup: chmod 0 /var/www/www/setup (use for live sites)
a2ensite <vhostname> enable apache vhost apache2 tool
a2dissite <vhostname> disable apache vhost apache2 tool
apache2ctl <command> apache2 tool
..

Manual

more details to come..

DDNS

DNS admin is still a manual job.

Note: added DNS entries are accumulated - the default TTL is 3600 (1hour). If there are more DNS of the same vhost they use round-robin DNS. → ddns_purge or make sure to ddns_del - TODO: cronjob, easydns DBUS or DHCP integration..

1) Not all of the listed commands are available in a remote-config script. see /usr/local/bin/remotecfg.sh it uses an awk regexp filter and bash eval. - The set of remote commands is bound to change in the near future.
 
wiki/mm/anyrcfg.txt · Last modified: 01.06.2008 21:13 by rgareus