Fool proof install - step by step

It is a great framework and I’m really looking forward to using it. I think I may have a solution, I had it running but not quite as it should have been. The best image I’ve used is the Bitnami one but it has been a bit too overwhelming to get started on development. I did find a nice little gotcha that I’m trying right now, apparently if you run a bench update before bench start on initial setup it is supposed to make a difference.

The best guides I’ve found so far are.

The Ansible playbooks always fail for me but I can get it running with a little jiggery pokery afterwards. The best I’ve had it gets it installed and running but then it fails to initiate from the web browser.

TASK [bench : python3 bench init for develop] *****************************************************************************************************************
task path: /tmp/.bench/playbooks/roles/bench/tasks/main.yml:31
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c ‘echo ~root && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /var/tmp/ansible-tmp-1572429446.348314-188734856924131” && echo ansible-tmp-1572429446.348314-188734856924131=“echo /var/tmp/ansible-tmp-1572429446.348314-188734856924131” ) && sleep 0’
Using module file /usr/local/lib/python3.5/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /home/frappe/.ansible/tmp/ansible-local-1223141f953zt/tmpktelknyl TO /var/tmp/ansible-tmp-1572429446.348314-188734856924131/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c ‘setfacl -m u:frappe:r-x /var/tmp/ansible-tmp-1572429446.348314-188734856924131/ /var/tmp/ansible-tmp-1572429446.348314-188734856924131/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘sudo -H -S -n -u frappe /bin/sh -c ‘"’“‘echo BECOME-SUCCESS-gedihywyngavixfzsrlpaplufkfujzol ; /usr/bin/python3 /var/tmp/ansible-tmp-1572429446.348314-188734856924131/AnsiballZ_command.py’”’“’ && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘rm -f -r /var/tmp/ansible-tmp-1572429446.348314-188734856924131/ > /dev/null 2>&1 && sleep 0’
fatal: [localhost]: FAILED! => {
“changed”: true,
“cmd”: [
“bench”,
“init”,
“/home/frappe/frappe-bench”,
“–frappe-path”,
GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript”,
“–frappe-branch”,
“version-12”,
“–python”,
“python3”
],
“delta”: “0:01:16.672102”,
“end”: “2019-10-30 09:58:43.271130”,
“invocation”: {
“module_args”: {
“_raw_params”: “bench init /home/frappe/frappe-bench --frappe-path GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --frappe-branch version-12 --python python3”,
“_uses_shell”: false,
“argv”: null,
“chdir”: null,
“creates”: “/home/frappe/frappe-bench”,
“executable”: null,
“removes”: null,
“stdin”: null,
“stdin_add_newline”: true,
“strip_empty_ends”: true,
“warn”: true
}
},
“msg”: “non-zero return code”,
“rc”: 1,
“start”: “2019-10-30 09:57:26.599028”,
“stderr”: “INFO:bench.utils:virtualenv -q env -p /usr/bin/python3\nINFO:bench.utils:env/bin/pip -q install --upgrade pip\nINFO:bench.utils:env/bin/pip -q install wheel\nINFO:bench.utils:env/bin/pip -q install six\nINFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit\nINFO:bench.app:getting app frappe\nINFO:bench.utils:git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch version-12 --depth 1 --origin upstream\nCloning into ‘frappe’…\nwarning: unable to access ‘/home/frappe/.config/git/attributes’: Permission denied\nINFO:bench.app:installing frappe\nINFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q -e /home/frappe/frappe-bench/apps/frappe \nINFO:bench.utils:yarn install\nerror An unexpected error occurred: "EACCES: permission denied, scandir ‘/home/frappe/.config/yarn/link’".\nTraceback (most recent call last):\n File "/usr/local/bin/bench", line 11, in \n load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()\n File "/home/frappe/.bench/bench/cli.py", line 40, in cli\n bench_command()\n File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 764, in call\n return self.main(*args, **kwargs)\n File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 717, in main\n rv = self.invoke(ctx)\n File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1137, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 956, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, in invoke\n return callback(*args, **kwargs)\n File "/home/frappe/.bench/bench/commands/make.py", line 31, in init\n python \t\t = python)\n File "/home/frappe/.bench/bench/utils.py", line 84, in init\n update_node_packages(bench_path=path)\n File "/home/frappe/.bench/bench/utils.py", line 457, in update_node_packages\n update_yarn_packages(bench_path)\n File "/home/frappe/.bench/bench/utils.py", line 470, in update_yarn_packages\n exec_cmd(‘yarn install’, cwd=app_path)\n File "/home/frappe/.bench/bench/utils.py", line 161, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: yarn install”,
“stderr_lines”: [
“INFO:bench.utils:virtualenv -q env -p /usr/bin/python3”,
“INFO:bench.utils:env/bin/pip -q install --upgrade pip”,
“INFO:bench.utils:env/bin/pip -q install wheel”,
“INFO:bench.utils:env/bin/pip -q install six”,
“INFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit”,
“INFO:bench.app:getting app frappe”,
“INFO:bench.utils:git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch version-12 --depth 1 --origin upstream”,
“Cloning into ‘frappe’…”,
“warning: unable to access ‘/home/frappe/.config/git/attributes’: Permission denied”,
“INFO:bench.app:installing frappe”,
“INFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q -e /home/frappe/frappe-bench/apps/frappe “,
“INFO:bench.utils:yarn install”,
“error An unexpected error occurred: "EACCES: permission denied, scandir ‘/home/frappe/.config/yarn/link’".”,
“Traceback (most recent call last):”,
" File "/usr/local/bin/bench", line 11, in ”,
" load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()”,
" File "/home/frappe/.bench/bench/cli.py", line 40, in cli”,
" bench_command()“,
" File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 764, in call”,
" return self.main(*args, **kwargs)“,
" File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 717, in main”,
" rv = self.invoke(ctx)“,
" File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1137, in invoke”,
" return _process_result(sub_ctx.command.invoke(sub_ctx))“,
" File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 956, in invoke”,
" return ctx.invoke(self.callback, **ctx.params)“,
" File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, in invoke”,
" return callback(*args, **kwargs)“,
" File "/home/frappe/.bench/bench/commands/make.py", line 31, in init”,
" python \t\t = python)“,
" File "/home/frappe/.bench/bench/utils.py", line 84, in init”,
" update_node_packages(bench_path=path)“,
" File "/home/frappe/.bench/bench/utils.py", line 457, in update_node_packages”,
" update_yarn_packages(bench_path)“,
" File "/home/frappe/.bench/bench/utils.py", line 470, in update_yarn_packages”,
" exec_cmd(‘yarn install’, cwd=app_path)“,
" File "/home/frappe/.bench/bench/utils.py", line 161, in exec_cmd”,
" raise CommandFailedError(cmd)",
“bench.utils.CommandFailedError: yarn install”
],
“stdout”: “Already using interpreter /usr/bin/python3\nyarn install v1.19.1\ninfo If you think this is a bug, please open a bug report with the information provided in "/home/frappe/frappe-bench/apps/frappe/yarn-error.log".\ninfo Visit yarn install | Yarn for documentation about this command.\ninstalling frappe\nUpdating node packages…”,
“stdout_lines”: [
“Already using interpreter /usr/bin/python3”,
“yarn install v1.19.1”,
“info If you think this is a bug, please open a bug report with the information provided in "/home/frappe/frappe-bench/apps/frappe/yarn-error.log".”,
“info Visit yarn install | Yarn for documentation about this command.”,
“installing frappe”,
“Updating node packages…”
]
}

PLAY RECAP ****************************************************************************************************************************************************
localhost : ok=45 changed=30 unreachable=0 failed=1 skipped=67 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2
frappe@ubuntu-s-1vcpu-2gb-sgp1-01:~$