Des instructions d'installation simples et fonctionnelles pour UBUNTU serveur?

bjr
essayez les instructions de ce post RECAP#2 :wink::+1:

créer un serveur Ubuntu 20.04LTS chez Hetzner (CPU: 2, RAM: 8GB, HD: 40GB)
ssh root@IP -i .ssh/my_ssh-id

apt update && apt upgrade -y && apt install -y python3-pip

adduser dokos

  • enter the password

usermod -aG sudo dokos
su - dokos
export LC_ALL=C.UTF-8
wget https://gitlab.com/dokos/docli/raw/master/bench/install.py
sudo python3 install.py --production --user dokos --verbose

  • enter the password

  • enter the password for mysql

  • enter the password for admin

Ansible run 
 and crash

TASK [bench : python3 bench init] *********************************************************************
task path: /tmp/.bench/bench/playbooks/roles/bench/tasks/main.yml:46
<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 `"&& mkdir /var/tmp/ansible-tmp-1653886292.7687883-36413-66201028384816 && echo ansible-tmp-1653886292.7687883-36413-66201028384816="` echo /var/tmp/ansible-tmp-1653886292.7687883-36413-66201028384816 `" ) && sleep 0'
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-20551cj_abs_f/tmpddyffaz8 TO /var/tmp/ansible-tmp-1653886292.7687883-36413-66201028384816/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c 'setfacl -m u:dokos:r-x /var/tmp/ansible-tmp-1653886292.7687883-36413-66201028384816/ /var/tmp/ansible-tmp-1653886292.7687883-36413-66201028384816/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'sudo -H -S -n  -u dokos /bin/sh -c '"'"'echo BECOME-SUCCESS-wchqzzpbqmuoepgvpemmrtvwgtwxmfko ; /usr/bin/python3 /var/tmp/ansible-tmp-1653886292.7687883-36413-66201028384816/AnsiballZ_command.py'"'"' && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /var/tmp/ansible-tmp-1653886292.7687883-36413-66201028384816/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": true,
    "cmd": [
        "bench",
        "init",
        "/home/dokos/dokos-bench",
        "--frappe-path",
        "https://gitlab.com/dokos/dodock",
        "--frappe-branch",
        "master",
        "--python",
        "python3"
    ],
    "delta": "0:00:15.270755",
    "end": "2022-05-30 04:51:48.274232",
    "invocation": {
        "module_args": {
            "_raw_params": "bench init /home/dokos/dokos-bench --frappe-path https://gitlab.com/dokos/dodock --frappe-branch master --python python3",
            "_uses_shell": false,
            "argv": null,
            "chdir": null,
            "creates": "/home/dokos/dokos-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": "2022-05-30 04:51:33.003477",
    "stderr": "Cloning into 'dodock'...\nwarning: redirecting to https://gitlab.com/dokos/dodock.git/\nAborted!",
    "stderr_lines": [
        "Cloning into 'dodock'...",
        "warning: redirecting to https://gitlab.com/dokos/dodock.git/",
        "Aborted!"
    ],
    "stdout": "Setting Up Environment\n$ /usr/local/bin/virtualenv --quiet env -p python3\n$ /home/dokos/dokos-bench/env/bin/python -m pip install --quiet --upgrade pip\nGetting dodock\n$ git clone https://gitlab.com/dokos/dodock --branch master --depth 1 --origin upstream\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.8/dist-packages/bench/commands/make.py\", line 70, in init\n    init(\n  File \"/usr/local/lib/python3.8/dist-packages/bench/utils/render.py\", line 95, in wrapper_fn\n    return fn(*args, **kwargs)\n  File \"/usr/local/lib/python3.8/dist-packages/bench/utils/system.py\", line 79, in init\n    get_app(\n  File \"/usr/local/lib/python3.8/dist-packages/bench/app.py\", line 412, in get_app\n    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)\n  File \"/usr/local/lib/python3.8/dist-packages/bench/utils/render.py\", line 110, in wrapper_fn\n    return fn(*args, **kwargs)\n  File \"/usr/local/lib/python3.8/dist-packages/bench/app.py\", line 190, in install\n    app_name = get_app_name(self.bench.name, self.repo)\n  File \"/usr/local/lib/python3.8/dist-packages/bench/utils/app.py\", line 233, in get_app_name\n    with open(app_path, \"rb\") as f:\nFileNotFoundError: [Errno 2] No such file or directory: '/home/dokos/dokos-bench/apps/frappe/setup.py'\n\nERROR: There was a problem while creating /home/dokos/dokos-bench\nDo you want to rollback these changes? [y/N]: ",
    "stdout_lines": [
        "Setting Up Environment",
        "$ /usr/local/bin/virtualenv --quiet env -p python3",
        "$ /home/dokos/dokos-bench/env/bin/python -m pip install --quiet --upgrade pip",
        "Getting dodock",
        "$ git clone https://gitlab.com/dokos/dodock --branch master --depth 1 --origin upstream",
        "Traceback (most recent call last):",
        "  File \"/usr/local/lib/python3.8/dist-packages/bench/commands/make.py\", line 70, in init",
        "    init(",
        "  File \"/usr/local/lib/python3.8/dist-packages/bench/utils/render.py\", line 95, in wrapper_fn",
        "    return fn(*args, **kwargs)",
        "  File \"/usr/local/lib/python3.8/dist-packages/bench/utils/system.py\", line 79, in init",
        "    get_app(",
        "  File \"/usr/local/lib/python3.8/dist-packages/bench/app.py\", line 412, in get_app",
        "    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)",
        "  File \"/usr/local/lib/python3.8/dist-packages/bench/utils/render.py\", line 110, in wrapper_fn",
        "    return fn(*args, **kwargs)",
        "  File \"/usr/local/lib/python3.8/dist-packages/bench/app.py\", line 190, in install",
        "    app_name = get_app_name(self.bench.name, self.repo)",
        "  File \"/usr/local/lib/python3.8/dist-packages/bench/utils/app.py\", line 233, in get_app_name",
        "    with open(app_path, \"rb\") as f:",
        "FileNotFoundError: [Errno 2] No such file or directory: '/home/dokos/dokos-bench/apps/frappe/setup.py'",
        "",
        "ERROR: There was a problem while creating /home/dokos/dokos-bench",
        "Do you want to rollback these changes? [y/N]: "
    ]
}

PLAY RECAP ********************************************************************************************
localhost                  : ok=71   changed=44   unreachable=0    failed=1    skipped=59   rescued=0    ignored=0   

Traceback (most recent call last):
  File "install.py", line 499, in <module>
    install_bench(args)
  File "install.py", line 264, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 397, in run_playbook
    success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
  File "/usr/lib/python3.8/subprocess.py", line 364, 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=dokos']' returned non-zero exit status 2.
dokos@dokos:~$ 

Bonjour @JOduMonT,

Merci pour ces éléments.

Effectivement il y avait bien un problùme avec la ligne de commande pour installer l’application.
C’est corrigĂ© et vous pouvez reprendre l’installation en cours en utilisant les commandes suivantes:

  1. Mettez Ă  jour la ligne de commande avec pip install dokos-cli --upgrade
  2. Supprimez le dossier dokos-bench qui a été créé et est tombé en erreur
  3. Créez un nouveau bench avec la commande bench init {nom-de-mon-bench (ex. dokos-bench)} --frappe-branch master
  4. cd {mon-bench}
  5. bench get-app https://gitlab.com/dokos/dokos
  6. bench new-site {mon-site}
  7. bench install-app erpnext
  8. sudo bench setup production {USER}

Bonne journée !

Comme Ă©tapes supplĂ©mentaires avant la crĂ©ation du DOKOSUSER, j’ai :

apt install sudo
apt-get install vim

puis (sans trait d’union) ((un menu dĂ©tail))

su DOKOSUSER

aprĂšs la crĂ©ation d’un utilisateur, il faut bien changer de dossier pour celui de l’utilisateur

cd ~

avant de lancer

sudo python3 install.py --production --user dokos --verbose

Cela a-t-il été utile ?

Bonjour,

Tout d’abord veuillez m’excuser de remonter un topic assez ancien.

Je cherche Ă  installer dokos sur un Ubuntu 22.04 en local.

Ce lien ne fonctionnant plus (Installation standard · Dokos Documentation), j’ai suivi le RECAP 2 de @punkyard.

AprĂšs le 2Ăšme lancement du script, je dĂ©fini les mdp mysql ainsi que Administrator mais j’obtiens cette erreur:

TASK [common : include_tasks] ******************************************************************************************task path: /tmp/.bench/bench/playbooks/roles/common/tasks/main.yml:4
included: /tmp/.bench/bench/playbooks/roles/common/tasks/debian_family.yml for localhost
TASK [common : Install prerequisites using apt-get] ********************************************************************task path: /tmp/.bench/bench/playbooks/roles/common/tasks/debian_family.yml:3
<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 /root/.ansible/tmp Â»&& mkdir /root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638 && echo ansible-tmp-1677084986.5659578-19445-19726080954638=« echo /root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638 Â» ) && sleep 0 â€ș
Using module file /usr/local/lib/python3.10/dist-packages/ansible/modules/packaging/os/apt.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-19367xti9vuy2/tmpl4oscoez TO /root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638/AnsiballZ_apt.py
<127.0.0.1> EXEC /bin/sh -c â€č chmod u+x /root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638/ /root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638/AnsiballZ_apt.py && sleep 0 â€ș
<127.0.0.1> EXEC /bin/sh -c â€č /usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638/AnsiballZ_apt.py && sleep 0 â€ș
<127.0.0.1> EXEC /bin/sh -c â€č rm -f -r /root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638/ > /dev/null 2>&1 && sleep 0 â€ș
fatal: [localhost]: FAILED! => {
« changed Â»: false,
« module_stderr Â»: « /root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638/AnsiballZ_apt.py:18: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module’s documentation for alternative uses\n import imp\nTraceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638/AnsiballZ_apt.py", line 114, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638/AnsiballZ_apt.py", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1677084986.5659578-19445-19726080954638/AnsiballZ_apt.py", line 49, in invoke_module\n imp.load_module(â€č main â€ș, mod, module, MOD_DESC)\n File "/usr/lib/python3.10/imp.py", line 235, in load_module\n return load_source(name, filename, file)\n File "/usr/lib/python3.10/imp.py", line 170, in load_source\n module = _exec(spec, sys.modules[name])\n File "", line 619, in _exec\n File "", line 883, in exec_module\n File "", line 241, in _call_with_frames_removed\n File "/tmp/ansible_apt_payload_xj7jlqhu/main.py", line 281, in \n File "/tmp/ansible_apt_payload_xj7jlqhu/ansible_apt_payload.zip/ansible/module_utils/urls.py", line 97, in \n File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 50, in \n import OpenSSL.SSL\n File "/usr/lib/python3/dist-packages/OpenSSL/init.py", line 8, in \n from OpenSSL import crypto, SSL\n File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 3279, in \n _lib.OpenSSL_add_all_algorithms()\nAttributeError: module â€č lib â€ș has no attribute â€č OpenSSL_add_all_algorithms â€ș\n Â»,
« module_stdout Â»: «  Â»,
« msg Â»: « MODULE FAILURE\nSee stdout/stderr for the exact error Â»,
« rc Â»: 1
}
PLAY RECAP *************************************************************************************************************localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Traceback (most recent call last):
File « /home/dokos/install.py Â», line 670, in
install_bench(args)
File « /home/dokos/install.py Â», line 297, in install_bench
run_playbook(« site.yml Â», sudo=True, extra_vars=extra_vars)
File « /home/dokos/install.py Â», line 452, in run_playbook
success = subprocess.check_call(
File « /usr/lib/python3.10/subprocess.py Â», line 369, 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=dokos â€ș] â€ș returned non-zero exit status 2.

Est-ce-que vous auriez une solution ?
Merci d’avance

1 « J'aime »

Bonjour @Doumakha,

Nous sommes en train de refaire la documentation et certains liens ont sautĂ©, j’en suis dĂ©solĂ©.
Je viens d’ajouter une redirection pour le lien ci-dessus.

Concernant votre problÚme, ça ressemble à un erreur de version de PyOpenSSL.
Essayez de mettre à jour la version de PyOpenSSL installée sur votre serveur avec la commande suivante:

sudo pip install pyOpenSSL --upgrade

Puis relancez le script.

Bonne soirée !

1 « J'aime »

Salut @Doumakha
as-tu vu et essayé ceci ?

Je ne dis pas qu’il y ait la bonne doc pour le faire avec Dokos,
mais as-tu déjà envisagé une install via docker ? ça change vraiment la vie ^^
mais je t’indiquerais plutĂŽt ERP-NEXT, qui est mis Ă  jour rĂ©guliĂšrement, comme tu peux le voir : Docker

Alors que Dokos n’a pas de mise Ă  jour rĂ©cente :
https://hub.docker.com/search?q=dokos&sort=updated_at&order=desc

Tu connais ERP-NEXT ? c’est le projet à l’origine de Dokos :

1 « J'aime »

Bonjour,

Merci à vous deux pour vos réponses rapides.

@chdecultot J’ai rĂ©ussi Ă  l’installer, j’ai eu une autre erreur avec python3.10-venv mais il suffisait de l’apt install.

@punkyard Oui j’ai vu ERP-Next cependant j’ai besoin de Dokos pour sa particularitĂ© Tiers-Lieux.

Concernant docker, le serveur local sur lequel je fais des tests Ă©tant assez limitĂ© en capacitĂ©, je me suis dis qu’un docker en plus de dokos serait surement compliquĂ© pour lui.

Encore merci Ă  vous deux pour vos rĂ©ponses et merci Ă  l’équipe de taffer sur ce projet !

4 « J'aime »

Bonjour,

J’ai suivi les instructions du recap #2 pour l’installation sur ubuntu 22.

Malheureusement, je rencontre l’erreur suivante aprĂšs avoir lancĂ© le script:

fatal: [localhost]: FAILED! => {

  • « changed Â»: true,*
  • « cmd Â»: [*
  •    "bench",*
    
  •    "init",*
    
  •    "/home/dokosuser/dokos-bench",*
    
  •    "--frappe-path",*
    
  •    "https://gitlab.com/dokos/dodock",*
    
  •    "--frappe-branch",*
    
  •    "v3.x.x",*
    
  •    "--python",*
    
  •    "python3.10"*
    
  • ],*
  • « delta Â»: « 0:00:01.495176 Â»,*
  • « end Â»: « 2023-12-01 09:08:43.191946 Â»,*
  • « invocation Â»: {*
  •    "module_args": {*
    
  •        "_raw_params": "bench init /home/dokosuser/dokos-bench --frappe-path https://gitlab.com/dokos/dodock --frappe-branch v3.x.x --python python3.10",*
    
  •        "_uses_shell": false,*
    
  •        "argv": null,*
    
  •        "chdir": null,*
    
  •        "creates": "/home/dokosuser/dokos-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 Â»: « 2023-12-01 09:08:41.696770 Â»,*
  • « stderr Â»: « Aborted! Â»,*
  • « stderr_lines Â»: [*
  •    "Aborted!"*
    
  • ],*
  • « stdout Â»: "Setting Up Environment\n$ python3.10 -m venv env\nThe virtual environment was not created successfully because ensurepip is not\navailable. On Debian/Ubuntu systems, you need to install the python3-venv\npackage using the following command.\n\n apt install python3.10-venv\n\nYou may need to use sudo with that command. After installing the python3-venv\npackage, recreate your virtual environment.\n\nFailing command: /home/dokosuser/dokos-bench/env/bin/python3.10\n\nsubprocess.CalledProcessError: Command â€č python3.10 -m venv env â€ș returned non-zero exit status 1.\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 73, in init\n init(\n File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 109, in wrapper_fn\n return fn(*args, **kwargs)\n File "/usr/local/lib/python3.10/dist-packages/bench/utils/system.py", line 65, in init\n bench.setup.env(python=python)\n File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 130, in wrapper_fn\n return fn(*args, *kwargs)\n File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 358, in env\n self.run(f"{venv} env", cwd=self.bench.name)\n File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 48, in run\n return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)\n File "/usr/local/lib/python3.10/dist-packages/bench/utils/init.py", line 158, in exec_cmd\n raise CommandFailedError from subprocess.CalledProcessError(return_code, cmd)\nbench.exceptions.CommandFailedError\n\nERROR: There was a problem while creating /home/dokosuser/dokos-bench\nDo you want to rollback these changes? [y/N]: ",
  • « stdout_lines Â»: [*
  •    "Setting Up Environment",*
    
  •    "$ python3.10 -m venv env",*
    
  •    "The virtual environment was not created successfully because ensurepip is not",*
    
  •    "available.  On Debian/Ubuntu systems, you need to install the python3-venv",*
    
  •    "package using the following command.",*
    
  •    "",*
    
  •    "    apt install python3.10-venv",*
    
  •    "",*
    
  •    "You may need to use sudo with that command.  After installing the python3-venv",*
    
  •    "package, recreate your virtual environment.",*
    
  •    "",*
    
  •    "Failing command: /home/dokosuser/dokos-bench/env/bin/python3.10",*
    
  •    "",*
    
  •    "subprocess.CalledProcessError: Command 'python3.10 -m venv env' returned non-zero exit status 1.",*
    
  •    "",*
    
  •    "The above exception was the direct cause of the following exception:",*
    
  •    "",*
    
  •    "Traceback (most recent call last):",*
    
  •    "  File \"/usr/local/lib/python3.10/dist-packages/bench/commands/make.py\", line 73, in init",*
    
  •    "    init(",*
    
  •    "  File \"/usr/local/lib/python3.10/dist-packages/bench/utils/render.py\", line 109, in wrapper_fn",*
    
  •    "    return fn(*args, **kwargs)",*
    
  •    "  File \"/usr/local/lib/python3.10/dist-packages/bench/utils/system.py\", line 65, in init",*
    
  •    "    bench.setup.env(python=python)",*
    
  •    "  File \"/usr/local/lib/python3.10/dist-packages/bench/utils/render.py\", line 130, in wrapper_fn",*
    
  •    "    return fn(*args, **kwargs)",*
    
  •    "  File \"/usr/local/lib/python3.10/dist-packages/bench/bench.py\", line 358, in env",*
    
  •    "    self.run(f\"{venv} env\", cwd=self.bench.name)",*
    
  •    "  File \"/usr/local/lib/python3.10/dist-packages/bench/bench.py\", line 48, in run",*
    
  •    "    return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)",*
    
  •    "  File \"/usr/local/lib/python3.10/dist-packages/bench/utils/__init__.py\", line 158, in exec_cmd",*
    
  •    "    raise CommandFailedError from subprocess.CalledProcessError(return_code, cmd)",*
    
  •    "bench.exceptions.CommandFailedError",*
    
  •    "",*
    
  •    "ERROR: There was a problem while creating /home/dokosuser/dokos-bench",*
    
  •    "Do you want to rollback these changes? [y/N]: "*
    
  • ]*
    }

*PLAY RECAP **********************************************************************************************************************************************************************************************************************************
localhost : ok=68 changed=43 unreachable=0 failed=1 skipped=57 rescued=0 ignored=0

Traceback (most recent call last):

  • File « /home/dokosuser/install.py Â», line 686, in *
  • install_bench(args)*
  • File « /home/dokosuser/install.py Â», line 297, in install_bench*
  • run_playbook(« site.yml Â», sudo=True, extra_vars=extra_vars)*
  • File « /home/dokosuser/install.py Â», line 452, in run_playbook*
  • success = subprocess.check_call(*
  • File « /usr/lib/python3.10/subprocess.py Â», line 369, 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=dokosuser â€ș] â€ș returned non-zero exit status 2.

Pourriez-vous m’aider svp ?
Cordialement,

le message d’erreur:

fatal: [localhost]: FAILED! => {
« changed Â»: true,
« cmd Â»: [
« bench Â»,
« setup Â»,
« config Â»
],
« delta Â»: « 0:00:00.180645 Â»,
« end Â»: « 2023-12-01 09:40:55.150412 Â»,
« invocation Â»: {
« module_args Â»: {
« _raw_params Â»: « bench setup config Â»,
« _uses_shell Â»: false,
« argv Â»: null,
« chdir Â»: « /home/dokosuser/dokos-bench Â»,
« creates Â»: « /home/dokosuser/dokos-bench/sites/common_site_config.json Â»,
« executable Â»: null,
« removes Â»: null,
« stdin Â»: null,
« stdin_add_newline Â»: true,
« strip_empty_ends Â»: true,
« warn Â»: true
}
},
« msg Â»: « non-zero return code Â»,
« rc Â»: 1,
« start Â»: « 2023-12-01 09:40:54.969767 Â»,
« stderr Â»: « Traceback (most recent call last):\n File "/usr/local/bin/bench", line 8, in \n sys.exit(cli())\n File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 74, in cli\n cmd_from_sys = get_cmd_from_sysargv()\n File "/usr/local/lib/python3.10/dist-packages/bench/utils/init.py", line 565, in get_cmd_from_sysargv\n if sys_argv.index(arg) == 0 and arg in Bench(".").apps:\n File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 67, in init\n self.apps = BenchApps(self)\n File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 173, in init\n self.initialize_apps()\n File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 278, in initialize_apps\n self.apps.remove("frappe")\nValueError: list.remove(x): x not in list Â»,
« stderr_lines Â»: [
« Traceback (most recent call last): Â»,
" File "/usr/local/bin/bench", line 8, in « ,
" sys.exit(cli()) Â»,
" File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 74, in cli",
" cmd_from_sys = get_cmd_from_sysargv()« ,
" File "/usr/local/lib/python3.10/dist-packages/bench/utils/init.py", line 565, in get_cmd_from_sysargv Â»,
" if sys_argv.index(arg) == 0 and arg in Bench(".").apps:« ,
" File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 67, in init Â»,
" self.apps = BenchApps(self)« ,
" File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 173, in init Â»,
" self.initialize_apps()« ,
" File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 278, in initialize_apps Â»,
" self.apps.remove("frappe")",
« ValueError: list.remove(x): x not in list Â»
],
« stdout Â»: «  Â»,
« stdout_lines Â»:
}

Bonjour @Tolosa

Le package venv n’est effectivement plus installĂ© par dĂ©faut sur Ubuntu. Le script recommande donc de l’installer manuellement, par exemple avec la commande suivante :

sudo apt-get install python3.10-venv

Il faudra aussi supprimer le dossier /home/dokosuser/dokos-bench avant de rĂ©Ă©ssayer le script d’installation Ansible.


Je tiens à noter que ce mode d’installation n’est malheureusement plus maintenu, on recommande de suivre les instructions ici plutît :