mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 16:36:25 +00:00
Fix nodejs (#310)
* [Fix] Do not validate certificates while downloading node bash script * [Fix] New nodejs installation procedure * [Fix] Updated message for node update to use official node package manager scripts * [Fix] Add travis build status to repo page
This commit is contained in:
parent
b07de2683a
commit
164bc13c95
@ -1,4 +1,4 @@
|
||||
Bench
|
||||
Bench [![Build Status](https://travis-ci.org/frappe/bench.svg?branch=master)](https://travis-ci.org/frappe/bench)
|
||||
=====
|
||||
|
||||
The bench allows you to setup Frappe / ERPNext apps on your local Linux (CentOS 6, Debian 7, Ubuntu, etc) machine or a production server. You can use the bench to serve multiple frappe sites. If you are using a DigitalOcean droplet or any other VPS / Dedicated Server, make sure it has >= 1Gb of ram or has swap setup properly.
|
||||
@ -15,7 +15,7 @@ Easy Setup
|
||||
|
||||
- This is an opinionated setup with logging and SE Linux. So, it is best to setup on a blank server.
|
||||
- Works on Ubuntu 14.04 to 16.04, CentOS 7+, Debian 7 to 8 and MacOS X.
|
||||
- You may have to install Python 2.7 (eg on Ubuntu 16.04+) by running `apt-get install python-minimal`
|
||||
- You may have to install Python 2.7 (eg on Ubuntu 16.04+) by running `apt-get install python-minimal`
|
||||
- This script will install the pre-requisites, install bench and setup an ERPNext site
|
||||
- Passwords for Frappe Administrator and MariaDB (root) will be asked
|
||||
- You can then login as **Administrator** with the Administrator password
|
||||
|
@ -12,9 +12,10 @@ def execute(bench_path):
|
||||
else:
|
||||
click.echo('''
|
||||
No node executable was found on your machine.
|
||||
Please install node 5.x before running "bench update".
|
||||
Installation instructions for CentOS and Ubuntu can be found on the following link,
|
||||
"https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/"
|
||||
Please install latest node version before running "bench update". For installation instructions
|
||||
please refer "Debian and Ubuntu based Linux distributions" section or "Enterprise Linux and
|
||||
Fedora" section depending upon your OS on the following link,
|
||||
"https://nodejs.org/en/download/package-manager/"
|
||||
''')
|
||||
sys.exit(1)
|
||||
|
||||
@ -22,8 +23,10 @@ def execute(bench_path):
|
||||
|
||||
if node_ver < expected_node_ver:
|
||||
click.echo('''
|
||||
Please update node version to 5.x before running "bench update".
|
||||
Installation instructions for CentOS and Ubuntu can be found on the following link,
|
||||
"https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/"
|
||||
Please update node to latest version before running "bench update".
|
||||
Please install latest node version before running "bench update". For installation instructions
|
||||
please refer "Debian and Ubuntu based Linux distributions" section or "Enterprise Linux and
|
||||
Fedora" section depending upon your OS on the following link,
|
||||
"https://nodejs.org/en/download/package-manager/"
|
||||
''')
|
||||
sys.exit(1)
|
||||
|
@ -44,16 +44,17 @@
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Get nodejs 6.x bash script
|
||||
get_url:
|
||||
url: 'https://rpm.nodesource.com/setup_6.x'
|
||||
dest: '/tmp/setup_6.x'
|
||||
mode: 0644
|
||||
- name: Import Node source RPM key
|
||||
rpm_key:
|
||||
key: https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL
|
||||
state: present
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Run nodejs 6.x bash script
|
||||
command: /bin/bash /tmp/setup_6.x
|
||||
- name: Add Node Repo
|
||||
yum:
|
||||
name: 'https://rpm.nodesource.com/pub_6.x/el/{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/nodesource-release-el{{ ansible_distribution_major_version }}-1.noarch.rpm'
|
||||
state: present
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
|
@ -49,10 +49,13 @@
|
||||
- libwebp-dev
|
||||
- python-tk
|
||||
|
||||
# Ensure apt-transport-https
|
||||
- apt-transport-https
|
||||
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: install pillow prerequisites for Debian < 8
|
||||
- name: install pillow prerequisites for Debian < 8
|
||||
apt: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- libjpeg8-dev
|
||||
@ -74,16 +77,19 @@
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Get nodejs 6.x bash script
|
||||
get_url:
|
||||
url: 'https://deb.nodesource.com/setup_6.x'
|
||||
dest: '/tmp/setup_6.x'
|
||||
mode: 0644
|
||||
- name: Add apt key for node repo
|
||||
apt_key:
|
||||
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
|
||||
id: "68576280"
|
||||
state: present
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Run nodejs bash script
|
||||
command: /bin/bash /tmp/setup_6.x
|
||||
- name: Add repo
|
||||
apt_repository:
|
||||
repo: "deb [arch=amd64,i386] https://deb.nodesource.com/node_6.x {{ ansible_distribution_release }} main"
|
||||
state: present
|
||||
update_cache: yes
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
@ -95,7 +101,7 @@
|
||||
force: yes
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
|
||||
# install MariaDB
|
||||
- include: includes/mariadb_debian.yml
|
||||
|
||||
|
@ -34,6 +34,9 @@
|
||||
- libwebp-dev
|
||||
- python-tk
|
||||
|
||||
# Ensure apt-transport-https
|
||||
- apt-transport-https
|
||||
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
@ -57,16 +60,19 @@
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Get nodejs 6.x bash script
|
||||
get_url:
|
||||
url: 'https://deb.nodesource.com/setup_6.x'
|
||||
dest: '/tmp/setup_6.x'
|
||||
mode: 0644
|
||||
- name: Add apt key for node repo
|
||||
apt_key:
|
||||
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
|
||||
id: "68576280"
|
||||
state: present
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Run nodejs bash script
|
||||
command: /bin/bash /tmp/setup_6.x
|
||||
- name: Add repo
|
||||
apt_repository:
|
||||
repo: "deb [arch=amd64,i386] https://deb.nodesource.com/node_6.x {{ ansible_distribution_release }} main"
|
||||
state: present
|
||||
register: node_repo
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user