Skip to content
Snippets Groups Projects
Commit 6ec00975 authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

Add archweb service to orion

parent 26bc0a0c
No related branches found
No related tags found
No related merge requests found
$ANSIBLE_VAULT;1.1;AES256
32336337623936643161653739636138303332326366363963393436396465633137616266653463
3663343535306333323332366338623463363030663534630a326336333065633333333230663130
32656537326537313336343136316338346464386237626230663236343865336562363562363739
6163396332343032340a653739353436656139396336623539643431366462363164646361336436
36316238336535323864383537613964373666656465636562613530356566303139383230643761
65663030323464623230626330633538303436363664383839623334333837666435323466666638
64353061613234373966636266613763366364386334323333663933616534333937396539376562
38623139323463336363
$ANSIBLE_VAULT;1.1;AES256
36666131373264613664663533333232343233306332663433303930333063643539656232353735
3637393832313138323238646166336531363837313731630a393035643830626464316239326131
66356665636131346639383733616631316664313331396538376663353832323133333134623833
3038336638346361660a626637336430303036343631666365316339643732356362643133663363
37316531383534343361393338616332323232376332323339366338663063643238666539646330
63343466363930326238356334656636663363363166373561393131303435353461366237623233
356262383565623262343836623666663232
66316639393734333962323264376164626437356233663165303536373661643566383463663230
3733646361633362356465363839326133623739343664360a353832303138343537366661653333
33363631343830613937323336383766343035353166336663316335616335316466343835306463
3862306265383864310a313439353937376436386565343334303364376134333633313735323864
33633665616331313932326563376565363133376438633665343932636461316530666434656236
62313332383437383964346332653035383834343132626631396639643262353031656538643134
66383132313837316563656630666663333166346130646334343639643462643131656533363635
63316162303862346134633961323538623934363836313731646336623339333138376436623933
3962
......@@ -15,3 +15,4 @@
- { role: nginx, tags: ["nginx"] }
- { role: dbscripts, repos_domain: "repos.archlinux.org" }
- sudo
- { role: archweb, archweb_home: "/srv/http/archweb" }
[Unit]
Description=archewb mirrorcheck
After=network.target
[Service]
Type=oneshot
User=archweb
WorkingDirectory=/srv/http/archweb
ExecStart=/srv/http/archweb/env/bin/python manage.py mirrorcheck --location 3
ExecStart=/srv/http/archweb/env/bin/python manage.py mirrorcheck --location 4
Nice=5
[Install]
WantedBy=multi-user.target
[Unit]
Description=archweb mirrorcheck
[Timer]
OnUnitActiveSec=1h
OnBootSec=10min
RandomizedDelaySec=5min
[Install]
WantedBy=timers.target
[Unit]
Description=archweb reporead
After=network.target
[Service]
User=archweb
WorkingDirectory=/srv/http/archweb
ExecStart=/srv/http/archweb/env/bin/python manage.py reporead_inotify
Restart=on-failure
Nice=5
[Install]
WantedBy=multi-user.target
---
- name: daemon reload
command: systemctl daemon-reload
---
- name: install git
pacman: name=git,python2,python2-virtualenv state=present
- name: make archweb uesr
user: name=archweb shell=/bin/false home="{{ archweb_home }}" createhome=no
- name: fix home permissions
file: state=directory owner=archweb group=archweb path="{{ archweb_home }}"
- name: clone archweb repo
git: repo=git://git.archlinux.org/archweb.git dest="{{ archweb_home }}"
become: true
become_user: archweb
- name: make virtualenv
command: virtualenv2 "{{ archweb_home }}"/env
become: true
become_user: archweb
- name: install stuff into virtualenv
pip: requirements="{{ archweb_home }}/requirements_prod.txt" virtualenv="{{ archweb_home }}/env"
become: true
become_user: archweb
- name: fix home permissions
file: state=directory owner=archweb group=archweb path="{{ archweb_home }}"
- name: copy archweb-reporead.service
copy: src="{{ item }}" dest="/etc/systemd/system/{{ item }}" owner=root group=root mode=0644
with_items:
- archweb-reporead.service
- archweb-mirrorcheck.service
- archweb-mirrorcheck.timer
notify:
- daemon reload
- name: configure archweb
template: src=local_settings.py.j2 dest=/srv/http/archweb/local_settings.py owner=archweb group=archweb mode=660
- name: start and enable archweb services
service: name="{{ item }}" enabled=yes state=started
with_items:
- archweb-reporead.service
- archweb-mirrorcheck.timer
# Django settings for archlinux project.
## Database settings
DATABASES = {
'default': {
'ENGINE' : 'django.db.backends.postgresql_psycopg2',
'NAME' : 'archweb',
'USER' : 'archweb_update',
'PASSWORD': '{{ postgres_users.archweb_update }}',
'HOST' : 'gudrun.archlinux.org',
'OPTIONS' : {
'autocommit': True,
'application_name': 'archweb',
'sslmode': 'require',
}
}
}
## Make this unique, and don't share it with anybody.
SECRET_KEY = '{{ archweb_secret_key }}'
## Cache settings
CACHE_BACKEND = 'memcached://gudrun.archlinux.org:11211'
CACHE_MIDDLEWARE_SECONDS = 300
CACHE_MIDDLEWARE_KEY_PREFIX = 'arch'
# vim: set ts=4 sw=4 et:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment