2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 00:37:51 +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:
Shreyas Patil 2016-09-12 11:19:34 +05:30 committed by Rushabh Mehta
parent b07de2683a
commit 164bc13c95
5 changed files with 47 additions and 31 deletions

View File

@ -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. 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.

View File

@ -12,9 +12,10 @@ def execute(bench_path):
else: else:
click.echo(''' click.echo('''
No node executable was found on your machine. No node executable was found on your machine.
Please install node 5.x before running "bench update". Please install latest node version before running "bench update". For installation instructions
Installation instructions for CentOS and Ubuntu can be found on the following link, please refer "Debian and Ubuntu based Linux distributions" section or "Enterprise Linux and
"https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/" Fedora" section depending upon your OS on the following link,
"https://nodejs.org/en/download/package-manager/"
''') ''')
sys.exit(1) sys.exit(1)
@ -22,8 +23,10 @@ def execute(bench_path):
if node_ver < expected_node_ver: if node_ver < expected_node_ver:
click.echo(''' click.echo('''
Please update node version to 5.x before running "bench update". Please update node to latest version before running "bench update".
Installation instructions for CentOS and Ubuntu can be found on the following link, Please install latest node version before running "bench update". For installation instructions
"https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/" 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) sys.exit(1)

View File

@ -44,16 +44,17 @@
become: yes become: yes
become_user: root become_user: root
- name: Get nodejs 6.x bash script - name: Import Node source RPM key
get_url: rpm_key:
url: 'https://rpm.nodesource.com/setup_6.x' key: https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL
dest: '/tmp/setup_6.x' state: present
mode: 0644
become: yes become: yes
become_user: root become_user: root
- name: Run nodejs 6.x bash script - name: Add Node Repo
command: /bin/bash /tmp/setup_6.x 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: yes
become_user: root become_user: root

View File

@ -49,6 +49,9 @@
- libwebp-dev - libwebp-dev
- python-tk - python-tk
# Ensure apt-transport-https
- apt-transport-https
become: yes become: yes
become_user: root become_user: root
@ -74,16 +77,19 @@
become: yes become: yes
become_user: root become_user: root
- name: Get nodejs 6.x bash script - name: Add apt key for node repo
get_url: apt_key:
url: 'https://deb.nodesource.com/setup_6.x' url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
dest: '/tmp/setup_6.x' id: "68576280"
mode: 0644 state: present
become: yes become: yes
become_user: root become_user: root
- name: Run nodejs bash script - name: Add repo
command: /bin/bash /tmp/setup_6.x 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: yes
become_user: root become_user: root

View File

@ -34,6 +34,9 @@
- libwebp-dev - libwebp-dev
- python-tk - python-tk
# Ensure apt-transport-https
- apt-transport-https
become: yes become: yes
become_user: root become_user: root
@ -57,16 +60,19 @@
become: yes become: yes
become_user: root become_user: root
- name: Get nodejs 6.x bash script - name: Add apt key for node repo
get_url: apt_key:
url: 'https://deb.nodesource.com/setup_6.x' url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
dest: '/tmp/setup_6.x' id: "68576280"
mode: 0644 state: present
become: yes become: yes
become_user: root become_user: root
- name: Run nodejs bash script - name: Add repo
command: /bin/bash /tmp/setup_6.x 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: yes
become_user: root become_user: root