mirror of
https://github.com/frappe/bench.git
synced 2025-02-07 13:18:24 +00:00
[minor] fixes for travis
This commit is contained in:
parent
6878440e6b
commit
94d27493d2
67
README.md
67
README.md
@ -10,60 +10,47 @@ If you have questions, please ask them on our [forum](https://discuss.erpnext.co
|
|||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th width=50%>Production Setup</th>
|
|
||||||
<th width=50%>Development Setup</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Installs with master branch</td>
|
|
||||||
<td>Installs with develop branch</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>The Production setup uses Nginx, and uses Supervisor to manage processes</td>
|
|
||||||
<td>The development setup uses Honcho to manage processes (bench start)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>This setup isn't meant for instant updates in code.</td>
|
|
||||||
<td>Any code changes will be reflected instantly.</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Background services handle all the work, and they start with the system.</td>
|
|
||||||
<td>You need to explicitly start your server</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Uses Celery for job queuing (Frappe 6)</td>
|
|
||||||
<td>Uses RQ for job queuing (Frappe 7)</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
Easy Setup
|
Easy Setup
|
||||||
---------------------
|
----------
|
||||||
|
|
||||||
- This is an opinionated setup with logging and SE Linux. So, it is best to setup on a blank server.
|
- This is an opinionated setup with logging and SE Linux. So, it is best to setup on a blank server.
|
||||||
- Tested on Ubuntu 14.04 to 16.04, CentOS 7+, and MacOS X. If you find any problems, post them on our forum: [https://discuss.erpnext.com](https://discuss.erpnext.com)
|
- Tested on Ubuntu 14.04 to 16.04, CentOS 7+, and MacOS X. If you find any problems, post them on our forum: [https://discuss.erpnext.com](https://discuss.erpnext.com)
|
||||||
- This script will install the pre-requisites, install bench and setup an ERPNext site
|
- This script will install the pre-requisites, install bench and setup an ERPNext site
|
||||||
- Passwords for Frappe Administrator and MariaDB (root) will be asked
|
- Passwords for Frappe Administrator and MariaDB (root) will be asked
|
||||||
- You can then login as **Administrator** with the Administrator password
|
- You can then login as **Administrator** with the Administrator password
|
||||||
|
|
||||||
|
Production vs Develop
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
*Production* setup should be run on a new box and installs nginx and supervisor to manage the processes. *Develop* setup uses `honcho` to manage the processes and uses the built-in web server (`bench start`)
|
||||||
|
|
||||||
|
Steps
|
||||||
|
-----
|
||||||
|
|
||||||
Open your Terminal and enter:
|
Open your Terminal and enter:
|
||||||
|
|
||||||
```
|
# Linux:
|
||||||
# Linux:
|
|
||||||
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
|
|
||||||
|
|
||||||
# Mac OSX:
|
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
|
||||||
curl "https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py" -o install.py
|
|
||||||
|
|
||||||
# For development
|
# Mac OSX:
|
||||||
sudo python install.py --develop
|
|
||||||
|
|
||||||
# For production
|
# install X Code (from App store)
|
||||||
sudo python install.py --production
|
# install HomeBrew (http://brew.sh/)
|
||||||
|
brew install python
|
||||||
|
brew install git
|
||||||
|
curl "https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py" -o install.py
|
||||||
|
|
||||||
|
# For development
|
||||||
|
sudo python install.py --develop
|
||||||
|
|
||||||
|
# For production
|
||||||
|
sudo python install.py --production
|
||||||
|
|
||||||
|
# If you're logged in as root, use --user flag to create a user and install using that user
|
||||||
|
sudo python install.py --develop --user frappe
|
||||||
|
|
||||||
# If you're logged in as root, use --user flag to create a user and install using that user
|
|
||||||
sudo python install.py --develop --user frappe
|
|
||||||
|
|
||||||
```
|
|
||||||
For development, you have to explicitly start services by running `bench start`. This script requires Python2.7+ installed on your machine. You will have to manually create a new site (`bench new-site`) and get apps that you need (`bench get-app`, `bench install-app`).
|
For development, you have to explicitly start services by running `bench start`. This script requires Python2.7+ installed on your machine. You will have to manually create a new site (`bench new-site`) and get apps that you need (`bench get-app`, `bench install-app`).
|
||||||
|
|
||||||
For production, you will have a preinstalled site with ERPNext installed in it.
|
For production, you will have a preinstalled site with ERPNext installed in it.
|
||||||
|
@ -69,7 +69,8 @@
|
|||||||
|
|
||||||
# setup frappe-bench
|
# setup frappe-bench
|
||||||
- include: includes/setup_bench.yml
|
- include: includes/setup_bench.yml
|
||||||
|
when: not run_travis and without_bench_setup
|
||||||
|
|
||||||
# setup development environment
|
# setup development environment
|
||||||
- include: includes/setup_dev_env.yml
|
- include: includes/setup_dev_env.yml
|
||||||
when: not production
|
when: not run_travis and not production
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
# setup frappe-bench
|
# setup frappe-bench
|
||||||
- include: includes/setup_bench.yml
|
- include: includes/setup_bench.yml
|
||||||
when: not run_travis
|
when: not without_bench_setup and not run_travis
|
||||||
|
|
||||||
# setup development environment
|
# setup development environment
|
||||||
- include: includes/setup_dev_env.yml
|
- include: includes/setup_dev_env.yml
|
||||||
|
@ -88,7 +88,7 @@ def install_bench(args):
|
|||||||
|
|
||||||
run_playbook('develop/create_user.yml', extra_vars=extra_vars)
|
run_playbook('develop/create_user.yml', extra_vars=extra_vars)
|
||||||
|
|
||||||
extra_vars.update(get_passwords(args.run_travis))
|
extra_vars.update(get_passwords(args.run_travis or args.without_bench_setup))
|
||||||
if args.production:
|
if args.production:
|
||||||
extra_vars.update(max_worker_connections=multiprocessing.cpu_count() * 1024)
|
extra_vars.update(max_worker_connections=multiprocessing.cpu_count() * 1024)
|
||||||
|
|
||||||
@ -176,8 +176,8 @@ def could_not_install(package):
|
|||||||
def is_sudo_user():
|
def is_sudo_user():
|
||||||
return os.geteuid() == 0
|
return os.geteuid() == 0
|
||||||
|
|
||||||
def get_passwords(run_travis=False):
|
def get_passwords(ignore_prompt=False):
|
||||||
if not run_travis:
|
if not ignore_prompt:
|
||||||
mysql_root_password, admin_password = '', ''
|
mysql_root_password, admin_password = '', ''
|
||||||
pass_set = True
|
pass_set = True
|
||||||
while pass_set:
|
while pass_set:
|
||||||
@ -265,6 +265,9 @@ def parse_commandline_args():
|
|||||||
parser.add_argument('--run-travis', dest='run_travis', action='store_true', default=False,
|
parser.add_argument('--run-travis', dest='run_travis', action='store_true', default=False,
|
||||||
help=argparse.SUPPRESS)
|
help=argparse.SUPPRESS)
|
||||||
|
|
||||||
|
parser.add_argument('--without-bench-setup', dest='without_bench_setup', action='store_true', default=False,
|
||||||
|
help=argparse.SUPPRESS)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
Loading…
x
Reference in New Issue
Block a user