]> git.parisson.com Git - telecaster-instance.git/commitdiff
update to new config of the ICP media server
authorGuillaume Pellerin <yomguy@parisson.com>
Wed, 21 Oct 2015 21:23:55 +0000 (23:23 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Wed, 21 Oct 2015 21:23:55 +0000 (23:23 +0200)
deploy/cron.rule [new file with mode: 0644]
deploy/nginx.conf [new file with mode: 0644]
deploy/stream.conf [new file with mode: 0644]
deploy/tc_import.sh [new file with mode: 0755]
deploy/uwsgi.ini [new file with mode: 0644]
settings.py
settings.pyc
update_static.sh [new file with mode: 0755]
urls.py
wsgi.py

diff --git a/deploy/cron.rule b/deploy/cron.rule
new file mode 100644 (file)
index 0000000..29d95df
--- /dev/null
@@ -0,0 +1 @@
+0 */3 * * * parisson ~/tc/instance/deploy/tc_import.sh
diff --git a/deploy/nginx.conf b/deploy/nginx.conf
new file mode 100644 (file)
index 0000000..fc25423
--- /dev/null
@@ -0,0 +1,40 @@
+# the upstream component nginx needs to connect to
+upstream teleforma {
+    server unix:///run/uwsgi/app/teleforma/socket; # for a file socket
+    #server 127.0.0.1:9500; # for a web port socket (we'll use this first)
+    }
+
+server {
+    # the port your site will be served on
+    listen      80;
+    # the domain name it will serve for
+    server_name srvpodcast.icp.fr; # substitute your machine's IP address or FQDN
+    charset     utf-8;
+
+    # max upload size
+    client_max_body_size 75M;   # adjust to taste
+
+    # Django media
+    location /media/  {
+        alias /media/podcast/;  # your Django project's media files - amend as required
+        autoindex on;
+    }
+
+    location /static/ {
+        alias /var/www/static/; # your Django project's static files - amend as required
+#        autoindex on;
+    }
+
+    # Finally, send all non-media requests to the Django server.
+    location / {
+        uwsgi_pass   teleforma;
+        include     /etc/nginx/uwsgi_params; # the uwsgi_params file you installed
+        #uwsgi_pass_request_body on;
+        }
+
+    error_log /var/log/nginx/teleforma-error.log;
+    access_log /var/log/nginx/teleforma-access.log;
+
+
+}
+               
diff --git a/deploy/stream.conf b/deploy/stream.conf
new file mode 100644 (file)
index 0000000..9b5efa4
--- /dev/null
@@ -0,0 +1,74 @@
+
+# server.bindAddress
+# example: 127.0.0.1, 192.168.1.1
+# localhost. www.example.com also work
+#server.bindAddress = 192.168.0.12
+
+# server.port
+# listening port
+server.port=8080
+
+streams.safe=true
+streams.safe.password=source2parisson
+streams.safe.limit=100
+
+streams.monitor=true
+streams.monitor.password=source2parisson
+streams.monitor.limit=100
+
+
+streams.icp-ca23103080-14-cours=true
+streams.icp-ca23103080-14-cours.password=source2parisson
+streams.icp-ca23103080-14-cours.limit=1000
+
+streams.icp-ca23103073-14-cours=true
+streams.icp-ca23103073-14-cours.password=source2parisson
+streams.icp-ca23103073-14-cours.limit=1000
+
+streams.icp-ca23103074-14-cours=true
+streams.icp-ca23103074-14-cours.password=source2parisson
+streams.icp-ca23103074-14-cours.limit=1000
+
+streams.icp-ca23203099-14-cours=true
+streams.icp-ca23203099-14-cours.password=source2parisson
+streams.icp-ca23203099-14-cours.limit=1000
+
+streams.icp-ca23203100-14-cours=true
+streams.icp-ca23203100-14-cours.password=source2parisson
+streams.icp-ca23203100-14-cours.limit=1000
+
+streams.icp-ca23103073-13-cours=true
+streams.icp-ca23103073-13-cours.password=source2parisson
+streams.icp-ca23103073-13-cours.limit=1000
+
+streams.icp-ca23103074-13-cours=true
+streams.icp-ca23103074-13-cours.password=source2parisson
+streams.icp-ca23103074-13-cours.limit=1000
+
+streams.icp-ca23103072-13-cours=true
+streams.icp-ca23103072-13-cours.password=source2parisson
+streams.icp-ca23103072-13-cours.limit=1000
+
+streams.icp-ca23203092-13-cours=true
+streams.icp-ca23203092-13-cours.password=source2parisson
+streams.icp-ca23203092-13-cours.limit=1000
+
+streams.icp-test-cours=true
+streams.icp-test-cours.password=source2parisson
+streams.icp-test-cours.limit=1000
+
+streams.icp-ca23103045-15-cours=true
+streams.icp-ca23103045-15-cours.password=source2parisson
+streams.icp-ca23103045-15-cours.limit=1000
+
+streams.icp-ca23103065-15-cours=true
+streams.icp-ca23103065-15-cours.password=source2parisson
+streams.icp-ca23103065-15-cours.limit=1000
+
+streams.icp-ca23103044-15-cours=true
+streams.icp-ca23103044-15-cours.password=source2parisson
+streams.icp-ca23103044-15-cours.limit=1000
+
+streams.icp-ca23103053-15-cours=true
+streams.icp-ca23103053-15-cours.password=source2parisson
+streams.icp-ca23103053-15-cours.limit=1000
diff --git a/deploy/tc_import.sh b/deploy/tc_import.sh
new file mode 100755 (executable)
index 0000000..11c5ad6
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+media_dir=/media/podcast/ICP/
+media_tmp=/tmp/
+
+python ~/tc/telemeta/tools/scripts/transcode/remux_fix_media.py $media_dir $media_tmp  >> ~/log/remux.log
+python ~/tc/telemeta/tools/scripts/transcode/transcode.py $media_dir ~/log/transcode.log
+python ~/tc/instance/manage.py teleforma-import-conferences-2 ICP ~/log/import.log
diff --git a/deploy/uwsgi.ini b/deploy/uwsgi.ini
new file mode 100644 (file)
index 0000000..175c692
--- /dev/null
@@ -0,0 +1,27 @@
+# mysite_uwsgi.ini file
+[uwsgi]
+
+projectdomain = srvpodcast.icp.fr
+
+# Django-related settings
+# the base directory (full path)
+chdir           = /home/parisson/tc/instance/
+# Django's wsgi file
+module          = wsgi
+# the virtualenv (full path)
+#home            = /home/parisson/teleforma/
+
+# process-related settings
+# master
+master          = true
+# maximum number of worker processes
+processes       = 4
+## the socket (use the full path to be safe
+#socket          = /tmp/tc.sock
+# ... with appropriate permissions - may be needed
+chmod-socket    = 664
+# clear environment on exit
+vacuum          = true
+buffer-size     = 65535
+limit-post     = 8192000000 
+touch-reload = /home/parisson/tc/instance/wsgi.py
index 47d02f61ecac2d46c471100a075044998c5c269b..46835dbd0700ae6cd8d629f95bf1ef50c74ded10 100644 (file)
@@ -22,7 +22,7 @@ DATABASES = {
         'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
         'NAME': 'teleforma',                      # Or path to database file if using sqlite3.
         'USER': 'teleforma',                      # Not used with sqlite3.
-        'PASSWORD': 'Lashjium5',                  # Not used with sqlite3.
+        'PASSWORD': 'feryisBesh6',                  # Not used with sqlite3.
         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
         'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
     }
@@ -56,12 +56,12 @@ USE_L10N = True
 
 # Absolute path to the directory that holds media.
 # Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = '/home/telecaster/archives/'
+MEDIA_ROOT = '/media/podcast/'
 
 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
 # trailing slash if there is a path component (optional in other cases).
 # Examples: "http://media.lawrence.com", "http://example.com/media/"
-MEDIA_URL = 'http://192.168.1.65:8040/'
+MEDIA_URL = 'http://srvpodcast.icp.fr/media/'
 
 # Absolute path to the directory static files should be collected to.
 # Don't put anything in this directory yourself; store your static files
@@ -108,6 +108,7 @@ MIDDLEWARE_CLASSES = (
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.locale.LocaleMiddleware',
     'pagination.middleware.PaginationMiddleware',
+    'teleforma.middleware.XsSharing',
 )
 
 ROOT_URLCONF = 'urls'
@@ -116,7 +117,7 @@ TEMPLATE_DIRS = (
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
-    '/usr/local/lib/telecaster/teleforma/teleforma/templates'
+    '/home/parisson/tc/teleforma/teleforma/templates'
 )
 
 INSTALLED_APPS = (
@@ -140,7 +141,7 @@ INSTALLED_APPS = (
     'timezones',
     'jqchat',
 #    'googletools',
-    'telecaster',
+#    'telecaster',
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
@@ -151,12 +152,12 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     "django.core.context_processors.media",
     'django.core.context_processors.static',
     'teleforma.context_processors.periods',
-    'telecaster.context_processors.host',
+#    'telecaster.context_processors.host',
 )
 
-TELEMETA_ORGANIZATION = 'Pre-Barreau'
-TELEMETA_SUBJECTS = ('barreau', 'crfpa', 'e-learning')
-TELEMETA_DESCRIPTION = "Plateforme e-learning du CRFPA"
+TELEMETA_ORGANIZATION = 'ICP'
+TELEMETA_SUBJECTS = ('institut', 'catholique', 'paris', 'e-learning')
+TELEMETA_DESCRIPTION = "D01"
 TELEMETA_GMAP_KEY = 'ABQIAAAArg7eSfnfTkBRma8glnGrlxRVbMrhnNNvToCbZQtWdaMbZTA_3RRGObu5PDoiBImgalVnnLU2yN4RMA'
 TELEMETA_CACHE_DIR = MEDIA_ROOT + 'cache'
 TELEMETA_EXPORT_CACHE_DIR = TELEMETA_CACHE_DIR + "/export"
@@ -174,15 +175,15 @@ LOGIN_URL = '/login/'
 LOGIN_REDIRECT_URL = reverse_lazy('teleforma-desk')
 SESSION_EXPIRE_AT_BROWSER_CLOSE = False
 
-EMAIL_HOST = 'smtp.free.fr'
+EMAIL_HOST = 'smtp.icp.fr'
 DEFAULT_FROM_EMAIL = 'webmaster@parisson.com'
 SERVER_EMAIL = 'webmaster@parisson.com'
 EMAIL_SUBJECT_PREFIX = '[' + TELEMETA_ORGANIZATION.decode('utf8') + '] '
 
 POSTMAN_AUTO_MODERATE_AS = True
 
-TELECASTER_MASTER_SERVER = 'teleforma.parisson.com'
-TELECASTER_RSYNC_SERVER = 'telecaster@jimi.parisson.com:archives/'
+TELECASTER_MASTER_SERVER = '10.10.253.15'
+TELECASTER_RSYNC_SERVER = 'parisson@10.10.253.15:archives/'
 TELECASTER_RSYNC_LOG = '/var/log/telecaster/rsync.log'
 TELECASTER_CONF = [{'type':'mp3','server_type':'icecast',
                     'conf':'/etc/telecaster/deefuzzer/telecaster_mp3_default.xml',
@@ -192,9 +193,9 @@ TELECASTER_CONF = [{'type':'mp3','server_type':'icecast',
                    'port':'8080'}, ]
 
 TELEFORMA_E_LEARNING_TYPE = 'CRFPA'
-TELEFORMA_GLOBAL_TWEETER = False
-TELEFORMA_PERIOD_TWEETER = True
+TELEFORMA_GLOBAL_TWEETER = True
+TELEFORMA_PERIOD_TWEETER = False
 
-ROUTER_IP = '81.57.221.26'
+ROUTER_IP = '46.218.185.235'
 
 
index 0eb2148799e37df310d486f9ff2103be1c8c817a..50523b83671c6f82297eea4adff17cee1fc95b55 100644 (file)
Binary files a/settings.pyc and b/settings.pyc differ
diff --git a/update_static.sh b/update_static.sh
new file mode 100755 (executable)
index 0000000..2a3b706
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./manage.py collectstatic --ignore ICP --ignore cache --ignore tmp --ignore old
diff --git a/urls.py b/urls.py
index 8bacff02afee8de78cbbb8c62f6efe946c062c13..c3879e70f46e2859bfd70275f4114f27b0d1c274 100644 (file)
--- a/urls.py
+++ b/urls.py
@@ -6,7 +6,7 @@ from django.contrib import admin
 admin.autodiscover()
 
 js_info_dict = {
-    'packages': ('telemeta','telecaster'),
+    'packages': ('telemeta',),
 }
 
 urlpatterns = patterns('',
@@ -20,7 +20,7 @@ urlpatterns = patterns('',
 
     # TeleForma
     (r'^', include('teleforma.urls')),
-    (r'^telecaster/', include('telecaster.urls')),
+    #(r'^telecaster/', include('telecaster.urls')),
 
     # Languages
     (r'^i18n/', include('django.conf.urls.i18n')),
diff --git a/wsgi.py b/wsgi.py
index 3ff93f9c1e64c432a58b19681763cee81c344546..38bfa09fb881cb2745f80aed91723e4abb16348a 100644 (file)
--- a/wsgi.py
+++ b/wsgi.py
@@ -1,7 +1,7 @@
 import os
 import sys
 
-sys.path.append('/usr/local/lib/telecaster/instance')
+sys.path.append('/home/parisson/tc/instance')
 #sys.path.append('/usr/local/lib/telecaster/instance/teleforma')
 
 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")