Mainframe-Archive / Mainframe-Archive/switchboard

Installation under Debian 9.3

Open
#68 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Erlang
Stars
315
Forks
36
PR merge metrics
No merged PRs in 30d

Description

I realize this repository is more or less dead, but in the interest of saving others the work:
The repository as provided has a number of issues when trying to get it to work under Debian 9.3:

  • the ansible playbook assumes sudo is present and to be used
  • (the playbook is using the sudo: keyword which has been superseded by become:)
  • setup gets the Ubuntu version of Erlang
  • setup gets an ancient version of Erlang, whose dependencies are too ancient to be satisfied by current repos
  • even with a fitting version of erlang, it is not getting those dependencies
  • after installation, it is trying to start the service without elevated privileges
  • it is not providing a .service file, so starting the service with systemd fails either way
  • the init script is broken in a number of ways

I fought through all of that, and all I got was

Feb 22 18:35:37 hostname systemd[1]: Starting LSB: Start Switchboard Erlang BEAM daemon...
Feb 22 18:35:37 hostname systemd[13951]: switchboard.service: Failed at step EXEC spawning /etc/init.d/switchboard: Exec format error
Feb 22 18:35:37 hostname systemd[1]: switchboard.service: Control process exited, code=exited status=203
Feb 22 18:35:37 hostname systemd[1]: Failed to start LSB: Start Switchboard Erlang BEAM daemon.
Feb 22 18:35:37 hostname systemd[1]: switchboard.service: Unit entered failed state.
Feb 22 18:35:37 hostname systemd[1]: switchboard.service: Failed with result 'exit-code'.

This is the diff of the changes I made to the playbook to get to that stage:
ansible.patch.txt
You would then use ansible-playbook -u $unprivileged_user --ask-pass --ask-become-pass -i provisioning/$your_hosts_file provisioning/playbook.yml

Dependencies I had to install were:

  • sshpass for ansible's --ask-pass
  • libwxbase3.0-0v5 for erlang
  • libwxgtk3.0-0v5 for erlang
  • libsctp1 for erlang

Do note that the files get installed under /home/$unprivileged_user/switchboard/_rel/switchboard/.

If you manually call /home/$unprivileged_user/switchboard/_rel/switchboard/bin/switchboard start, the process list seems to indicate it started.
However, Port 8080 just gives you a blank page.
/home/$unprivileged_user/switchboard/_rel/switchboard/log/ is empty.

This is as far as I've come. If anybody actually gets it to work, please do tell how.

Edit: I may have kinda-sorta gotten it to work.
To manually start it, you have to pass the HOME= environment variable to the executable, like this:

HOME=/home/$unprivileged_user /home/$unprivileged_user/switchboard/_rel/switchboard/bin/switchboard start

http://hostname:8080/jsclient at least shows the expected boilerplate JS instructions now.

Edit 2: Nope, still doesn't work. The API seems to work and it does seem to talk with the IMAP account, but whenever I try to actually do anything, it crashes.
I know for a fact that IMAP is working, because I can operate fine on the command line - login, fetch mails, etc.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with provisioning/playbook.yml and the linked ansible.patch.txt, then inspect the generated /etc/init.d/switchboard service setup and the Erlang release under _rel/switchboard. Reproduce the Debian 9.3 installation and service start commands described in the issue. Done means the service starts with the intended privileges and environment, the API actions complete without crashing, and relevant logs are produced.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, debian, erlang
Domain
devops, infrastructure, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.