Commit 950fc1c6 by e0d

Progress toward working version.

parent 54784bea
...@@ -92,6 +92,16 @@ ...@@ -92,6 +92,16 @@
- analytics-experiments - analytics-experiments
- install - install
- update - update
- name: analytics-experiments | create config
template:
src=opt/wwc/analytics.auth.json.j2
dest=/opt/wwc/analytics.auth.json
owner="{{ ax_web_user }}" group="{{ ax_web_user }}"
tags:
- analytics-experiments
- install
- update
- name: analtyics-experiments | install service - name: analtyics-experiments | install service
template: template:
......
...@@ -34,6 +34,7 @@ ax_django_settings: 'anserv.settings' ...@@ -34,6 +34,7 @@ ax_django_settings: 'anserv.settings'
ax_env_vars: ax_env_vars:
ANALYTICS_EXPERIMENTS_LOG_LEVEL: "{{ ax_log_level }}" ANALYTICS_EXPERIMENTS_LOG_LEVEL: "{{ ax_log_level }}"
# #
# OS packages # OS packages
# #
...@@ -41,6 +42,7 @@ ax_env_vars: ...@@ -41,6 +42,7 @@ ax_env_vars:
ax_debian_pkgs: ax_debian_pkgs:
- mongodb-clients - mongodb-clients
- zip - zip
- libmysqlclient-dev
ax_redhat_pkgs: [] ax_redhat_pkgs: []
......
...@@ -30,29 +30,29 @@ ...@@ -30,29 +30,29 @@
- name: s3fs | fetch package - name: s3fs | fetch package
get_url: get_url:
url={{ s3fs_download_url }}/s3fs-{{ s3fs_version }}.tar.gz url={{ s3fs_download_url }}
dest={{ s3fs_temp_dir }}/s3fs-{{ s3fs_version }}.tar.gz dest={{ s3fs_temp_dir }}
- name: s3fs | unzip package - name: s3fs | unzip package
shell: shell:
/bin/tar zxvf s3fs-{{ s3fs_version }}.tar.gz /usr/bin/unzip {{ s3fs_archive }}
chdir={{ s3fs_temp_dir }} chdir={{ s3fs_temp_dir }}
creates={{ s3fs_temp_dir }}/s3fs-{{ s3fs_version }}/configure creates={{ s3fs_temp_dir }}/{{ s3fs_unzip_dest }}/configure
- name: s3fs | configure - name: s3fs | configure
shell: shell:
./configure ./configure
chdir={{ s3fs_temp_dir }}/s3fs-{{ s3fs_version }} chdir={{ s3fs_temp_dir }}/{{ s3fs_unzip_dest }}
creates={{ s3fs_temp_dir }}/s3fs-{{ s3fs_version }}/config.status creates={{ s3fs_temp_dir }}/{{ s3fs_unzip_dest }}/config.status
- name: s3fs | make - name: s3fs | make
shell: shell:
/usr/bin/make /usr/bin/make
chdir={{ s3fs_temp_dir }}/s3fs-{{ s3fs_version }} chdir={{ s3fs_temp_dir }}/{{ s3fs_unzip_dest }}
creates={{ s3fs_temp_dir }}/s3fs-{{ s3fs_version }}/src/s3cmd creates={{ s3fs_temp_dir }}/{{ s3fs_unzip_dest }}/src/s3cmd
- name: s3fs | make install - name: s3fs | make install
shell: shell:
/usr/bin/make install /usr/bin/make install
chdir={{ s3fs_temp_dir }}/s3fs-{{ s3fs_version }} chdir={{ s3fs_temp_dir }}/{{ s3fs_unzip_dest }}
\ No newline at end of file
...@@ -23,16 +23,16 @@ ...@@ -23,16 +23,16 @@
# Franc carter fork with iam role support and memory leak fix # Franc carter fork with iam role support and memory leak fix
# #
s3fs_version: 'master' s3fs_version: 'master'
s3fs_download_src: 'https://github.com/franc-carter/s3fs-c/archive/' s3fs_download_src: 'https://github.com/tongwang/s3fs-c/archive'
s3fs_archive: 'master.zip' s3fs_archive: 'master.zip'
s3fs_unzip_dest: 's3fs-{{ s3fs_version }' s3fs_unzip_dest: 's3fs-c-master'
s3fs_download_url: {{ s3fs_download_src }}/{{ s3fs_archive }} s3fs_download_url: '{{ s3fs_download_src }}/{{ s3fs_archive }}'
s3fs_temp_dir: '/var/tmp' s3fs_temp_dir: '/var/tmp'
https://github.com/franc-carter/s3fs-c/archive/master.zip # https://github.com/franc-carter/s3fs-c/archive/master.zip
# #
# vars are namespace with the module name. # vars are namespace with the module name.
......
...@@ -21,6 +21,27 @@ ...@@ -21,6 +21,27 @@
# #
# #
- name: task | stub ansible task - name: task | install task specific system packages
debug: msg="This is a stub task created by the ansible-role role" apt: pkg={{','.join(task_debian_pkgs)}} state=present
notify: task | notify me tags:
\ No newline at end of file - task
- install
- update
- name: task | create s3fs mount points
file:
path={{ item.mount_point }} owner={{ item.owner }}
group={{ item.group }} mode={{ item.mode }} state="directory"
with_items: "{{ task_s3fs_mounts }}"
- name: task | mount s3 buckets
mount:
name={{ item.mount_point }} src={{ item.bucket }} fstype=fuse.s3fs
opts=use_cache=/tmp,iam_role={{ task_iam_role }} state=mounted
with_items: "{{ task_s3fs_mounts }}"
#- name: task | mount s3 buckets
# shell:
# /usr/local/bin/s3fs {{ item.bucket }} {{ item.mount_point }} -ouse_cache=/tmp,iam_role={{ task_iam_role }}
# with_items: "{{ task_s3fs_mounts }}"
...@@ -15,12 +15,16 @@ ...@@ -15,12 +15,16 @@
# vars are namespace with the module name. # vars are namespace with the module name.
# #
task_role_name: task task_role_name: task
task_iam_role: stage-task
task_s3fs_mounts:
- { bucket: "edx-all-tracking-logs", mount_point: "/mnt/edx-all-tracking-logs", owner: "root", group: "adm", mode: "0755" }
# #
# OS packages # OS packages
# #
task_debian_pkgs: [] task_debian_pkgs:
- libmysqlclient-dev
task_redhat_pkgs: [] task_redhat_pkgs: []
......
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