Table of Contents
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
- Ordered List ItemSync production with local and Create backup branch / commit point.
- Create copy of candidate release branch yearmonthcr1.
- Backup data base yearmonthdbdumpx
- Merge production with cr1 (See merge instruction following). git merge no-ff no-commit
- Fiels will be merged / git add but not committed. How to reverse?, see git reset..
- check settings.py
- use production wsgi: git checkout production – wsgi.py / git rm if not commited
- git reset –hard HEAD~1 file .. is not the way git checkout production – file
- test.env.json / env.json???
- Cleanup prodction and push
- 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
- 2017/01/14 02:54:32 [error] 5229#0: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
Docker Deployment Admin
1. Workflow
Workflow: http://localhost/~dang/wiki/doku.php?id=devops:docker:docker_dev_workflow#test_production_image
Hosting with docker: http://localhost/~dang/wiki/doku.php?id=devops:docker:web_hosting
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