diff --git a/roles/phabricator/tasks/glusterfs.yml b/roles/phabricator/tasks/glusterfs.yml index 79b8d1c..6b1146b 100644 --- a/roles/phabricator/tasks/glusterfs.yml +++ b/roles/phabricator/tasks/glusterfs.yml @@ -1,42 +1,42 @@ --- - yum: name="{{ item }}" state=present with_items: - glusterfs - glusterfs-fuse - glusterfs-rdma - name: Create the repository directory file: state: directory path: "{{ repositories_path }}" owner: "{{ phd_user }}" group: "{{ www_user }}" tags: gluster - name: Mount gluster share mount: name: "{{ repositories_path }}" src: "{{ groups['fs'][0] }}:/c4science" fstype: glusterfs opts: defaults,_netdev state: mounted tags: gluster - name: Create the Files directory file: state: directory - path: "{{ repositories_path }}files" + path: "{{ files_path }}" owner: "{{ www_user }}" group: "{{ phd_user }}" mode: 0770 tags: gluster when: "'{{ inventory_hostname }}' == '{{ groups.app[0] }}'" - name: Configure OOM for glusterfs cron: name: Don't kill glusterfs in OOM condition hour: 0 job: for p in $(/usr/bin/pgrep gluster); do /bin/echo -17 > /proc/$p/oom_adj; done diff --git a/roles/phabricator/templates/myconfig.conf.php b/roles/phabricator/templates/myconfig.conf.php index fccc4f3..dc01dbd 100644 --- a/roles/phabricator/templates/myconfig.conf.php +++ b/roles/phabricator/templates/myconfig.conf.php @@ -1,109 +1,109 @@ '{{ http_scheme }}{{ domain }}/', 'phabricator.timezone' => 'Europe/Berlin', 'phabricator.serious-business' => true, 'phabricator.show-prototypes' => true, 'phabricator.developer-mode' => {{ developer_mode }}, 'phabricator.allowed-uris' => array( '{{ http_scheme }}{{ domain }}/', '{{ http_scheme }}www.{{ domain }}/' ), 'log.access.path' => '/var/log/phabricator/access.log', 'log.ssh.path' => '/var/log/phabricator/ssh.log', 'user.custom-field-definitions' => array( 'c4science:org' => array( 'name' => 'Organization', 'type' => 'text', 'caption' => 'Domain name of a home organization', 'required' => false, 'search' => true ) ), 'debug.sample-rate' => 0, 'phd.log-directory' => '/var/log/phabricator', 'phd.taskmasters' => 10, 'phd.user' => '{{ phd_user }}', 'security.strict-transport-security' => true, 'security.require-https' => true, 'security.alternate-file-domain' => '{{ http_scheme }}{{ file_domain }}/', 'darkconsole.enabled' => false, 'policy.allow-public' => true, 'auth.require-approval' => false, 'auth.require-email-verification' => false, 'cluster.addresses' => array( {% for host in groups['app'] %} "{{ hostvars[host]['inventory_hostname'] }}/32", {% endfor %} ), 'diffusion.ssh-user' => '{{ vcs_user }}', //'diffusion.ssh-port' => {{ vcs_port_front }}, 'diffusion.allow-http-auth' => true, 'diffusion.allow-git-lfs' => true, 'cluster.databases' => array( {% for host in groups['dbs'] %} array( 'host' => '{{ host }}', 'role' => '{% if loop.first %}master{% else %}replica{% endif %}' ), {% endfor %} ), 'mysql.pass' => '{{ mysql_app_pass }}', 'mysql.user' => '{{ mysql_app_user }}', 'notification.servers' => array( array( 'type' => 'client', 'host' => '{{ domain }}', 'port' => 22280, 'protocol' => 'https', ), {% for host in groups['app'] %} array( 'type' => 'admin', 'host' => '{{ host }}', 'port' => 22281, 'protocol' => 'http', ), {% endfor %} ), //'amazon-s3.access-key' => '{{ s3_access_key }}', //'amazon-s3.secret-key' => '{{ s3_secret_key }}', //'amazon-s3.endpoint' => '{{ s3_endpoint }}', //'amazon-s3.region' => '{{ s3_region }}', //'storage.s3.bucket' => '{{ s3_bucket }}', - 'storage.local-disk.path' => '{{ repositories_path }}files', + 'storage.local-disk.path' => '{{ files_path }}', 'files.enable-imagemagick' => true, #'auth.email-domains' => [ # {% for domain in phabricator_domains %} # "{{ domain }}", # {% endfor %} #], 'pygments.enabled' => true, 'environment.append-paths' => array( "/usr/libexec/git-core", "/bin", "/usr/bin", "/usr/local/bin" ), 'metamta.default-address' => 'phabricator@{{ domain }}', 'metamta.domain' => '{{ domain }}', 'metamta.reply-handler-domain' => '{{ domain }}', 'metamta.single-reply-handler-prefix' => 'phabricator', 'jenkins.url' => '{{ jenkins_url }}', 'jenkins.user' => '{{ jenkins_user }}', 'jenkins.token' => '{{ jenkins_token }}', 'jenkins.repo_cred' => '{{ jenkins_cred }}', ); diff --git a/vars/main.yml.example b/vars/main.yml.example index fc4cd06..0ce69de 100644 --- a/vars/main.yml.example +++ b/vars/main.yml.example @@ -1,115 +1,116 @@ --- env: prod project_name: "c4science" ansible_ssh_user: "centos" proxy: no http_proxy: "" https_proxy: "" no_proxy: "localhost" proxy_url: "{{ http_proxy }}" __no_proxy: "{{ no_proxy }}" user_pwd_root: "" user_pwd_centos: "" # OpenStack keypair_name: "" image_id: "" image_id_coreos: "" public_net: "" private_net: "" flavor_id_small: "" flavor_id_medium: "" flavor_id_large: "" flavor_id_small_backup: "" private_net_backup: "" image_id_backup: "" region_main: "" region_back: "" # Storage glusterfs_default_release: 38 s3_access_key: "" s3_secret_key: "" s3_endpoint: "" s3_bucket: "" s3_region: "" # Lbs internal_ip: 0.0.0.0 external_ip: 0.0.0.0 backup_ip: 0.0.0.0 ip_range: "10.0.0.0/16" notif_port: 22280 jenkins_port: 8080 stats_port: 8082 monit_port: 8081 monit_user: admin monit_pass: rolling_reboot_proxy_host: "{{ external_ip }}" rolling_reboot_pause: 30 rolling_reboot_wait_delay: 20 # App developer_mode: false http_scheme: 'http://' domain: example.com file_domain: "example-cdn.com" phabricator_branch: production phabricator_path: /srv/ repositories_path: /var/repo/ +files_path: /var/files/ phd_user: phabricator www_user: apache vcs_user: git vcs_port_front: 22 vcs_port_back: 2222 jenkins_prefix: "/" jenkins_url: "{{ http_scheme }}jenkins.{{ domain }}{{ jenkins_prefix }}" jenkins_user: "admin" jenkins_token: "" jenkins_cred: "xxx-yyy-zzz" shib_metadata_file: "metadata.xml" shib_metadata_provider: "http://example.com/{{ shib_metadata_file }}" phabricator_domains: - "{{ domain }}" - 'example.com' google_webmaster_file: "googleXYZ.html" # Dbs mysql_repl_user: "repl" mysql_repl_pass: "" mysql_app_user: "" mysql_app_pass: "" mysql_shib_user: "" mysql_shib_pass: "" mysql_shib_db: "shibboleth" mysql_lbs_user: "haproxy" mysql_cluster_name: "" mysql_host: "10.0.0.0/255.255.0.0" # SSH ssh_keys: - "ssh-rsa mysuperkey1" - "ssh-rsa mysuperkey2" # Swap swap_path: "/swapfile" dd_bs_size_mb: 32 swap_count: 128 swappiness: 10 vfs_cache_pressure: 50 # Email configure_postfix: true enable_postfix_domain_rewrite: true enable_postfix_relayhost: true postfix_relayhost: "[{{ internal_ip }}]" postfix_rewrite_domain: "{{ domain }}" email_alias_phabricator: "" email_alias_postmaster: "" email_alias_admin: "" email_monitoring: ""