Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Local testing setup #332

Open
kirillt opened this issue Aug 25, 2020 · 1 comment
Open

Question: Local testing setup #332

kirillt opened this issue Aug 25, 2020 · 1 comment

Comments

@kirillt
Copy link

kirillt commented Aug 25, 2020

Today I was trying to build and run wire-server on my local machine.
I walked through this guide: https://docs.wire.com/how-to/install/kubernetes.html
Option 2 was my choice. I created a "target" container for deployment with root password-less SSH-access.

It looks that the guide assumes the single target machine. But I couldn't pass this step (ran from inside of the docker container with all dependencies):

poetry run ansible-playbook -i hosts.ini kubernetes.yml -vv

The "target" container is debian-slim (I tried alpine as well, but apparently it is not supported).
The SSH-access is not a problem, I verified it. The errors are weird and change sometime.
Either lock of dpkg, or complaining that it is impossible to gain root privileges (with root SSH-login!).

It feels for me like simultaneous Ansible jobs are conflicting with each other.
Is single-node deployment really supported?

@kirillt
Copy link
Author

kirillt commented Aug 26, 2020

The sequence of steps to reproduce:
1. Run debian-based docker container with ssh accepting root by key (without password).
I also installed sudo in the target container, although there is only root user.

For verification I do this:

ssh [email protected] -p 2222 -i ssh/id_ed25519 -o "UserKnownHostsFile /dev/null"

This results in that I get into the container.

2. Preparation steps described in "Option 2" here: https://docs.wire.com/how-to/install/kubernetes.html

File hosts.ini is modified to also contain port number 2222 for SSH.

sed -i 's/X.X.X.X/127.0.0.1 ansible_port=2222/g' hosts.ini

3. Inside of the "deployment" container I do this:

cd wire-server-deploy/ansible/
poetry run ansible-playbook -i hosts.ini kubernetes.yml -vv

This works about 30 seconds and results in errors like this:

fatal: [kubenode03]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 100, "stderr": "Shared connection to 127.0.0.1 closed.\r\n", "stderr_lines": ["Shared connection to 127.0.0.1 closed."], "stdout": "\rReading package lists... 0%\r\rReading package lists... 0%\r\rReading package lists... 1%\r\rReading package lists... 57%\r\rReading package lists... 92%\r\rReading package lists... 92%\r\rReading package lists... 99%\r\rReading package lists... 99%\r\rReading package lists... 99%\r\rReading package lists... 99%\r\rReading package lists... Done\r\r\nE: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)\r\nE: Unable to lock directory /var/lib/apt/lists/\r\n", "stdout_lines": ["", "Reading package lists... 0%", "", "Reading package lists... 0%", "", "Reading package lists... 1%", "", "Reading package lists... 57%", "", "Reading package lists... 92%", "", "Reading package lists... 92%", "", "Reading package lists... 99%", "", "Reading package lists... 99%", "", "Reading package lists... 99%", "", "Reading package lists... 99%", "", "Reading package lists... Done", "", "E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)", "E: Unable to lock directory /var/lib/apt/lists/"]}
etcd01                     : ok=4    changed=0    unreachable=0    failed=1   
etcd02                     : ok=4    changed=0    unreachable=0    failed=1   
etcd03                     : ok=4    changed=0    unreachable=0    failed=1   
kubenode01                 : ok=5    changed=1    unreachable=0    failed=0   
kubenode02                 : ok=4    changed=0    unreachable=0    failed=1   
kubenode03                 : ok=4    changed=0    unreachable=0    failed=1   
localhost                  : ok=1    changed=0    unreachable=0    failed=0

Does it mean that parallel jobs overlap? Does it mean I can't deploy to a single machine?
The tutorial emphasizes that it is about deployment "on a single virtual machine".
Is there a difference if I choose a virtual machine or just a container?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant