==== TODO ====
-
use format_html_join for orchestration email alerts
-
enforce an emergency email contact and account to contact contacts about problems when mailserver is down
-
add
BackendLog
retry action -
webmail identities and addresses
-
Permissions .filter_queryset()
-
env vars instead of multiple settings files: https://devcenter.heroku.com/articles/config-vars ?
-
backend logs with hal logo
-
help_text on readonly_fields specialy Bill.state. (eg. A bill is in OPEN state when bla bla )
-
order.register_at @property def register_on(self): return order.register_at.date()
-
mail backend related_models = ('resources__content_type') ??
-
Maildir billing tests/ webdisk billing tests (avg metric)
-
when using modeladmin to store shit like self.account, make sure to have a cleanslate in each request? no, better reuse the last one
-
jabber with mailbox accounts (dovecot mail notification)
-
rename accounts register to "account", and reated api and admin references
-
AccountAdminMixin auto adds 'account__name' on searchfields
-
What fields we really need on contacts? name email phone and what more?
-
DOC: Complitely decouples scripts execution, billing, service definition
-
init.d celery scripts -# Required-Start: $network $local_fs $remote_fs postgresql celeryd -# Required-Stop: $network $local_fs $remote_fs postgresql celeryd
-
regenerate virtual_domains every time (configure a separate file for orchestra on postfix)
-
Backend optimization
- fields = ()
- ignore_fields = ()
- based on a merge set of save(update_fields)
-
proforma without billing contact?
-
print open invoices as proforma?
-
env ORCHESTRA_MASTER_SERVER='test1.orchestra.lan' ORCHESTRA_SECOND_SERVER='test2.orchestra.lan' ORCHESTRA_SLAVE_SERVER='test3.orchestra.lan' python3 manage.py test orchestra.contrib.domains.tests.functional_tests.tests:AdminBind9BackendDomainTest --nologcapture --keepdb
-
ForeignKey.swappable
-
REST PERMISSIONS
-
Databases.User add reverse M2M databases widget (like mailbox.addresses)
-
Make one dedicated CGI user for each account only for CGI execution (fpm/fcgid). Different from the files owner, and without W permissions, so attackers can not inject backdors and malware.
-
resource min max allocation with validation
-
domain validation parse named-checzone output to assign errors to fields
-
Directory Protection on webapp and use webapp path as base path (validate)
-
webapp backend option compatibility check? raise exception, missconfigured error
-
Resource used_list_display=True, allocated_list_displat=True, allow resources to show up on list_display
-
BackendLog.updated_at (tasks that run over several minutes when finished they do not appear first on the changelist) (like celery tasks.when)
-
Create an admin service_view with icons (like SaaS app)
-
prevent @pangea.org email addresses on contacts, enforce at least one email without @pangea.org
ln -s /proc/self/fd /dev/fd
- Generate a password-less ssh key, and copy it to the servers you want to orchestrate. ssh-keygen ssh-copy-id root@
Php binaries should have this format: /usr/bin/php5.2-cgi
- logs on panel/logs/ ? mkdir ~webapps, backend post save signal?
- and other IfModule on backend SecRule
Orchestra global search box on the page head, based https://github.com/django/django/blob/master/django/contrib/admin/options.py#L866 and iterating over all registered services and inspectin its admin.search_fields
-
contain error on plugin missing key (plugin dissabled): NOP, fail hard is better than silently, perhaps fail at starttime? apploading machinary
-
contact.alternative_phone on a phone.tooltip, email:to
-
make sure that you understand the risks
-
full support for deactivation of services/accounts
- Display admin.is_active (disabled account special icon and order by support)
-
lock resource monitoring
-
-EXecCGI in common CMS upload locations /wp-upload/upload/uploads
-
cgi user / pervent shell access
-
prevent stderr when users exists on backend i.e. mysql user create
-
disable anonymized list options (mailman)
-
tags = GenericRelation(TaggedItem, related_query_name='bookmarks')
-
user provided crons
-
$moodle_host = $SERVER[‘HTTP_HOST’]; require_once(‘/etc/moodles/’.$moodle_host.‘config.php’);``` moodle/drupla/php-list multi-tenancy
-
make account available on all admin forms
-
more robust backend error handling, continue executing but exit code > 0 if failure: failing_cmd || exit_code=1 and don't forget to call super.commit()!!
-
website directives uniquenes validation on serializers
- is_Active custom filter with support for instance.account.is_Active annotate with F() needed (django 1.8)
- document service help things: discount/refound/compensation effect and metric table
- Document metric interpretation help_text
- document plugin serialization, data_serializer?
- Document strong input validation
* budgets: no undo feature
-
Autocomplete admin fields like <site_name>.phplist... with js
-
allow empty metric pack for default rates? changes on rating algo
-
payment methods icons
-
use server.name | server.address on python backends, like gitlab instead of settings?
-
TODO raise404, here and everywhere
-
update service orders on a celery task? because it take alot
FIXME do more test, make sure billed until doesn't get uodated whhen services are billed with les metric, and don't upgrade billed_until when undoing under this circumstances
* line 513: change threshold and one time service metric change should update last value if not billed, only record for recurring invoicing. postpay services should store the last metric for pricing period.
-
move normurlpath to orchestra.utils from websites.utils
-
write down insights
-
websites directives get_location() and use it on last change view validation stage to compare with contents.location and also on the backend ?
-
modeladmin Default filter + search isn't working, prepend filter when searching
-
create service help templates based on urlqwargs with the most basic services.
mkdir locale django-admin.py makemessages -l ca django-admin.py compilemessages -l ca
https://docs.djangoproject.com/en/1.7/topics/i18n/translation/#joining-strings-string-concat
from django.utils.translation import ugettext from django.utils import translation translation.activate('ca') ugettext("Description")
- saas validate_creation generic approach, for all backends. standard output
create orchestrate databases.Database pk=1 -n --dry-run | --noinput --action save (default)|delete --backend name (limit to this backend) --help
-
postupgradeorchestra send signals in order to hook custom stuff
-
gevent is not ported to python3 :'(
https://code.djangoproject.com/ticket/24576
FIXME what to do when deleting accounts? set fk null and fill a username charfield? issues, invoices.. we whant all this to go away?
-
implement delete All related services
-
read https://docs.djangoproject.com/en/dev/releases/1.8/ and fix deprecation warnings
-
create nice fieldsets for SaaS, WebApp types and services, and helptexts too!
-
replace make_option in management commands
- Use the new django.contrib.admin.RelatedOnlyFieldListFilter in ModelAdmin.list_filter to limit the list_filter choices to foreign objects which are attached to those from the ModelAdmin.
- Query Expressions, Conditional Expressions, and Database Functions¶
-
forms: You can now pass a callable that returns an iterable of choices when instantiating a ChoiceField.
-
move all tests to django-orchestra/tests
-
*natural keys: those fields that uniquely identify a service, list.name, website.name, webapp.name+account, make sure rest api can not edit thos things
-
MultiCHoiceField proper serialization
-
replace unique_name by natural_key?
-
do not require contact or create default
-
abstract model classes that enabling overriding, and ORCHESTRA_DATABASE_MODEL settings + orchestra.get_database_model() instead of explicitly importing from orchestra.contrib.databases.models import Database.. (Admin and REST API are fucked then?)
- joomla: wget https://github.com/joomla/joomla-cms/releases/download/3.4.1/Joomla_3.4.1-Stable-Full_Package.tar.gz -O - | tar xvfz -
if 'wsgi' in sys.argv and settings.TASKS_ENABLE_UWSGI_CRON_BEAT:
import uwsgi
def uwsgi_beat(signum):
print "It's 5 o'clock of the first day of the month."
uwsgi.register_signal(99, '', uwsgi_beat)
uwsgi.add_timer(99, 60)
-
wake up django mailer on send_mail
from orchestra.contrib.tasks import task import time, sys @task(name='rata') def counter(num, log): for i in range(1, num): with open(log, 'a') as handler: handler.write(str(i)) sys.stderr.write('hola\n') time.sleep(1) counter.apply_async(10, '/tmp/kakas')
-
Provide some fixtures with mocked data
TODO http://wiki2.dovecot.org/HowTo/SimpleVirtualInstall TODO http://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix TODO mount the filesystem with "nosuid" option
- uwse uwsgi cron: decorator or config cron = 59 2 -1 -1 -1 %(virtualenv)/bin/python manage.py runmyfunnytask
smtplib.SMTPConnectError: (421, b'4.7.0 mail.pangea.org Error: too many connections from 77.246.181.209')
virtdomains file is not ideal, prevent user provided fake/error domains there! and make sure to chekc if this file is required!
orchestra-beat support for uwsgi cron
make django admin taskstate uncollapse fucking traceback, ( if exists ?)
backend.context and backned.instance provided when an action is called? like forms.cleaned_data: do it on manager.generation(backend.context = backend.get_context()) or in backend.getattr ? also backend.head,tail,content switching on manager.generate()?
resorce monitoring more efficient, less mem an better queries for calc current data
bill this https://orchestra.pangea.org/admin/orders/order/8236/ should be already billed, <= vs <
apt-get install cython3 export CYTHON='cython3' pip3 install https://github.com/fantix/gevent/archive/master.zip
SIgnal handler for notify workers to reload stuff, like resource sync: https://docs.python.org/2/library/signal.html
uwsgi hot reload? http://uwsgi-docs.readthedocs.org/en/latest/articles/TheArtOfGracefulReloading.html
method( arg, arg, arg)
Bash/Python/PHPController
import uwsgi from uwsgidecorators import timer from django.utils import autoreload
@timer(3) def change_code_gracefull_reload(sig): if autoreload.code_changed(): uwsgi.reload()
kill -HUP cat /tmp/project-master.pid
uwsgi --reload /tmp/project-master.pid
touch /tmp/somefile
serailzer self.instance on create.
- check certificate: websites directive ssl + domains search on miscellaneous
- backendLog store method and language... and use it for display_script with correct lexer
@register.filter def comma(value): value = str(value) if '.' in value: left, right = str(value).split('.') return ','.join((left, right)) return value
reporter.stories_filed = F('stories_filed') + 1 reporter.save() In order to access the new value that has been saved in this way, the object will need to be reloaded: https://docs.djangoproject.com/en/dev/ref/models/conditional-expressions/ Greatest Colaesce('total', 'computed_total') Case
Resource inline links point to custom changelist view that preserve state (breadcrumbs, title, etc) rather than generic changeview with queryarg filtering
- This is beta software, please test thoroughly before putting into production and report back any issues.
deploy --dev deploy.sh and deploy-dev.sh autoupgrade
short URLS: https://github.com/rsvp/gitio
link backend help text variables to settings/#var_name
mkhomedir_helper or create ssh homes with bash.rc and such
replace show emails by https://docs.python.org/3/library/email.contentmanager.html#module-email.contentmanager
- remove welcome box on dashboard?
validate_user on saas.wordpress to detect if username already exists before attempting to create a blog
get_context signal to overridaconfiguration? best practice: all context on get_context, ever use other context. template rendering as backend generator: proof of concept
if not database_ready(): schedule a retry in 60 seconds, otherwise resources and other dynamic content gets fucked, maybe attach some 'signal' when first query goes trough
with database_ready:
shit_happend, otherwise schedule for first query
- setuppostgres use porject_name for db name and user instead of orchestra
TODO save serialized versions ob backendoperation.instance in order to allow backend reexecution of deleted objects
with open(file) as handler: os.unlink(file)