Commit e3fae697 by muhammad-ammar

more refactoring

parent 0dcec6ee
......@@ -11,7 +11,8 @@
# Defaults for common variables for video_pipeline and video_worker roles
#
video_common_veda_url_root: "http://127.0.0.1:8555"
video_common_veda_url_root: !!null
video_common_val_base_url: !!null
video_common_veda_static_root: !!null
video_common_veda_django_secret_key: !!null
video_common_veda_mysql_db_name: !!null
......@@ -19,15 +20,22 @@ video_common_veda_mysql_host: !!null
video_common_veda_mysql_user: !!null
video_common_veda_mysql_password: !!null
video_common_service_name: !!null
video_common_social_auth_edx_oidc_key: !!null
video_common_social_auth_edx_oidc_secret: !!null
video_common_veda_api_url: !!null
video_common_veda_oauth_url: !!null
video_common_veda_oauth_token_url: !!null
video_common_veda_oauth_client_id: !!null
video_common_veda_oauth_client_secret: !!null
video_common_rabbitmq_broker: !!null
video_common_rabbitmq_pass: !!null
video_common_rabbitmq_user: !!null
# Used to automatically configure OAuth2 Client
VIDEO_COMMON_SOCIAL_AUTH_EDX_OIDC_KEY: "pipeline-key"
VIDEO_COMMON_SOCIAL_AUTH_EDX_OIDC_SECRET: "pipeline-secret"
# video pipeline config overrides
VIDEO_COMMON_EDX_CLOUDFRONT_PREFIX: "SET-ME-PLEASE"
VIDEO_COMMON_EDX_S3_INGEST_PREFIX: "ingest/"
VIDEO_COMMON_EDX_CLOUDFRONT_PREFIX: "SET-ME-PLEASE"
VIDEO_COMMON_EDX_S3_INGEST_BUCKET: "SET-ME-PLEASE"
VIDEO_COMMON_EDX_S3_ENDPOINT_BUCKET: "SET-ME-PLEASE"
VIDEO_COMMON_VEDA_S3_UPLOAD_BUCKET: "SET-ME-PLEASE"
......@@ -48,27 +56,15 @@ VIDEO_COMMON_VEDA_NOREPLY_EMAIL: "veda-noreply@example.com"
VIDEO_COMMON_CIELO24_API_ENVIRONMENT: "sandbox"
VIDEO_COMMON_TRANSCRIPT_PROVIDER_REQUEST_TOKEN: "SET-ME-TO-A-UNIQUE-LONG-RANDOM-STRING"
VIDEO_COMMON_VEDA_API_URL: "{{ VIDEO_COMMON_VEDA_BASE_URL }}/api"
VIDEO_COMMON_VEDA_OAUTH_URL: "{{ VIDEO_COMMON_VEDA_BASE_URL }}/veda_auth"
VIDEO_COMMON_VEDA_OAUTH_TOKEN_URL: "{{ VIDEO_COMMON_VEDA_BASE_URL }}/o/token"
VIDEO_COMMON_VEDA_OAUTH_CLIENT_ID: "veda-client-id"
VIDEO_COMMON_VEDA_OAUTH_CLIENT_SECRET: "veda-client-secret"
VIDEO_COMMON_VEDA_OAUTH_CLIENT_NAME: "video-pipeline"
VIDEO_COMMON_VAL_BASE_URL: "http://127.0.0.1:8010"
VIDEO_COMMON_VAL_API_URL: "{{ VIDEO_COMMON_VAL_BASE_URL }}/api/val/v0/videos"
VIDEO_COMMON_VAL_TOKEN_URL: "{{ VIDEO_COMMON_VAL_BASE_URL }}/oauth2/access_token"
VIDEO_COMMON_VAL_VIDEO_IMAGES_URL: "{{ VIDEO_COMMON_VAL_BASE_URL }}/api/val/v0/videos/video-images/update/"
VIDEO_COMMON_VAL_CLIENT_ID: "{{ VIDEO_COMMON_SOCIAL_AUTH_EDX_OIDC_KEY }}"
VIDEO_COMMON_VAL_SECRET_KEY: "{{ VIDEO_COMMON_SOCIAL_AUTH_EDX_OIDC_SECRET }}"
VIDEO_COMMON_VAL_API_URL: "{{ video_common_val_base_url }}/api/val/v0/videos"
VIDEO_COMMON_VAL_TOKEN_URL: "{{ video_common_val_base_url }}/oauth2/access_token"
VIDEO_COMMON_VAL_VIDEO_IMAGES_URL: "{{ video_common_val_base_url }}/api/val/v0/videos/video-images/update/"
VIDEO_COMMON_VAL_CLIENT_ID: "{{ video_common_social_auth_edx_oidc_key }}"
VIDEO_COMMON_VAL_SECRET_KEY: "{{ video_common_social_auth_edx_oidc_secret }}"
VIDEO_COMMON_VAL_USERNAME: "staff"
VIDEO_COMMON_VAL_PASSWORD: "edx"
VIDEO_COMMON_VAL_TRANSCRIPT_CREATE_URL: "{{ VIDEO_COMMON_VAL_BASE_URL }}/api/val/v0/videos/video-transcripts/create/"
VIDEO_COMMON_VAL_VIDEO_TRANSCRIPT_STATUS_URL: "{{ VIDEO_COMMON_VAL_BASE_URL }}/api/val/v0/videos/status/"
VIDEO_COMMON_RABBITMQ_BROKER: "localhost"
VIDEO_COMMON_RABBITMQ_PASS: "pipeline"
VIDEO_COMMON_RABBITMQ_USER: "pipeline"
VIDEO_COMMON_VAL_TRANSCRIPT_CREATE_URL: "{{ video_common_val_base_url }}/api/val/v0/videos/video-transcripts/create/"
VIDEO_COMMON_VAL_VIDEO_TRANSCRIPT_STATUS_URL: "{{ video_common_val_base_url }}/api/val/v0/videos/status/"
VIDEO_COMMON_SG_SERVER_PATH: "SET-ME-PLEASE"
VIDEO_COMMON_SG_SCRIPT_NAME: "SET-ME-PLEASE"
......@@ -156,11 +152,11 @@ VIDEO_COMMON_CONFIG:
# VEDA API
# ---
## VEDA API Auth
veda_api_url: "{{ VIDEO_COMMON_VEDA_API_URL }}"
veda_auth_url: "{{ VIDEO_COMMON_VEDA_OAUTH_URL }}"
veda_client_id: "{{ VIDEO_COMMON_VEDA_OAUTH_CLIENT_ID }}"
veda_secret_key: "{{ VIDEO_COMMON_VEDA_OAUTH_CLIENT_SECRET }}"
veda_token_url: "{{ VIDEO_COMMON_VEDA_OAUTH_TOKEN_URL }}"
veda_api_url: "{{ video_common_veda_api_url }}"
veda_auth_url: "{{ video_common_veda_oauth_url }}"
veda_client_id: "{{ video_common_veda_oauth_client_id }}"
veda_secret_key: "{{ video_common_veda_oauth_client_secret }}"
veda_token_url: "{{ video_common_veda_oauth_token_url }}"
# ---
# VAL
......@@ -188,9 +184,9 @@ VIDEO_COMMON_CONFIG:
largefile_queue_barrier: 1000000000
celery_threads: 1
rabbitmq_broker: "{{ VIDEO_COMMON_RABBITMQ_BROKER }}"
rabbitmq_pass: "{{ VIDEO_COMMON_RABBITMQ_PASS }}"
rabbitmq_user: "{{ VIDEO_COMMON_RABBITMQ_USER }}"
rabbitmq_broker: "{{ video_common_rabbitmq_broker }}"
rabbitmq_user: "{{ video_common_rabbitmq_user }}"
rabbitmq_pass: "{{ video_common_rabbitmq_pass }}"
# ---
# Shotgun Variables (internal mediateam)
......
......@@ -54,9 +54,19 @@ VIDEO_PIPELINE_VERSION: "master"
VIDEO_PIPELINE_DJANGO_SETTINGS_MODULE: "VEDA.settings"
VIDEO_PIPELINE_DOMAIN: 'pipeline'
VIDEO_PIPELINE_URL_ROOT: "http://{{ VIDEO_PIPELINE_DOMAIN }}:{{ VIDEO_PIPELINE_NGINX_PORT }}"
VIDEO_PIPELINE_SOCIAL_AUTH_EDX_OIDC_KEY: "pipeline-key"
VIDEO_PIPELINE_SOCIAL_AUTH_EDX_OIDC_SECRET: "pipeline-secret"
VIDEO_PIPELINE_LOGOUT_URL: "{{ VIDEO_PIPELINE_URL_ROOT }}/logout/"
VIDEO_PIPELINE_OAUTH2_URL: "{{ VIDEO_PIPELINE_URL_ROOT }}/api/val/v0"
VIDEO_PIPELINE_API_URL: "{{ VIDEO_PIPELINE_URL_ROOT }}/api"
VIDEO_PIPELINE_OAUTH_URL: "{{ VIDEO_PIPELINE_URL_ROOT }}/veda_auth"
VIDEO_PIPELINE_OAUTH_TOKEN_URL: "{{ VIDEO_PIPELINE_URL_ROOT }}/o/token"
VIDEO_PIPELINE_OAUTH_CLIENT_ID: "video-pipeline-client-id"
VIDEO_PIPELINE_OAUTH_CLIENT_NAME: "video-pipeline"
VIDEO_PIPELINE_OAUTH_CLIENT_SECRET: "video-pipeline-client-secret"
VIDEO_PIPELINE_SECRET_KEY: "Your secret key here"
VIDEO_PIPELINE_LANGUAGE_CODE: "en-us"
......@@ -91,3 +101,7 @@ VIDEO_PIPELINE_AUTOMATED_USERS: {}
# static files settings
VIDEO_PIPELINE_DATA_DIR: '{{ COMMON_DATA_DIR }}/{{ video_pipeline_service_name }}'
VIDEO_PIPELINE_STATIC_ROOT: '{{ VIDEO_PIPELINE_DATA_DIR }}/staticfiles'
VIDEO_PIPELINE_RABBITMQ_BROKER: "localhost"
VIDEO_PIPELINE_RABBITMQ_USER: "pipeline"
VIDEO_PIPELINE_RABBITMQ_PASS: "pipeline"
......@@ -53,9 +53,20 @@ dependencies:
- role: video_common_vars
video_common_service_name: '{{ video_pipeline_service_name }}'
video_common_veda_url_root: '{{ VIDEO_PIPELINE_URL_ROOT }}'
video_common_val_base_url: '{{ VAL_BASE_URL }}'
video_common_veda_static_root: '{{ VIDEO_PIPELINE_STATIC_ROOT }}'
video_common_veda_django_secret_key: '{{ VIDEO_PIPELINE_SECRET_KEY }}'
video_common_veda_mysql_db_name: '{{ VIDEO_PIPELINE_DEFAULT_DB_NAME }}'
video_common_veda_mysql_host: '{{ VIDEO_PIPELINE_MYSQL_HOST }}'
video_common_veda_mysql_user: '{{ VIDEO_PIPELINE_MYSQL_USER }}'
video_common_veda_mysql_password: '{{ VIDEO_PIPELINE_MYSQL_PASSWORD }}'
video_common_social_auth_edx_oidc_key: '{{ VIDEO_PIPELINE_SOCIAL_AUTH_EDX_OIDC_KEY }}'
video_common_social_auth_edx_oidc_secret: '{{ VIDEO_PIPELINE_SOCIAL_AUTH_EDX_OIDC_SECRET }}'
video_common_veda_api_url: '{{ VIDEO_PIPELINE_API_URL }}'
video_common_veda_oauth_url: '{{ VIDEO_PIPELINE_OAUTH_URL }}'
video_common_veda_oauth_token_url: '{{ VIDEO_PIPELINE_OAUTH_TOKEN_URL }}'
video_common_veda_oauth_client_id: '{{ VIDEO_PIPELINE_OAUTH_CLIENT_ID }}'
video_common_veda_oauth_client_secret: '{{ VIDEO_PIPELINE_OAUTH_CLIENT_SECRET }}'
video_common_rabbitmq_broker: '{{ VIDEO_PIPELINE_RABBITMQ_BROKER }}'
video_common_rabbitmq_user: '{{ VIDEO_PIPELINE_RABBITMQ_USER }}'
video_common_rabbitmq_pass: '{{ VIDEO_PIPELINE_RABBITMQ_PASS }}'
......@@ -63,11 +63,11 @@
- name: create OAuth application clients
shell: >
{{ video_pipeline_venv_dir }}/bin/python {{ COMMON_BIN_DIR }}/manage.pipeline create_oauth_app_client --settings={{ VIDEO_PIPELINE_DJANGO_SETTINGS_MODULE }}
{{ VIDEO_PIPELINE_VEDA_OAUTH_CLIENT_ID }}
{{ VIDEO_PIPELINE_OAUTH_CLIENT_ID }}
confidential
client-credentials
--name {{ VIDEO_PIPELINE_VEDA_OAUTH_CLIENT_NAME }}
--client_secret {{ VIDEO_PIPELINE_VEDA_OAUTH_CLIENT_SECRET }}
--redirect_uris {{ VIDEO_PIPELINE_VEDA_OAUTH_TOKEN_URL }}
--name {{ VIDEO_PIPELINE_OAUTH_CLIENT_NAME }}
--client_secret {{ VIDEO_PIPELINE_OAUTH_CLIENT_SECRET }}
--redirect_uris {{ VIDEO_PIPELINE_OAUTH_TOKEN_URL }}
--skip_authorization
become_user: "{{ video_pipeline_user }}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment