My Wiki!

VFOSS.ORG Administration

vfoss.org

admin

1..2..

Site ID

goto admin and change sitename, first it may still show the old name (example.com).

Django-filer image

Write access for 'media' folder:

   chmod -R 777 vfoss_org/media

Image support

   yum install tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel

Production upgrade steps

  1. Ordered List ItemSync production with local and Create backup branch / commit point.
  2. Create copy of candidate release branch yearmonthcr1.
  3. Backup data base yearmonthdbdumpx
  4. Merge production with cr1 (See merge instruction following). git merge no-ff no-commit
    1. Fiels will be merged / git add but not committed. How to reverse?, see git reset..
    2. check settings.py
    3. use production wsgi: git checkout production – wsgi.py / git rm if not commited
      1. git reset –hard HEAD~1 file .. is not the way git checkout production – file
    4. test.env.json / env.json???
  5. Cleanup prodction and push
  6. Sync

Merge Production Branch With Master Branch

After making changes to master branch, we want to merge those changes with production branch. However, some files must not be merged with those from master branch, e.g., wsgi, env files, settings.py. The solution is selective merge.

Merge with master branch without commits:

   git merge --no-ff --no-commit master
   git status

To select the version in the current branch, run:

   git checkout HEAD wsgi.py

If you want the version in master (and not a true merge), run:

   git checkout master file_name

ref: http://stackoverflow.com/questions/449541/how-do-you-merge-selective-files-with-git-merge

Update Website

  • pull production branch from bitbucket
  • create env.json
{
	"FILENAME": "env.json",
	"SECRET_KEY": "j@rxzf_*!7#f@i69g3sj0ca_zj8hnhu#ka^iw=cs+u$wuq$@z2",
	"DB_HOST": "127.0.0.1",
	"DB_PORT": "5432",
	"DB_NAME": "vfossdb",
	"DB_USER": "vfossdbuser",
	"DB_PASSWORD": "vfossdbuser",
	"SOCIAL_AUTH_FACEBOOK_KEY": "718938904791933",
	"SOCIAL_AUTH_FACEBOOK_SECRET": "af333859c023d7cdbb454b30c918003c"
}

Django Nginx Static file

Docker Deployment Admin

1. Workflow

2. Data Backup

Backup your databases

docker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql

Restore your databases

cat your_dump.sql | docker exec -i your-db-container psql -U postgres

Minikube

1. Minikube deployment

  minikube start --vm-driver=kvm2 -p visrc.kube --memory=4096
  

Navigation