forked from ckan/ckan-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.yml
More file actions
120 lines (101 loc) · 4.16 KB
/
package.yml
File metadata and controls
120 lines (101 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
- hosts: default
user: vagrant
sudo: True
vars_prompt:
- name: version
prompt: "Ckan Version"
private: False
- name: iteration
prompt: "Iteration"
private: False
- name: datapusher
prompt: "Enable datapusher (y/n)?"
default: "y"
private: false
tasks:
- name: install epel
action: command creates=/etc/yum.repos.d/epel.repo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
- name: make sure packages are installed
action: yum pkg=$item state=installed
with_items:
- htop
- rubygems
- python-virtualenv
- python-setuptools
- git
- python-devel
- ruby-devel
- postgresql
- postgresql-libs
- postgresql-devel
- libxml2-devel
- libxslt-devel
- httpd
- rpmdevtools
- gcc
- gcc-c++
- make
- bison
- createrepo
- mod_wsgi
- tomcat6
- cronie
- libselinux-python
- name: install fpm
action: command gem install -v 0.4.21 fpm creates=/usr/local/bin/fpm
- name: remove old code
action: file path=/usr/lib/ckan state=absent
- name: pull ckan version
action: git repo=https://github.com/okfn/ckan dest=/usr/lib/ckan/default/src/ckan version=release-v{{ version }}
- name: get pip
action: easy_install name=https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz
- name: install requirements and make virtualenv
action: pip requirements=/usr/lib/ckan/default/src/ckan/requirements.txt virtualenv=/usr/lib/ckan/default/ virtualenv_site_packages=yes
- name: run setup.py develop for ckan
action: command chdir=/usr/lib/ckan/default/src/ckan/ ../../bin/python setup.py develop
- name: make sure pip is 1.3.1
action: command chdir=/usr/lib/ckan/default/src/ckan/ ../../bin/easy_install https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz
# if datapusher needs to be setup
#- name: install ckanserviceprovider and make virtualenv for datapusher
# action: pip virtualenv=/usr/lib/ckan/datapusher/ virtualenv_site_packages=yes name='git+https://github.com/okfn/ckan-service-provider#egg=ckanserviceprovider'
# when: datapusher == 'y'
#- name: pull datapusher
# action: git dest=/usr/lib/ckan/datapusher/src/datapusher repo=https://github.com/okfn/datapusher
# when: datapusher == 'y'
#- name: run setup.py develop for datapusher
# action: command chdir=/usr/lib/ckan/datapusher/src/datapusher/ ../../bin/python setup.py develop
# when: datapusher == 'y'
- name: create directories
action: file path={{ item }} state=directory
with_items:
- /etc/ckan/default
- /var/www/ckan-repo/master
- name: default apache removed
action: file path=/etc/httpd/conf.d/welcome.conf state=absent
- name: copy all needed files
action: copy src={{ item }} dest=/{{ item }}
with_items:
- etc/ckan/default/who.ini
- etc/ckan/default/apache.wsgi
- etc/httpd/conf.d/ckan.conf
- etc/httpd/conf.d/ckan-repo.conf
- etc/cron.daily/remove_old_sessions
- name: copy executables
action: copy src={{ item }} dest=/{{ item }} mode=744
with_items:
- usr/bin/ckan
- tmp/after_web.sh
- name: restart apache
action: service name=httpd state=restarted
- name: build rpm main
action: command chdir=/var/www/ckan-repo/master/ fpm
-t rpm -s dir
--description='datastore.data.gov web frontend'
--after-install=/tmp/after_web.sh -n datastore.data.gov.web
--iteration $iteration
--version $version
-d memcached -d postgresql -d httpd -d mod_wsgi -d geos -d cronie -d python-psycopg2 -d xmlsec1 -d xmlsec1-openssl -d swig -d m2crypto
--config-files /etc/ckan/default/who.ini --config-files /etc/ckan/default/development.ini --config-files /etc/httpd/conf.d/ckan.conf /usr/bin/ckan /usr/lib/ckan/ /etc/ckan/ /etc/httpd/conf.d/ckan.conf /etc/cron.daily/remove_old_sessions
- name: create repo
action: command createrepo /var/www/ckan-repo/master/