Commit 3f0a20b2 by muhammad-ammar

refactor

parent 37bb2a85
[defaults]
jinja2_extensions = jinja2.ext.do
private_key_file = /Users/mammar/.vagrant.d/boxes/ubuntu_xenial/0/virtualbox/vagrant_private_key
remote_port = 2222
remote_user = vagrant
Vagrant.require_version ">= 1.8.7"
unless Vagrant.has_plugin?("vagrant-vbguest")
raise "Please install the vagrant-vbguest plugin by running `vagrant plugin install vagrant-vbguest`"
end
VAGRANTFILE_API_VERSION = "2"
MEMORY = 1024
CPU_COUNT = 2
vm_guest_ip = "192.168.33.10"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Creates a devstack from a base Ubuntu 16.04 image for virtualbox
config.vm.box = "ubuntu_xenial"
config.vm.network :private_network, ip: vm_guest_ip, nic_type: "virtio"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.network :forwarded_port, guest: 18381, host: 18381 # Course discovery
config.ssh.insert_key = true
# Enable X11 forwarding so we can interact with GUI applications
config.ssh.forward_x11 = true
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", MEMORY.to_s]
vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]
vb.customize ['modifyvm', :id, '--nictype1', 'virtio']
end
# Make LC_ALL default to en_US.UTF-8 instead of en_US.
# See: https://github.com/mitchellh/vagrant/issues/1188
config.vm.provision "shell", inline: 'echo \'LC_ALL="en_US.UTF-8"\' > /etc/default/locale'
# # Get ready for ansible on this box.
# config.vm.provision "shell", path: '../../../util/install/ansible-bootstrap.sh'
# Use vagrant-vbguest plugin to make sure Guest Additions are in sync
config.vbguest.auto_reboot = true
config.vbguest.auto_update = true
config.vm.provision :ansible do |ansible|
ansible.playbook = "/Users/mammar/Documents/edx/devstack/src/configuration/playbooks/edx-east/video_pipeline.yml"
# ansible.verbose = "vvv"
ansible.extra_vars = {
migrate_db: 'yes',
disable_edx_services: 'false',
edx_django_service_has_static_assets: 'yes',
edx_django_service_version: 'ammar/changes-for-config',
edx_django_service_use_python3: 'false'
}
end
end
......@@ -5,12 +5,10 @@
vars:
ENABLE_NEWRELIC: False
migrate_db: 'yes'
disable_edx_services: false
edx_django_service_use_python3: false
edx_django_service_has_static_assets: 'yes'
roles:
- role: nginx
nginx_default_sites:
- video_pipeline
- aws
- edxlocal
- role: video_pipeline
......@@ -14,6 +14,7 @@ edxlocal_databases:
- "{{ ANALYTICS_API_REPORTS_DB_NAME | default(None) }}"
- "{{ CREDENTIALS_DEFAULT_DB_NAME | default(None) }}"
- "{{ DISCOVERY_DEFAULT_DB_NAME | default(None) }}"
- "{{ VIDEO_PIPELINE_DEFAULT_DB_NAME | default(None) }}"
edxlocal_database_users:
- {
......
......@@ -21,6 +21,9 @@ video_pipeline_gunicorn_port: 8555
video_pipeline_user: "{{ video_pipeline_service_name }}"
video_pipeline_home: "{{ COMMON_APP_DIR }}/{{ video_pipeline_service_name }}"
# This should be removed once instance_config.yml is moved out side of source code.
video_pipeline_code_dir: '{{ COMMON_APP_DIR }}/{{ video_pipeline_service_name }}/{{ video_pipeline_service_name }}'
video_pipeline_environment: {}
#
......
......@@ -30,7 +30,7 @@ dependencies:
edx_django_service_django_settings_module: '{{ VIDEO_PIPELINE_DJANGO_SETTINGS_MODULE }}'
edx_django_service_environment_extra: '{{ video_pipeline_environment }}'
edx_django_service_gunicorn_extra: '{{ VIDEO_PIPELINE_GUNICORN_EXTRA }}'
edx_django_service_wsgi_name: 'edx-video-pipeline.VEDA'
edx_django_service_wsgi_name: 'VEDA'
edx_django_service_nginx_port: '{{ VIDEO_PIPELINE_NGINX_PORT }}'
edx_django_service_ssl_nginx_port: '{{ VIDEO_PIPELINE_SSL_NGINX_PORT }}'
edx_django_service_language_code: '{{ VIDEO_PIPELINE_LANGUAGE_CODE }}'
......
......@@ -24,4 +24,4 @@
- name: Create video pipeline configuration
template:
src: "templates/instance_config.yaml.j2"
dest: "{{ edx_django_service_code_dir }}/instance_config.yaml"
dest: "{{ video_pipeline_code_dir }}/instance_config.yaml"
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