mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
[cleanup] removed installers
This commit is contained in:
parent
e5c8966a00
commit
8278ff9792
@ -1,7 +0,0 @@
|
||||
---
|
||||
|
||||
- hosts: local
|
||||
sudo: true
|
||||
roles:
|
||||
- add_repos
|
||||
- install_n_configure_packages
|
@ -1,11 +0,0 @@
|
||||
The playbook main.yml contains two roles: add_repos and install_packages. It's configured to work with Debian, Ubuntu and CentOS. <br>
|
||||
Additional playbook wkhtmltopdf.yml is for optional package wkhtmltopdf. <br>
|
||||
<br>
|
||||
To use ansible playbooks: <br>
|
||||
1. install ansible following the [tutorial](http://docs.ansible.com/ansible/intro_installation.html) <br>
|
||||
2. add the following lines to file `/etc/ansible/hosts` for installation on local machine: <br>
|
||||
`[local]` <br>
|
||||
`localhost ansible_connection=local` <br>
|
||||
3. run ansible-playbook: <br>
|
||||
`ansible-playbook main.yml` to prepare environment for bench package<br>
|
||||
or `ansible-playbook wkhtmltopdf.yml` to install optional package wkhtmltopdf.
|
@ -1,38 +0,0 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
@ -1,2 +0,0 @@
|
||||
---
|
||||
# defaults file for add_repos
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
echo "[mariadb]" > $1
|
||||
echo "name = MariaDB" >> $1
|
||||
OS_VER=`cat /etc/redhat-release | sed 's/Linux\ //g' | cut -d" " -f3 | cut -d. -f1`
|
||||
ARCH=`uname -m | sed 's/x86_/amd/;s/i[3-6]86/x86/'`
|
||||
echo "baseurl = http://yum.mariadb.org/10.0/centos$OS_VER-$ARCH" >> $1
|
||||
echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB" >> $1
|
||||
echo "gpgcheck=1" >> $1
|
@ -1,2 +0,0 @@
|
||||
---
|
||||
# handlers file for add_repos
|
@ -1,139 +0,0 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description:
|
||||
company: your company (optional)
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
# Some suggested licenses:
|
||||
# - BSD (default)
|
||||
# - MIT
|
||||
# - GPLv2
|
||||
# - GPLv3
|
||||
# - Apache
|
||||
# - CC-BY
|
||||
license: license (GPLv2, CC-BY, etc)
|
||||
min_ansible_version: 1.2
|
||||
#
|
||||
# Below are all platforms currently available. Just uncomment
|
||||
# the ones that apply to your role. If you don't see your
|
||||
# platform on this list, let us know and we'll get it added!
|
||||
#
|
||||
#platforms:
|
||||
#- name: EL
|
||||
# versions:
|
||||
# - all
|
||||
# - 5
|
||||
# - 6
|
||||
# - 7
|
||||
#- name: GenericUNIX
|
||||
# versions:
|
||||
# - all
|
||||
# - any
|
||||
#- name: Fedora
|
||||
# versions:
|
||||
# - all
|
||||
# - 16
|
||||
# - 17
|
||||
# - 18
|
||||
# - 19
|
||||
# - 20
|
||||
# - 21
|
||||
# - 22
|
||||
#- name: Windows
|
||||
# versions:
|
||||
# - all
|
||||
# - 2012R2
|
||||
#- name: SmartOS
|
||||
# versions:
|
||||
# - all
|
||||
# - any
|
||||
#- name: opensuse
|
||||
# versions:
|
||||
# - all
|
||||
# - 12.1
|
||||
# - 12.2
|
||||
# - 12.3
|
||||
# - 13.1
|
||||
# - 13.2
|
||||
#- name: Amazon
|
||||
# versions:
|
||||
# - all
|
||||
# - 2013.03
|
||||
# - 2013.09
|
||||
#- name: GenericBSD
|
||||
# versions:
|
||||
# - all
|
||||
# - any
|
||||
#- name: FreeBSD
|
||||
# versions:
|
||||
# - all
|
||||
# - 8.0
|
||||
# - 8.1
|
||||
# - 8.2
|
||||
# - 8.3
|
||||
# - 8.4
|
||||
# - 9.0
|
||||
# - 9.1
|
||||
# - 9.1
|
||||
# - 9.2
|
||||
#- name: Ubuntu
|
||||
# versions:
|
||||
# - all
|
||||
# - lucid
|
||||
# - maverick
|
||||
# - natty
|
||||
# - oneiric
|
||||
# - precise
|
||||
# - quantal
|
||||
# - raring
|
||||
# - saucy
|
||||
# - trusty
|
||||
# - utopic
|
||||
# - vivid
|
||||
#- name: SLES
|
||||
# versions:
|
||||
# - all
|
||||
# - 10SP3
|
||||
# - 10SP4
|
||||
# - 11
|
||||
# - 11SP1
|
||||
# - 11SP2
|
||||
# - 11SP3
|
||||
#- name: GenericLinux
|
||||
# versions:
|
||||
# - all
|
||||
# - any
|
||||
#- name: Debian
|
||||
# versions:
|
||||
# - all
|
||||
# - etch
|
||||
# - jessie
|
||||
# - lenny
|
||||
# - squeeze
|
||||
# - wheezy
|
||||
#
|
||||
# Below are all categories currently available. Just as with
|
||||
# the platforms above, uncomment those that apply to your role.
|
||||
#
|
||||
#categories:
|
||||
#- cloud
|
||||
#- cloud:ec2
|
||||
#- cloud:gce
|
||||
#- cloud:rax
|
||||
#- clustering
|
||||
#- database
|
||||
#- database:nosql
|
||||
#- database:sql
|
||||
#- development
|
||||
#- monitoring
|
||||
#- networking
|
||||
#- packaging
|
||||
#- system
|
||||
#- web
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line.
|
||||
# Be sure to remove the '[]' above if you add dependencies
|
||||
# to this list.
|
||||
|
@ -1,95 +0,0 @@
|
||||
---
|
||||
# tasks file for add_repos
|
||||
#- hosts: local
|
||||
# tasks:
|
||||
|
||||
###### MariaDB repo setup for rpm platforms
|
||||
- name: "Check if MariaDB repo already added CentOS"
|
||||
stat: path=/etc/yum.repos.d/mariadb.repo
|
||||
register: mariadb_repo
|
||||
when: (ansible_distribution == "CentOS")
|
||||
|
||||
- name: "Adding MariaDB repo CentOS"
|
||||
script: ../files/create_mariadb_repo_centos.sh /etc/yum.repos.d/mariadb.repo
|
||||
when: (ansible_distribution == "CentOS") and mariadb_repo.stat.exists == False
|
||||
|
||||
|
||||
###### epel & ius installation for CentOS
|
||||
- name: "Check if epel-release is installed CentOS"
|
||||
when: (ansible_distribution == "CentOS")
|
||||
shell: rpm -q epel-release | grep "not installed" | wc -l
|
||||
register: epel_release_check
|
||||
|
||||
- name: "Installing epel rpm for CentOS 6"
|
||||
yum: name=http://dl.iuscommunity.org/pub/ius/stable/CentOS/{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/epel-release-6-5.noarch.rpm state=present
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "6") and (epel_release_check.stdout == "1")
|
||||
|
||||
- name: "Install epel for CentOS 7"
|
||||
yum: name=epel-release state=present
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "7") and (epel_release_check.rc == 1)
|
||||
|
||||
- name: "Check if ius is installed on CentOS 6"
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "6")
|
||||
shell: rpm -q ius-release | grep "not installed" | wc -l
|
||||
register: ius_rpm_check
|
||||
|
||||
- name: "Installing ius rpm for CentOS 6"
|
||||
yum: name=http://dl.iuscommunity.org/pub/ius/stable/CentOS/{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/ius-release-1.0-14.ius.centos6.noarch.rpm state=present
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "6") and (ius_rpm_check.stdout == "1")
|
||||
|
||||
###### install packages required for node.js & mariadb repo installation in Debian/Ubuntu
|
||||
|
||||
- name: "Check if software-properties-common is already installed Debian"
|
||||
shell: dpkg-query -W software-properties-common | grep "no packages found" | wc -l
|
||||
when: (ansible_distribution == "Debian")
|
||||
register: spc_installed
|
||||
|
||||
- name: "Install software properties Debian"
|
||||
apt: name=software-properties-common
|
||||
when: (ansible_distribution == "Debian") and (spc_installed.stdout == "1")
|
||||
|
||||
- name: "Check if python-software-properties is already installed Debian"
|
||||
shell: dpkg-query -W python-software-properties | grep "no packages found" | wc -l
|
||||
ignore_errors: yes
|
||||
when: (ansible_distribution == "Debian")
|
||||
register: psp_installed
|
||||
|
||||
- name: "Install python software properties Debian"
|
||||
apt: name=python-software-properties
|
||||
when: (ansible_distribution == "Debian") and (psp_installed.stdout == "1")
|
||||
|
||||
- name: "Check if MariaDB key is already installed Debian/Ubuntu"
|
||||
shell: apt-key list | grep "package-signing-key@mariadb.org" | wc -l
|
||||
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu")
|
||||
register: mariadb_key_installed
|
||||
|
||||
- name: "Receive MariaDB key Debian/Ubuntu"
|
||||
apt_key: keyserver=keyserver.ubuntu.com id=0xcbcb082a1bb943db
|
||||
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu") and (mariadb_key_installed.stdout == "0")
|
||||
|
||||
- name: "Check if MariaDB repo is already added Debian/Ubuntu"
|
||||
shell: find /etc/apt/ -name *.list | xargs cat | grep ^[[:space:]]*deb | grep -i mariadb | wc -l
|
||||
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu")
|
||||
register: mariadb_repo_deb
|
||||
|
||||
- name: "Add MariaDB repo Debian"
|
||||
apt_repository: repo="deb http://ams2.mirrors.digitalocean.com/mariadb/repo/10.0/debian {{ ansible_distribution_release }} main" update_cache=yes
|
||||
when: (ansible_distribution == "Debian" and ansible_distribution_major_version >= 6) and (mariadb_repo_deb.stdout == "0")
|
||||
|
||||
- name: "Add MariaDB repo Ubuntu"
|
||||
apt_repository: repo="deb http://ams2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu {{ ansible_distribution_release }} main" update_cache=yes
|
||||
when: (ansible_distribution == "Ubuntu") and (mariadb_repo_deb.stdout == "0")
|
||||
|
||||
- name: "Check if Nodesource repo is already added Debian"
|
||||
shell: find /etc/apt/ -name *.list | xargs cat | grep ^[[:space:]]*deb | grep -i node | wc -l
|
||||
when: (ansible_distribution == "Debian")
|
||||
register: nodesource_repo
|
||||
|
||||
- name: "Install Nodesource Node.js repo Debian"
|
||||
shell: curl -sL https://deb.nodesource.com/setup_0.12 | bash -
|
||||
when: (ansible_distribution == "Debian") and (nodesource_repo.stdout == 0)
|
||||
|
||||
- name: "Update repository cache Debian/Ubuntu"
|
||||
apt: update_cache=yes
|
||||
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu")
|
||||
|
@ -1,38 +0,0 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
@ -1,2 +0,0 @@
|
||||
---
|
||||
# defaults file for install_packages
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
res=$(chkconfig | grep $1 | awk 'BEGIN {RS = ":"}; {print $0}' | grep `runlevel | cut -d" " -f2` | grep on | wc -l)
|
||||
echo -n $res
|
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
echo "[mysqld]
|
||||
innodb-file-format=barracuda
|
||||
innodb-file-per-table=1
|
||||
innodb-large-prefix=1
|
||||
character-set-client-handshake = FALSE
|
||||
character-set-server = utf8mb4
|
||||
collation-server = utf8mb4_unicode_ci
|
||||
|
||||
[mysql]
|
||||
default-character-set = utf8mb4" > $1
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
debconf-set-selections <<< "postfix postfix/mailname string `hostname`"
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
debconf-set-selections <<< "mariadb-server-5.5 mysql-server/root_password password $1"
|
||||
debconf-set-selections <<< "mariadb-server-5.5 mysql-server/root_password_again password $1"
|
@ -1,2 +0,0 @@
|
||||
---
|
||||
# handlers file for install_packages
|
@ -1,139 +0,0 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description:
|
||||
company: your company (optional)
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
# Some suggested licenses:
|
||||
# - BSD (default)
|
||||
# - MIT
|
||||
# - GPLv2
|
||||
# - GPLv3
|
||||
# - Apache
|
||||
# - CC-BY
|
||||
license: license (GPLv2, CC-BY, etc)
|
||||
min_ansible_version: 1.2
|
||||
#
|
||||
# Below are all platforms currently available. Just uncomment
|
||||
# the ones that apply to your role. If you don't see your
|
||||
# platform on this list, let us know and we'll get it added!
|
||||
#
|
||||
#platforms:
|
||||
#- name: EL
|
||||
# versions:
|
||||
# - all
|
||||
# - 5
|
||||
# - 6
|
||||
# - 7
|
||||
#- name: GenericUNIX
|
||||
# versions:
|
||||
# - all
|
||||
# - any
|
||||
#- name: Fedora
|
||||
# versions:
|
||||
# - all
|
||||
# - 16
|
||||
# - 17
|
||||
# - 18
|
||||
# - 19
|
||||
# - 20
|
||||
# - 21
|
||||
# - 22
|
||||
#- name: Windows
|
||||
# versions:
|
||||
# - all
|
||||
# - 2012R2
|
||||
#- name: SmartOS
|
||||
# versions:
|
||||
# - all
|
||||
# - any
|
||||
#- name: opensuse
|
||||
# versions:
|
||||
# - all
|
||||
# - 12.1
|
||||
# - 12.2
|
||||
# - 12.3
|
||||
# - 13.1
|
||||
# - 13.2
|
||||
#- name: Amazon
|
||||
# versions:
|
||||
# - all
|
||||
# - 2013.03
|
||||
# - 2013.09
|
||||
#- name: GenericBSD
|
||||
# versions:
|
||||
# - all
|
||||
# - any
|
||||
#- name: FreeBSD
|
||||
# versions:
|
||||
# - all
|
||||
# - 8.0
|
||||
# - 8.1
|
||||
# - 8.2
|
||||
# - 8.3
|
||||
# - 8.4
|
||||
# - 9.0
|
||||
# - 9.1
|
||||
# - 9.1
|
||||
# - 9.2
|
||||
#- name: Ubuntu
|
||||
# versions:
|
||||
# - all
|
||||
# - lucid
|
||||
# - maverick
|
||||
# - natty
|
||||
# - oneiric
|
||||
# - precise
|
||||
# - quantal
|
||||
# - raring
|
||||
# - saucy
|
||||
# - trusty
|
||||
# - utopic
|
||||
# - vivid
|
||||
#- name: SLES
|
||||
# versions:
|
||||
# - all
|
||||
# - 10SP3
|
||||
# - 10SP4
|
||||
# - 11
|
||||
# - 11SP1
|
||||
# - 11SP2
|
||||
# - 11SP3
|
||||
#- name: GenericLinux
|
||||
# versions:
|
||||
# - all
|
||||
# - any
|
||||
#- name: Debian
|
||||
# versions:
|
||||
# - all
|
||||
# - etch
|
||||
# - jessie
|
||||
# - lenny
|
||||
# - squeeze
|
||||
# - wheezy
|
||||
#
|
||||
# Below are all categories currently available. Just as with
|
||||
# the platforms above, uncomment those that apply to your role.
|
||||
#
|
||||
#categories:
|
||||
#- cloud
|
||||
#- cloud:ec2
|
||||
#- cloud:gce
|
||||
#- cloud:rax
|
||||
#- clustering
|
||||
#- database
|
||||
#- database:nosql
|
||||
#- database:sql
|
||||
#- development
|
||||
#- monitoring
|
||||
#- networking
|
||||
#- packaging
|
||||
#- system
|
||||
#- web
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line.
|
||||
# Be sure to remove the '[]' above if you add dependencies
|
||||
# to this list.
|
||||
|
@ -1,40 +0,0 @@
|
||||
---
|
||||
- name: "Check if supervisor is already added in services CentOS6"
|
||||
script: ../files/check_if_service_is_on.sh supervisord
|
||||
register: supervisor_service
|
||||
|
||||
- name: "Add supervisord as a service CentOS6"
|
||||
command: chkconfig --add supervisord
|
||||
when: (supervisor_service.stdout == "0")
|
||||
|
||||
- name: "Check if redis service is on CentOS6"
|
||||
script: ../files/check_if_service_is_on.sh redis
|
||||
register: redis_is_on
|
||||
|
||||
- name: "Set redis service on CentOS6"
|
||||
shell: chkconfig redis on
|
||||
when: (redis_is_on.stdout == "0")
|
||||
|
||||
- name: "Check if mysql service is on CentOS6"
|
||||
script: ../files/check_if_service_is_on.sh mysql
|
||||
register: mysql_is_on
|
||||
|
||||
- name: "Set mysql service on CentOS6"
|
||||
shell: chkconfig mysql on
|
||||
when: (mysql_is_on.stdout == "0")
|
||||
|
||||
- name: "Check if nginx service is on CentOS6"
|
||||
script: ../files/check_if_service_is_on.sh nginx
|
||||
register: nginx_is_on
|
||||
|
||||
- name: "Set nginx service on CentOS6"
|
||||
shell: chkconfig nginx on
|
||||
when: (nginx_is_on.stdout == "0")
|
||||
|
||||
- name: "Check if supervisord service is on CentOS6"
|
||||
script: ../files/check_if_service_is_on.sh supervisord
|
||||
register: supervisord_is_on
|
||||
|
||||
- name: "Set supervisord service on CentOS6"
|
||||
shell: chkconfig supervisord on
|
||||
when: (supervisord_is_on.stdout == "0")
|
@ -1,9 +0,0 @@
|
||||
---
|
||||
|
||||
- service: name=nginx enabled=yes
|
||||
|
||||
- service: name=mariadb enabled=yes
|
||||
|
||||
- service: name=redis enabled=yes
|
||||
|
||||
- service: name=supervisord enabled=yes
|
@ -1,22 +0,0 @@
|
||||
---
|
||||
|
||||
- name: "Generate frappe password"
|
||||
shell: echo `cat /dev/urandom | tr -dc "a-zA-Z0-9" | head -c 16`
|
||||
register: frappe_pass
|
||||
|
||||
- name: "Generate password for MariaDB"
|
||||
shell: echo `cat /dev/urandom | tr -dc "a-zA-Z0-9" | head -c 16`
|
||||
register: msq_pass
|
||||
|
||||
- name: "Generate administrator password"
|
||||
shell: echo `cat /dev/urandom | tr -dc "a-zA-Z0-9" | head -c 16`
|
||||
register: admin_pass
|
||||
|
||||
- name: "Save frappe password"
|
||||
shell: echo "frappe password:" > ~/frappe_passwords.sh {{frappe_pass.stdout}} >> ~/frappe_passwords.txt
|
||||
|
||||
- name: "Save MariaDB root password"
|
||||
shell: echo "MariaDB root password:" >> ~/frappe_passwords.sh {{msq_pass.stdout}} >> ~/frappe_passwords.txt
|
||||
|
||||
- name: "Save administrator password"
|
||||
shell: echo "administrator password:" >> ~/frappe_passwords.sh {{admin_pass.stdout}} >> ~/frappe_passwords.txt
|
@ -1,33 +0,0 @@
|
||||
---
|
||||
|
||||
- name: "Install packages list for CentOS 6"
|
||||
yum: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- git
|
||||
- MariaDB-server
|
||||
- MariaDB-client
|
||||
- MariaDB-compat
|
||||
- python-setuptools
|
||||
- nginx
|
||||
- zlib-devel
|
||||
- bzip2-devel
|
||||
- openssl-devel
|
||||
- postfix
|
||||
- python27-devel
|
||||
- python27
|
||||
- libxml2
|
||||
- libxml2-devel
|
||||
- libxslt
|
||||
- libxslt-devel
|
||||
- redis
|
||||
- MariaDB-devel
|
||||
- libXrender
|
||||
- libXext
|
||||
- python27-setuptools
|
||||
- cronie
|
||||
- sudo
|
||||
- which
|
||||
- xorg-x11-fonts-Type1
|
||||
- xorg-x11-fonts-75dpi
|
||||
- nodejs
|
||||
- npm
|
@ -1,38 +0,0 @@
|
||||
---
|
||||
|
||||
- name: "Install packages list for CentOS 7"
|
||||
yum: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- git
|
||||
- mariadb-server
|
||||
- mariadb-devel
|
||||
- python-setuptools
|
||||
- nginx
|
||||
- zlib-devel
|
||||
- bzip2-devel
|
||||
- openssl-devel
|
||||
- postfix
|
||||
- python-devel
|
||||
- libxml2
|
||||
- libxml2-devel
|
||||
- libxslt
|
||||
- libxslt-devel
|
||||
- redis
|
||||
- libXrender
|
||||
- libXext
|
||||
- supervisor
|
||||
- cronie
|
||||
- sudo
|
||||
- which
|
||||
- xorg-x11-fonts-75dpi
|
||||
- xorg-x11-fonts-Type1
|
||||
- nodejs
|
||||
- npm
|
||||
- libtiff-devel
|
||||
- libjpeg-devel
|
||||
- libzip-devel
|
||||
- freetype-devel
|
||||
- lcms2-devel
|
||||
- libwebp-devel
|
||||
- tcl-devel
|
||||
- tk-devel
|
@ -1,33 +0,0 @@
|
||||
---
|
||||
|
||||
|
||||
- name: "Install list of common packages for Debian/Ubuntu"
|
||||
apt: pkg={{ item }} state=present update_cache=yes
|
||||
with_items:
|
||||
- python-dev
|
||||
- python-setuptools
|
||||
- build-essential
|
||||
- python-mysqldb
|
||||
- git
|
||||
- ntp
|
||||
- vim
|
||||
- screen
|
||||
- htop
|
||||
- mariadb-server
|
||||
- mariadb-common
|
||||
- libmariadbclient-dev
|
||||
- libxslt1.1
|
||||
- libxslt1-dev
|
||||
- redis-server
|
||||
- libssl-dev
|
||||
- libcrypto++-dev
|
||||
- postfix
|
||||
- nginx
|
||||
- supervisor
|
||||
- fontconfig
|
||||
- libxrender1
|
||||
- libxext6
|
||||
- xfonts-75dpi
|
||||
- xfonts-base
|
||||
- nodejs
|
||||
- npm
|
@ -1,14 +0,0 @@
|
||||
---
|
||||
|
||||
- name: "Install packages for Debian 8"
|
||||
apt: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- libtiff5-dev
|
||||
- libjpeg62-turbo-dev
|
||||
- zlib1g-dev
|
||||
- libfreetype6-dev
|
||||
- liblcms2-dev
|
||||
- libwebp-dev
|
||||
- tcl8.5-dev
|
||||
- tk8.5-dev
|
||||
- python-tk
|
@ -1,14 +0,0 @@
|
||||
---
|
||||
|
||||
- name: "Install packages for Ubuntu/Debian except from Precise and 8"
|
||||
apt: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- libtiff5-dev
|
||||
- libjpeg8-dev
|
||||
- zlib1g-dev
|
||||
- libfreetype6-dev
|
||||
- liblcms2-dev
|
||||
- libwebp-dev
|
||||
- tcl8.6-dev
|
||||
- tk8.6-dev
|
||||
- python-tk
|
@ -1,14 +0,0 @@
|
||||
---
|
||||
|
||||
- name: "Install packages for Ubuntu Precise Pangolin"
|
||||
apt: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- libtiff4-dev
|
||||
- libjpeg8-dev
|
||||
- zlib1g-dev
|
||||
- libfreetype6-dev
|
||||
- liblcms2-dev
|
||||
- libwebp-dev
|
||||
- tcl8.5-dev
|
||||
- tk8.5-dev
|
||||
- python-tk
|
@ -1,51 +0,0 @@
|
||||
---
|
||||
- name: "Check if supervisor is already installed CentOS 6"
|
||||
shell: rpm -q supervisor | grep "not installed" | wc -l
|
||||
register: supervisor_installed
|
||||
|
||||
- name: "easy_install supervisor CentOS 6"
|
||||
shell: easy_install supervisor
|
||||
when: (supervisor_installed.stdout == "1")
|
||||
|
||||
- name: "Check if supervisor init config already exists"
|
||||
stat: path=/etc/init.d/supervisord
|
||||
register: init_supervisor
|
||||
|
||||
- name: "Fill in supervisor init config"
|
||||
shell: curl -Ss https://raw.githubusercontent.com/pdvyas/supervisor-initscripts/master/redhat-init-jkoppe > /etc/init.d/supervisord
|
||||
when: (init_supervisor.stat.exists == False)
|
||||
|
||||
- name: "Check if supervisor sysconfig already exists"
|
||||
stat: path=/etc/sysconfig/supervisord
|
||||
register: sysconfig_supervisor
|
||||
|
||||
- name: "Fill in supervisor sysconfig"
|
||||
shell: curl -Ss https://raw.githubusercontent.com/pdvyas/supervisor-initscripts/master/redhat-sysconfig-jkoppe > /etc/sysconfig/supervisord
|
||||
when: (sysconfig_supervisor.stat.exists == False)
|
||||
|
||||
- name: "Check if supervisor etc conf already exists"
|
||||
stat: path=/etc/supervisord.conf
|
||||
register: etc_supervisor
|
||||
|
||||
- name: "Fill in supervisor etc conf"
|
||||
shell: curl -Ss https://raw.githubusercontent.com/pdvyas/supervisor-initscripts/master/supervisord.conf > /etc/supervisord.conf
|
||||
when: (etc_supervisor.stat.exists == False)
|
||||
|
||||
- name: "Check if supervisor.d already exists"
|
||||
stat: path=/etc/supervisor.d
|
||||
register: supervisor_d
|
||||
|
||||
- name: "Create supervisor.d"
|
||||
shell: mkdir /etc/supervisor.d
|
||||
when: (supervisor_d.stat.exists == False)
|
||||
|
||||
- name: "Check attributes of /etc/init.d/supervisord"
|
||||
stat: path=/etc/init.d/supervisord
|
||||
register: init_supervisor_file
|
||||
|
||||
- name: "Set /etc/init.d/supervisord executable"
|
||||
shell: chmod +x /etc/init.d/supervisord
|
||||
when: (init_supervisor_file.stat.xoth == False or init_supervisor_file.stat.xusr == False or init_supervisor_file.stat.xgrp == False)
|
||||
|
||||
- name: "Start supervisord service CentOS6"
|
||||
shell: service supervisord start || true
|
@ -1,86 +0,0 @@
|
||||
---
|
||||
# tasks file for install_packages
|
||||
|
||||
- name: "Check if there is already frappe_passwords.sh file"
|
||||
stat: path=/root/frappe_passwords.sh
|
||||
register: passwords_exist
|
||||
|
||||
- include: generate_passwords.yml
|
||||
when: passwords_exist.stat.exists == False
|
||||
|
||||
- include: setup_debconf.yml
|
||||
when: (ansible_distribution == "Debian")
|
||||
|
||||
###### Install bunch of packages
|
||||
- include: install_packages_deb.yml
|
||||
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu")
|
||||
|
||||
- include: install_packages_precise.yml
|
||||
when: (ansible_distribution_release == "precise")
|
||||
|
||||
- include: install_packages_deb8.yml
|
||||
when: (ansible_distribution == "Debian" and ansible_distribution_major_version == "8")
|
||||
|
||||
- include: install_packages_deb_else.yml
|
||||
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu") and (ansible_distribution_major_version != "8" and ansible_distribution_release == "precise")
|
||||
|
||||
- name: "Install wget CentOS"
|
||||
when: (ansible_distribution == "CentOS")
|
||||
yum: name=wget state=present
|
||||
|
||||
- name: "Install Development tools CentOS"
|
||||
when: (ansible_distribution == "CentOS")
|
||||
yum: name="@Development tools" state=present
|
||||
|
||||
- include: install_packages_centos6.yml
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "6")
|
||||
|
||||
- include: install_packages_centos7.yml
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "7")
|
||||
|
||||
- include: install_supervisor_centos6.yml
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "6")
|
||||
|
||||
###### Configure & launch services
|
||||
- include: configure_services_centos6.yml
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "6")
|
||||
|
||||
- include: start_services_centos6.yml
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "6")
|
||||
|
||||
- include: configure_services_centos7.yml
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "7")
|
||||
|
||||
- include: start_services_centos7.yml
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "7")
|
||||
|
||||
- name: "Check if need to configure MariaDB Debian"
|
||||
stat: path=/etc/mysql/conf.d/barracuda.cnf
|
||||
register: mariadb_configuration_deb
|
||||
when: (ansible_distribution == "Debian")
|
||||
|
||||
- name: "Create MariaDB configuration Debian"
|
||||
script: ../files/create_mariadb_config.sh /etc/mysql/conf.d/barracuda.cnf
|
||||
when: (ansible_distribution == "Debian") and (mariadb_configuration_deb.stat.exists == False)
|
||||
|
||||
- name: "Check if need to configure MariaDB CentOS"
|
||||
stat: path=/etc/my.cnf.d/barracuda.cnf
|
||||
register: mariadb_configuration_cent
|
||||
when: (ansible_distribution == "CentOS")
|
||||
|
||||
- name: "Create MariaDB configuration CentOS"
|
||||
script: ../files/create_mariadb_config.sh /etc/my.cnf.d/barracuda.cnf
|
||||
when: (ansible_distribution == "CentOS") and (mariadb_configuration_cent.stat.exists == False)
|
||||
|
||||
- name: "Restart MariaDB service CentOS7"
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "7")
|
||||
service: name=mariadb state=restarted
|
||||
|
||||
- name: "Restart MariaDB service CentOS6"
|
||||
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "6")
|
||||
service: name=mysql state=restarted
|
||||
|
||||
- name: "Restart MariaDB service Debian/Ubuntu"
|
||||
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu")
|
||||
service: name=mysql state=restarted
|
||||
|
@ -1,25 +0,0 @@
|
||||
---
|
||||
- name: "Check if postfix hostname is already configured"
|
||||
shell: debconf-show postfix | grep mailname | wc -l
|
||||
register: postfix_mailname
|
||||
|
||||
- name: "Debconf postfix hostname"
|
||||
script: ../files/debconf_postfix_mailname.sh
|
||||
when: (postfix_mailname.stdout == "0")
|
||||
|
||||
- name: "Check if postfix main_mailer_type is already configured"
|
||||
shell: debconf-show postfix | grep main_mailer_type | wc -l
|
||||
register: postfix_main_mailer_type
|
||||
|
||||
- name: "Debconf postfix main_mailer_type"
|
||||
script: ../files/debconf_postfix_main_mailer.sh
|
||||
when: (postfix_main_mailer_type.stdout == "0")
|
||||
|
||||
- name: "Check if MariaDB password is already configured"
|
||||
shell: debconf-show mariadb-server-5.5 | grep "password" | wc -l
|
||||
register: pass_configured
|
||||
|
||||
- name: "Debconf MariaDB password"
|
||||
script: ../files/set_mariadb_password.sh {{ msq_pass }}
|
||||
when: (pass_configured.stdout == "0")
|
||||
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
|
||||
- service: name=nginx state=started
|
||||
|
||||
- service: name=mysql state=started
|
||||
|
||||
- service: name=redis state=started
|
@ -1,9 +0,0 @@
|
||||
---
|
||||
|
||||
- service: name=nginx state=started
|
||||
|
||||
- service: name=mariadb state=started
|
||||
|
||||
- service: name=redis state=started
|
||||
|
||||
- service: name=supervisord state=started
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
|
||||
#msq_pass: shell MSQ_PASS=$(echo `echo ololo`) echo $MSQ_PASS
|
@ -1,29 +0,0 @@
|
||||
---
|
||||
- hosts: local
|
||||
sudo: true
|
||||
vars:
|
||||
tasks:
|
||||
|
||||
- name: "Generate appropriate OS name"
|
||||
shell: echo {{ ansible_distribution }} | awk '{print tolower($0)}'
|
||||
register: os_name
|
||||
|
||||
- name: "Generate appropriate architecture name"
|
||||
shell: uname -m | sed 's/x86_/amd/;s/i[3-6]86/x86/'
|
||||
register: os_arch
|
||||
|
||||
- name: "Install wkhtmltopdf CentOS"
|
||||
when: (ansible_distribution == "CentOS")
|
||||
yum: name="http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-{{ os_name.stdout }}{{ ansible_distribution_major_version }}-{{ os_arch.stdout }}.rpm"
|
||||
|
||||
- name: "Downloading wkhtmltopdf .deb package Debian/Ubuntu"
|
||||
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu")
|
||||
shell: wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-{{ ansible_distribution_release }}-{{ os_arch.stdout }}.deb -O /tmp/wkhtmltopdf.deb
|
||||
|
||||
- name: "Installing wkhtmltopdf.deb Debian/Ubuntu"
|
||||
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu")
|
||||
apt: deb=/tmp/wkhtmltopdf.deb state=installed
|
||||
|
||||
- name: "Cleaning /tmp/wkhtmltopdf.deb"
|
||||
when: (ansible_distribution == "Debian" or ansible_distribution == "Ubuntu")
|
||||
shell: rm /tmp/wkhtmltopdf.deb
|
@ -1,110 +0,0 @@
|
||||
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
|
||||
# http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula
|
||||
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
|
||||
|
||||
class Bench < Formula
|
||||
desc "Metadata driven, full-stack web framework"
|
||||
homepage "https://github.com/frappe/bench/blob/master/README.md"
|
||||
url "https://github.com/nginn/bench/raw/master/installers/rpm_package_build/bench-0.92.tar.gz"
|
||||
sha256 ""
|
||||
|
||||
resource "click" do
|
||||
url "https://pypi.python.org/packages/source/c/click/click-6.2.tar.gz"
|
||||
sha256 "fba0ff70f5ebb4cebbf64c40a8fbc222fb7cf825237241e548354dabe3da6a82"
|
||||
end
|
||||
|
||||
resource "jinja2" do
|
||||
url "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.8.tar.gz"
|
||||
sha256 "bc1ff2ff88dbfacefde4ddde471d1417d3b304e8df103a7a9437d47269201bf4"
|
||||
end
|
||||
|
||||
resource "virtualenv" do
|
||||
url "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-13.1.2.tar.gz"
|
||||
sha256 "aabc8ef18cddbd8a2a9c7f92bc43e2fea54b1147330d65db920ef3ce9812e3dc"
|
||||
end
|
||||
|
||||
resource "requests" do
|
||||
url "https://pypi.python.org/packages/source/r/requests/requests-2.9.1.tar.gz"
|
||||
sha256 "c577815dd00f1394203fc44eb979724b098f88264a9ef898ee45b8e5e9cf587f"
|
||||
end
|
||||
|
||||
resource "honcho" do
|
||||
url "https://pypi.python.org/packages/2.7/h/honcho/honcho-0.6.6-py2.py3-none-any.whl"
|
||||
sha256 "40dd530712ce14162ce1bf51f6a5cbb1ab2861da62e5db5816539976a9a5408c"
|
||||
end
|
||||
|
||||
resource "semantic_version" do
|
||||
url "https://pypi.python.org/packages/source/s/semantic_version/semantic_version-2.4.2.tar.gz"
|
||||
sha256 "7e8b7fa74a3bc9b6e90b15b83b9bc2377c78eaeae3447516425f475d5d6932d2"
|
||||
end
|
||||
|
||||
resource "gitpython" do
|
||||
url "https://pypi.python.org/packages/source/G/GitPython/GitPython-0.3.2.RC1.tar.gz"
|
||||
sha256 "fd6786684a0d0dd7ebb961da754e3312fafe0c8e88f55ceb09858aa0af6094e0"
|
||||
end
|
||||
|
||||
resource "gitdb" do
|
||||
url "https://pypi.python.org/packages/source/g/gitdb/gitdb-0.6.4.tar.gz"
|
||||
sha256 "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658"
|
||||
end
|
||||
|
||||
resource "markupsafe" do
|
||||
url "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz"
|
||||
sha256 "a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3"
|
||||
end
|
||||
|
||||
resource "smmap" do
|
||||
url "https://pypi.python.org/packages/source/s/smmap/smmap-0.9.0.tar.gz"
|
||||
sha256 "0e2b62b497bd5f0afebc002eda4d90df9d209c30ef257e8673c90a6b5c119d62"
|
||||
end
|
||||
|
||||
|
||||
# depends_on "cmake" => :build
|
||||
#depends_on :x11s
|
||||
depends_on :python if MacOS.version <= :snow_leopard
|
||||
depends_on "honcho"
|
||||
|
||||
def install
|
||||
puts "THERE GOES LIBEXEC"
|
||||
print libexec
|
||||
|
||||
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
||||
%w[click jinja2 virtualenv requests semantic_version gitpython gitdb markupsafe smmap].each do |r|
|
||||
resource(r).stage do
|
||||
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
||||
end
|
||||
end
|
||||
|
||||
# find brew logs directory
|
||||
brew_logs_dir = `find /Users /Library -name Homebrew 2>/dev/null | grep "Logs/Homebrew"`
|
||||
|
||||
# find honcho installation log
|
||||
honcho_log_path = `grep 'honcho' -R #{brew_logs_dir.chop()} | cut -d':' -f1 | uniq`
|
||||
|
||||
# find honcho installation path
|
||||
honcho_path = `grep "prefix" #{honcho_log_path.chop()} | cut -d"=" -f2 `
|
||||
|
||||
# create bash command to make symlinks of honcho in bench site-packages directory
|
||||
make_symlinks_str = "find " + honcho_path.chop() + " -name site-packages | xargs ls -1 | while read line; do ln -s $line " + ENV["PYTHONPATH"] + "; done"
|
||||
system(make_symlinks_str)
|
||||
|
||||
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
||||
system "python", *Language::Python.setup_install_args(libexec)
|
||||
|
||||
bin.install Dir[libexec/"bin/*"]
|
||||
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
||||
end
|
||||
|
||||
test do
|
||||
# `test do` will create, run in and delete a temporary directory.
|
||||
#
|
||||
# This test will fail and we won't accept that! It's enough to just replace
|
||||
# "false" with the main program this formula installs, but it'd be nice if you
|
||||
# were more thorough. Run the test with `brew test bench`. Options passed
|
||||
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
|
||||
#
|
||||
# The installed folder is not in the path, so use the entire path to any
|
||||
# executables being tested: `system "#{bin}/program", "do", "something"`.
|
||||
system "false"
|
||||
end
|
||||
end
|
@ -1,10 +0,0 @@
|
||||
To install bench using this formula use: <br>
|
||||
`brew install bench.rb`
|
||||
<br>
|
||||
To install bench with full output: <br>
|
||||
`brew install --verbose --debug bench.rb`
|
||||
<br><br>
|
||||
|
||||
Useful links: <br>
|
||||
* [Formula Cookbook](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md)
|
||||
* [Homebrew python documentation](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Python-for-Formula-Authors.md)
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
bench (0.92) UNRELEASED; urgency=medium
|
||||
|
||||
* Initial release. (Closes: #XXXXXX)
|
||||
|
||||
-- ng <ng@void> Mon, 21 Dec 2015 16:05:03 +0300
|
@ -1 +0,0 @@
|
||||
9
|
@ -1,17 +0,0 @@
|
||||
Source: bench
|
||||
Maintainer: Frappe Technologies <info@frappe.io>
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Standards-Version: 0.92
|
||||
Build-Depends: python (>= 2.7)
|
||||
|
||||
Package: bench
|
||||
# change to "all" if one package can be used for all achitectures
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, python-dev, python-setuptools, build-essential, python-mysqldb, git,
|
||||
ntp, vim, screen, htop, mariadb-server, mariadb-common, libmariadbclient-dev,
|
||||
libxslt1.1, libxslt1-dev, redis-server, libssl-dev, libcrypto++-dev, postfix, nginx,
|
||||
supervisor, fontconfig, libxrender1, libxext6, xfonts-75dpi, xfonts-base, nodejs, npm,
|
||||
libtiff4-dev | libtiff5-dev, libjpeg8-dev | libjpeg62-turbo-dev,
|
||||
zlib1g-dev, libfreetype6-dev, liblcms2-dev, libwebp-dev, tcl8.5-dev | tcl8.5-dev, tk8.5-dev | tk8.5-dev, python-tk
|
||||
Description: Metadata driven, full-stack web framework
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -h /usr/bin/bench ]; then
|
||||
ln -s /usr/bench/bin/bench /usr/bin/bench
|
||||
fi
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -h /usr/bin/bench ]; then
|
||||
rm -rf /usr/bin/bench
|
||||
fi
|
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
export DH_VIRTUALENV_INSTALL_ROOT=/usr/
|
||||
%:
|
||||
dh $@ --install-suffix '' --with python-virtualenv
|
||||
|
@ -1 +0,0 @@
|
||||
3.0 (quilt)
|
@ -1,28 +0,0 @@
|
||||
To prepare your environment for building .deb package install instruments: <br>
|
||||
`sudo apt-get install build-essential devscripts debhelper` <br>
|
||||
<br>
|
||||
<b>Important:</b> to build .deb package archive name must be in the format $(name)\_$(version).orig.tar.gz <br> and directory within it must be named as $(name)\_$(version)<br><br>
|
||||
|
||||
This build uses <i>dh-virtualenv</i>. For installation please follow the [tutorial] (http://dh-virtualenv.readthedocs.org/en/0.10/tutorial.html)
|
||||
|
||||
To build debian package from scratch: <br>
|
||||
1) unpack archive bench_0.92.orig.tar.gz: <br>
|
||||
`tar -xf bench_0.92.orig.tar.gz` <br>
|
||||
2) copy debian directory in there: <br>
|
||||
`cp -r debian/ bench_0.92/` <br>
|
||||
3) change directory: <br>
|
||||
`cd bench_0.92/` <br>
|
||||
4) run package build: <br>
|
||||
`dpkg-buildpackage -us -uc` <br>
|
||||
5) package is: `../bench_0.92_amd64.deb`<br>
|
||||
<br>
|
||||
If you don't have `gdebi` installed, first you need to run:<br>
|
||||
`sudo apt-get install gdebi-core`<br>
|
||||
To install resulting package with all it's dependencies: <br>
|
||||
`sudo gdebi ../bench_0.92_amd64.deb` <br>
|
||||
Please note that name of package contains your architecture so for 32-bit machines name will differ. <br>
|
||||
<br>
|
||||
<i>Current state</i>: .deb package is installed without problems on all target systems with all dependencies. Build of .deb package fails on Debian8 with version conflict error (because of quilt format), but works on all other platforms.
|
||||
|
||||
Useful links:
|
||||
[Introduction to Debian Packaging](https://wiki.debian.org/IntroDebianPackaging#Step_3:_Add_the_Debian_packaging_files)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
Install packages for standard platforms<br>
|
||||
<b>Contents:</b><br>
|
||||
* `ansible_playbooks` : ansible configuration to prepare environment before installing bench (adds repos, installs packages, configures services)
|
||||
* `brew_formula` : bench.rb formula file and readme.md about it's usage
|
||||
* `deb_package_build` : configuration files for build of .deb package from sources
|
||||
* `packages` : ready-to-be-installed .deb and .rpm packages
|
||||
* `rpm_package_build` : configuration files for build of .rpm package from sources
|
Binary file not shown.
@ -1,69 +0,0 @@
|
||||
%define name bench
|
||||
%define version 0.92
|
||||
%define unmangled_version 0.92
|
||||
%define unmangled_version 0.92
|
||||
%define release 1
|
||||
%define _buildshell /bin/bash
|
||||
|
||||
Summary: Metadata driven, full-stack web framework
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Source0: %{name}-%{unmangled_version}.tar.gz
|
||||
License: GPL
|
||||
Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
Prefix: %{_prefix}
|
||||
BuildArch: i686
|
||||
Vendor: Frappe Technologies <info@frappe.io>
|
||||
Url: https://github.com/frappe/bench
|
||||
|
||||
# for building/installing the package
|
||||
BuildRequires: python
|
||||
|
||||
# centos 6 dependencies
|
||||
%if 0%{rhel} == 6
|
||||
Requires: git, MariaDB-server, MariaDB-client, MariaDB-compat, python-setuptools, nginx
|
||||
Requires: zlib-devel, bzip2-devel, openssl-devel, postfix, python27-devel, python27
|
||||
Requires: libxml2, libxml2-devel, libxslt, libxslt-devel, redis, MariaDB-devel, libXrender, libXext
|
||||
Requires: python27-setuptools, cronie, sudo, which, xorg-x11-fonts-Type1, xorg-x11-fonts-75dpi, nodejs, npm
|
||||
Requires: libtiff-devel, libjpeg-devel, libzip-devel, freetype-devel, lcms2-devel, libwebp-devel, tcl-devel, tk-devel
|
||||
%endif
|
||||
|
||||
# centos 7 dependencies
|
||||
%if 0%{rhel} == 7
|
||||
Requires: git, mariadb-server, mariadb-devel, python-setuptools, nginx
|
||||
Requires: zlib-devel, bzip2-devel, openssl-devel, postfix, python-devel
|
||||
Requires: libxml2, libxml2-devel, libxslt, libxslt-devel, redis, libXrender, libXext
|
||||
Requires: supervisor, cronie, sudo, which, xorg-x11-fonts-75dpi, xorg-x11-fonts-Type1, nodejs, npm
|
||||
Requires: libtiff-devel, libjpeg-devel, libzip-devel, freetype-devel, lcms2-devel, libwebp-devel, tcl-devel, tk-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
UNKNOWN
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version}
|
||||
python2.7 setup.py bdist_wheel
|
||||
|
||||
%install
|
||||
# directory for bench installation
|
||||
mkdir -p build
|
||||
# the following is to install bench locally
|
||||
export ppath=`pwd`/build
|
||||
export PYTHONPATH=$ppath
|
||||
export whl_file=`find . -type f -name *.whl`
|
||||
pip install --root=$ppath $whl_file --ignore-installed
|
||||
# pip installed bench, now moving it to appropriate location in %{buildroot}
|
||||
mkdir -p %{buildroot}/usr/lib/python2.7/site-packages/
|
||||
cp -r build/usr/* %{buildroot}/usr/
|
||||
cp -r bench/ %{buildroot}/usr/lib/python2.7/site-packages/
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc MANIFEST.in LICENSE.md README.md
|
||||
/usr/bin/*
|
||||
/usr/lib/*
|
@ -1,71 +0,0 @@
|
||||
%define name bench
|
||||
%define version 0.92
|
||||
%define unmangled_version 0.92
|
||||
%define unmangled_version 0.92
|
||||
%define release 1
|
||||
%define _buildshell /bin/bash
|
||||
|
||||
Summary: Metadata driven, full-stack web framework
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Source0: %{name}-%{unmangled_version}.tar.gz
|
||||
License: GPL
|
||||
Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
Prefix: %{_prefix}
|
||||
BuildArch: x86_64
|
||||
Vendor: Frappe Technologies <info@frappe.io>
|
||||
Url: https://github.com/frappe/bench
|
||||
|
||||
# for building/installing the package
|
||||
BuildRequires: python
|
||||
|
||||
# centos 6 dependencies
|
||||
%if 0%{rhel} == 6
|
||||
Requires: git, MariaDB-server, MariaDB-client, MariaDB-compat, python-setuptools, nginx
|
||||
Requires: zlib-devel, bzip2-devel, openssl-devel, postfix, python27-devel, python27
|
||||
Requires: libxml2, libxml2-devel, libxslt, libxslt-devel, redis, MariaDB-devel, libXrender, libXext
|
||||
Requires: python27-setuptools, cronie, sudo, which, xorg-x11-fonts-Type1, xorg-x11-fonts-75dpi, nodejs, npm
|
||||
Requires: libtiff-devel, libjpeg-devel, libzip-devel, freetype-devel, lcms2-devel, libwebp-devel, tcl-devel, tk-devel
|
||||
%endif
|
||||
|
||||
# centos 7 dependencies
|
||||
%if 0%{rhel} == 7
|
||||
Requires: git, mariadb-server, mariadb-devel, python-setuptools, nginx
|
||||
Requires: zlib-devel, bzip2-devel, openssl-devel, postfix, python-devel
|
||||
Requires: libxml2, libxml2-devel, libxslt, libxslt-devel, redis, libXrender, libXext
|
||||
Requires: supervisor, cronie, sudo, which, xorg-x11-fonts-75dpi, xorg-x11-fonts-Type1, nodejs, npm
|
||||
Requires: libtiff-devel, libjpeg-devel, libzip-devel, freetype-devel, lcms2-devel, libwebp-devel, tcl-devel, tk-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
UNKNOWN
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version}
|
||||
python setup.py bdist_wheel
|
||||
|
||||
%install
|
||||
# directory for bench installation
|
||||
mkdir -p build
|
||||
# the following is to install bench locally
|
||||
export ppath=`pwd`/build
|
||||
export PYTHONPATH=$ppath
|
||||
export whl_file=`find . -type f -name *.whl`
|
||||
pip install --root=$ppath $whl_file --ignore-installed
|
||||
# pip installed bench, now moving it to appropriate location in %{buildroot}
|
||||
mkdir -p %{buildroot}/usr/lib/python2.7/site-packages/
|
||||
cp -r build/usr/* %{buildroot}/usr/
|
||||
cp -r bench/ %{buildroot}/usr/lib/python2.7/site-packages/
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc MANIFEST.in LICENSE.md README.md
|
||||
/usr/bin/*
|
||||
/usr/lib/*
|
||||
/usr/lib64/*
|
@ -1,36 +0,0 @@
|
||||
<b>Important</b>:
|
||||
* archive name must be in the format $(name)-$(version).tar.gz
|
||||
and directory within it must be named as $(name)-$(version) <br>
|
||||
* filename of the .spec file must be exactly as a package name, do not change it <br>
|
||||
* do not run `rpmdev-setuptree` and `rpmbuild` as a root user <br>
|
||||
|
||||
<i>To prepare</i> your environment for building .rpm package do the following: <br>
|
||||
1. install instruments: <br>
|
||||
`sudo yum install epel-release rpmdevtools yum-utils` <br>
|
||||
2. install latest pip and wheel (you can also look at this [documentation](https://pip.pypa.io/en/stable/installing/)):<br>
|
||||
`wget https://bootstrap.pypa.io/get-pip.py`<br>
|
||||
`sudo python get-pip.py`<br>
|
||||
3. create directory hierarchy for rpm (this will create directory ~/rpmbuild with the subdirectories BUILD RPMS SOURCES SPECS SRPMS): <br>
|
||||
`rpmdev-setuptree` <br>
|
||||
4. place `bench.spec` into ~/rpmbuild/SPECS <br>
|
||||
5. place `bench-0.92.tar.gz` into ~/rpmbuild/SOURCES <br>
|
||||
6. install all required for .rpm building dependencies: <br>
|
||||
`sudo yum-builddep ~/rpmbuild/SPECS/bench.spec`
|
||||
<br>
|
||||
|
||||
<i>To build</i> .rpm package run: <br>
|
||||
`rpmbuild -ba ~/rpmbuild/SPECS/bench.spec` <br>
|
||||
The resulting .rpm will be in `~/rpmbuild/RPMS/` and .srpm in `~/rpmbuild/SRPMS`
|
||||
|
||||
<i>To install</i> .rpm package run: <br>
|
||||
`sudo yum localinstall path/to/rpm/package` <br>
|
||||
<br>
|
||||
|
||||
Useful links:
|
||||
[rpm packaging tutorial] (http://www.ibm.com/developerworks/library/l-rpm1/)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user