Verified Commit 751b3cf8 authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

roles/aurweb: Make the necessary changes to use memcached instead of apcu

Add memcached to the playbook and also change the php extensions to use memcached.
Removed the apcu options from defatuls and added memcached settings. Added the php-memcached
packages to the list of needed packages and also remove the apcu tasks. Added the memcached
systemd unit file and enable and start it from the tasks.
parent 75ea584f
......@@ -13,7 +13,8 @@
- { role: mariadb, mariadb_innodb_buffer_pool_size: '64M', mariadb_table_open_cache: '256', mariadb_query_cache_type: '0',
mariadb_innodb_file_per_table: True }
- { role: sudo }
- { role: php-fpm, php_extensions: ['apc', 'apcu', 'iconv', 'mysqli', 'pdo_mysql'], zend_extensions: ['opcache'] }
- { role: php-fpm, php_extensions: ['iconv', 'memcached', 'mysqli', 'pdo_mysql'], zend_extensions: ['opcache'] }
- { role: memcached, tags: ['memcached'] }
- { role: uwsgi, tags: ["uwsgi"] }
- { role: borg-client, tags: ["borg"] }
- { role: postfix, postfix_relayhost: "orion.archlinux.org" }
......
......@@ -20,10 +20,9 @@ aurweb_socket: '/run/php-fpm/{{aurweb_user}}.socket'
cgit_socket: '/run/uwsgi/cgit.sock'
smartgit_socket: '/run/uwsgi/smartgit.sock'
aurweb_cache: 'apc'
aurweb_cache: 'memcache'
aurweb_cache_pkginfo_ttl: '86400'
aurweb_request_limt: '4000'
aurweb_window_length: '86400'
aurweb_apc_shm_size: '1024M'
aurweb_apc_ttl: '1800'
aurweb_apc_entries_hint: '0'
aurweb_memcached_host: 'localhost'
aurweb_memcached_memory: 2048
\ No newline at end of file
......@@ -6,8 +6,7 @@
- asciidoc
- highlight
- make
- php-apcu
- php-apcu-bc
- php-memcached
- pyalpm
- python-bleach
- python-markdown
......@@ -150,9 +149,6 @@
- name: start and enable systemd socket
service: name=php-fpm@{{ aurweb_user }}.socket state=started enabled=true
- name: install apcu configuration
template: src=apcu.ini.j2 dest=/etc/php/conf.d/apcu.ini
- name: install cgit configuration
template: src=cgitrc.j2 dest="{{ aurweb_conf_dir }}/cgitrc"
......@@ -227,6 +223,7 @@
- aurweb-git.timer
- aurweb-aurblup.service
- aurweb-aurblup.timer
- aurweb-memcached.service
- aurweb-mkpkglists.service
- aurweb-mkpkglists.timer
- aurweb-pkgmaint.service
......@@ -236,11 +233,12 @@
- aurweb-tuvotereminder.service
- aurweb-tuvotereminder.timer
- name: start and enable AUR systemd timers
- name: start and enable AUR systemd services and timers
service: name={{ item }} enabled=yes state=started
with_items:
- aurweb-git.timer
- aurweb-aurblup.timer
- aurweb-memcached.service
- aurweb-mkpkglists.timer
- aurweb-pkgmaint.timer
- aurweb-popupdate.timer
......
apc.shm_size={{ aurweb_apc_shm_size }}
apc.ttl={{ aurweb_apc_ttl }}
apc.entries_hint={{ aurweb_apc_entries_hint }}
[Unit]
Description=Aurweb Memcached Daemon
After=network.target
[Service]
User={{ aurweb_user }}
Group=memcached
ExecStart=/usr/bin/memcached -l {{ aurweb_memcached_host }} -m {{ aurweb_memcached_memory }} -o modern
Restart=always
NoNewPrivileges=yes
PrivateTmp=yes
ProtectHome=true
PrivateDevices=yes
ProtectSystem=full
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
MemoryDenyWriteExecute=yes
[Install]
WantedBy=multi-user.target
Supports Markdown
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