Open patsevanton opened 5 years ago
Hi, you should install git on the builder host.
1) Disable selinux
2) Install on all nodes gcc glibc-devel make ncurses-devel openssl-devel autoconf curl git cmake check check-devel automake systemd-devel patch gcc-c++ redhat-lsb-core nmap-ncat rpm-build lzo-devel sysstat wget sudo nc
3) Run ansible-playbook -i hosts build_leofs.yml
Output:
TASK [builder : Build LeoFS (Selected Branch)] ***************************************************************************************************************************************************************
fatal: [172.26.9.157]: FAILED! => {
"changed": true,
"rc": 2
}
STDOUT:
Cloning into '/tmp/leofs_builder'...
remote: Enumerating objects: 59, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 12118 (delta 26), reused 21 (delta 4), pack-reused 12059
Receiving objects: 100% (12118/12118), 30.73 MiB | 17.05 MiB/s, done.
Resolving deltas: 100% (7188/7188), done.
Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'
/usr/bin/env: escript: No such file or directory
make: *** [deps] Error 127
for reltool_config in rel/leo_*/reltool.config.in; do \
./make_reltool.sh no $reltool_config > $(echo $reltool_config | sed s/.in$//); \
done
/usr/bin/env: escript: No such file or directory
make: *** [release] Error 127
STDERR:
Shared connection to 172.26.9.157 closed.
MSG:
non-zero return code
Hi!
You should install erlang/otp into your building node. The Erlang rpm packages can be found here: https://github.com/rabbitmq/erlang-rpm/releases
I am using erlang 20.3.8.23. The latest ones do not work with LeoFS.
Best, Alex
1) Disable selinux
2) Install on all nodes gcc glibc-devel make ncurses-devel openssl-devel autoconf curl git cmake check check-devel automake systemd-devel patch gcc-c++ redhat-lsb-core nmap-ncat rpm-build lzo-devel sysstat wget sudo nc
3) install with yum erlang-20.3.8.23-1.el7.x86_64.rpm
---
- hosts: all
gather_facts: False
become: yes
tasks:
- name: Remote erlang-20.3.8.23-1.el7.x86_64.rpm install with yum
yum: name=https://github.com/rabbitmq/erlang-rpm/releases/download/v20.3.8.23/erlang-20.3.8.23-1.el7.x86_64.rpm
4) ansible-playbook -i hosts build_leofs.yml 5) ansible-playbook -i hosts install_leofs.yml 6) ansible-playbook -i hosts config_leofs.yml Output:
TASK [common : Creates directory /usr/local/leofs/1.2.22//leo_manager_0//work/ord_reda/] *********************************************************************************************************************
failed: [172.26.9.166] (item=/usr/local/leofs/1.2.22//leo_manager_0//work/ord_reda/) => {
"changed": false,
"gid": 0,
"group": "root",
"item": "/usr/local/leofs/1.2.22//leo_manager_0//work/ord_reda/",
"mode": "0755",
"owner": "root",
"path": "/usr/local/leofs/1.2.22//leo_manager_0//work/ord_reda/",
"secontext": "unconfined_u:object_r:usr_t:s0",
"size": 6,
"state": "directory",
"uid": 0
}
MSG:
chown failed: failed to look up user leofs
7) Create user group leofs:
---
- hosts: all
gather_facts: False
become: yes
tasks:
- group:
name: leofs
state: present
- name: Add the user 'leofs', appending the group 'leofs' to the user's groups
user:
name: leofs
groups: leofs
append: yes
8) ansible-playbook -i hosts config_leofs.yml 9) ansible-playbook -i hosts start_leofs.yml Output:
TASK [leo_manager_0 : Run LeoManager (Primary)] **************************************************************************************************************************************************************
fatal: [172.26.9.166]: FAILED! => {
"changed": true,
"cmd": [
"bin/leo_manager",
"start"
],
"delta": "0:00:00.337194",
"end": "2019-11-27 05:14:25.311043",
"rc": 1,
"start": "2019-11-27 05:14:24.973849"
}
STDOUT:
vm.args needs to have either -name or -sname parameter.
STDERR:
mv: missing destination file operand after ‘/usr/local/leofs/1.2.22/leo_manager_0/etc/app.config’
Try 'mv --help' for more information.
mv: missing destination file operand after ‘/usr/local/leofs/1.2.22/leo_manager_0/etc/vm.args’
Try 'mv --help' for more information.
grep: /usr/local/leofs/1.2.22/leo_manager_0/etc/vm.args: No such file or directory
MSG:
non-zero return code
I had the same problems with leofs. Try to use root.
I had the same problems with leofs. Try to use root.
What is root?
Write become:
yes to ansible-playbook?
New Create user group leofs:
---
- hosts: all
gather_facts: False
become: yes
tasks:
- group:
name: leofs
state: present
- name: Allow 'wheel' group to have passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'
- name: Add the user 'leofs', appending the group 'leofs' to the user's groups
user:
name: leofs
groups: wheel
append: yes
Install netcat on localhost where run aplybook
yum install -y nc
Add become_user: root to every task in control.yml. For examle:
- name: Run LeoGateway
command: bin/leo_gateway start
become: true
become_user: root
when: control_leofs is defined and control_leofs == "start"
args:
chdir: "{{ leofs_module_path }}"
tags:
- run
Hello!
cat hosts