Bob,
Bob -reposting here on your suggestion from email:
I've made a laundry list of potential/suggested additions to the dhis2tools. I wonder your thoughts on these and if you have considered them before.
dhis2-list-instances
similar to ps command
returns all instances, the tcp port they are running on, their running state have a flag in each directory letting dhis2-tools know if an instance is managed by dhis2-tools, or not. thereby allowing foreign, custom-configured instances to be installed.
dhis2-remove-instance
cleans up user, data bases, /var/lib/dhis2/xx files, crontabs etc
the rm -rf of the dhis2-tools world
nginx auto config for instances
improve nginx setup so that creating an instance optionally adds appropriate lines to the /etc/nginx/sites-enabled/dhis2 script to automatically enable proxying
implement this using a nginx template file, which can further be customised. concat together a new conf file on each run.
nginx http behaviour
install ssi module for nginx by default
install gz module for nginx by default
create a default index.html file for the HTTP requests
create a default directory in HTTP space for option splash screens welcome pages. e.g. see http://www.his.gov.sd
dhis2-instance-* scripts should maintain ssi snip for inclusion into the index.html listing all DHIS2 instances on the system with appropriate links (html to have named
tags for CSS)
(optionally) also make a link to the log files and allow the catalina.out for each instance to be quickly seen on the web (good for training, testing)
(optionally) allow a directory for static files (as emailed earlier) to have a consistent way to deal with the logos, images
dhis2-instance-backup
creates a FULL backup (database, tomcat files etc) for a running DHIS2 instance.
package this up into a tar.gz with meta data files, datetimestamp etc.
optional password encrypt file?
dhis2-instance-restore
allows for restoration of a full working DHIS2 instance file (created by dhis2-instance-backup) to be restored and turned on
allows for one-step re-deployment of instance.
optionally allow instance to be renamed on re-deployment
dhis2-instance-rename
allows a DHIS2 instance to be renamed. changes the name of the associated user, database and web application location
recipe for phppgadmin
users generally want to maintain or have access to the database backend.
what I have done is allow apt-get install phppgadmin to do what it naturally does (install Apache2)
then set Apache2 to a 808x port, then proxy the apache instance via nginx, but warning there are all kinds of URL path problems that may result if users go beyond simple /foo directory proxy.
having this set up allows users to also add any other ubuntu native programs they might like, and, assuming the program is not in / but /foo URL space it should just work.
automate something like this into dhis2-pgadmin-install ??
default php.ini is poorly configured for phppgadmin. It needs to have timeouts and session transfer data size adjusted upwards for things to work.
Set up a consistent way to manage the http_proxy, https_proxy and ftp_proxy environment variables so that wget and git work properly
implies fixing up install.sh
war file deployment script
For training scenarios, on one server, you may want to deploy more than one DHIS2 instance at the same time
currently the dhis2-deploy-war uses the SAME /tmp/dhis2.war filename. therefore if the deploy script is run more than once, the download will step on one another. fix the file name in /tmp so that it is unique.
keep the war file somewhere and before downloaded compare md5 keys. only download if necessary
Bob, Bob -reposting here on your suggestion from email:
I've made a laundry list of potential/suggested additions to the dhis2tools. I wonder your thoughts on these and if you have considered them before.
dhis2-list-instances similar to ps command returns all instances, the tcp port they are running on, their running state have a flag in each directory letting dhis2-tools know if an instance is managed by dhis2-tools, or not. thereby allowing foreign, custom-configured instances to be installed.
dhis2-remove-instance cleans up user, data bases, /var/lib/dhis2/xx files, crontabs etc the rm -rf of the dhis2-tools world
nginx auto config for instances
nginx http behaviour
dhis2-instance-backup
dhis2-instance-restore
dhis2-instance-rename
recipe for phppgadmin
Set up a consistent way to manage the http_proxy, https_proxy and ftp_proxy environment variables so that wget and git work properly
For training scenarios, on one server, you may want to deploy more than one DHIS2 instance at the same time
these need to be broken up into separate issues and triaged. Some useful ideas.
new issues created.