Ansible script for amd64?

I can’t figure out how to install satnogs on Debian running on amd64 platform. I tried following this guide: https://wiki.satnogs.org/SatNOGS_Client_Ansible

But it just keeps trying to install packages for raspbian. Is there a way to install on x86? My RPi3 started producing very poor results lately so I’m trying to switch to a better hardware.

Thanks!

Any clues from those running x86 stations? Any help is greatly appreciated.

Thanks!

I’ve just tried it on a virtual machine and it seems to be working. It shouldn’t install raspbian packages. There is autodetection of the platform in Asnible. The only way I can think of this happening is if you have set the repository variable by hand.

Thanks @Acinonyx! That’s pretty much what I did, but it didn’t work. I’ll try again later today.

Also, is Ubuntu supported? I’ve tried this on Debian.

Thanks!

Ubuntu is not supported yet. :frowning:

Hi,

I’ve finally found time to try this again and still have the same issue. Please see full output attached. I’m running as root and installed Buster via debian-10.5.0-amd64-netinst.iso image.

Create needrestart directory for Raspbian…
Configure needrestart for Raspbian…
Install or remove satnogs-setup system dependencies…

Any advice? Thanks in advance!

output.txt (2.3 KB)

1 Like

If it’s the missing directory issue blocking needrestart role, then this should have been fixed in 202007160921 tag. Can you check which revision of satnogs-client-ansible you checked out?

1 Like

Hi @Acinonyx, thanks for your response. On stable branch.

root@satnogs:/home/satnogs/satnogs-client-ansible# git show
commit e410b84f3e667937eceb9c9131152a9590876e2a (HEAD → stable, tag: 202007160921, origin/stable, origin/master, origin/HEAD, master)
Author: Vasilis Tsiligiannis acinonyx@openwrt.gr
Date: Thu Jul 16 12:21:55 2020 +0300

Bump SatNOGS Client version

Signed-off-by: Vasilis Tsiligiannis acinonyx@openwrt.gr

diff --git a/roles/satnogs-client/defaults/main.yml b/roles/satnogs-client/defaults/main.yml
index 37d2467…c9620e4 100644
— a/roles/satnogs-client/defaults/main.yml
+++ b/roles/satnogs-client/defaults/main.yml
@@ -1,3 +1,3 @@


experimental: false
-satnogs_client_version: ‘1.3.3’
+satnogs_client_version: ‘1.3.4’

Thanks!

Could be a silly question but is python installed? :smiley:

No question is silly when troubleshooting :slight_smile: Yes, both 2 and 3 versions of python are installed. This is a clean install of debian-10.5.0-amd64-netinst.iso and python is installed out of the box. Anything else I could try? I tried again and script indeed thinks it’s running on raspbian.

Thank you!

@Acinonyx progress!! I did two things:

  • install sudo
  • add satnogs account to sudo group

But we still have a failure with rng tools. BTW I did this on baremetal and VM, same result.

After this operation, 124 kB of additional disk space will be used.
Get:1 Index of /debian buster/main amd64 rng-tools amd64 2-unofficial-mt.14-1+b2 [43.1 kB]
Fetched 43.1 kB in 0s (405 kB/s)
Selecting previously unselected package rng-tools.
(Reading database … 37120 files and directories currently installed.)
Preparing to unpack …/rng-tools_2-unofficial-mt.14-1+b2_amd64.deb …
Unpacking rng-tools (2-unofficial-mt.14-1+b2) …
Setting up rng-tools (2-unofficial-mt.14-1+b2) …
Job for rng-tools.service failed because the control process exited with error code.
See “systemctl status rng-tools.service” and “journalctl -xe” for details.
invoke-rc.d: initscript rng-tools, action “start” failed.

  • rng-tools.service
    Loaded: loaded (/etc/init.d/rng-tools; generated)
    Active: failed (Result: exit-code) since Thu 2020-08-20 10:25:18 CEST; 27ms ago
    Docs: man:systemd-sysv-generator(8)
    Process: 5204 ExecStart=/etc/init.d/rng-tools start (code=exited, status=1/FAILURE)

Aug 20 10:25:18 satnogs systemd[1]: Starting rng-tools.service…
Aug 20 10:25:18 satnogs rng-tools[5204]: Starting Hardware RNG entropy gatherer daemon: (Hardware RNG device inode not found)
Aug 20 10:25:18 satnogs rng-tools[5204]: /etc/init.d/rng-tools: Cannot find a hardware RNG device to use.
Aug 20 10:25:18 satnogs systemd[1]: rng-tools.service: Control process exited, code=exited, status=1/FAILURE
Aug 20 10:25:18 satnogs systemd[1]: rng-tools.service: Failed with result ‘exit-code’.
Aug 20 10:25:18 satnogs systemd[1]: Failed to start rng-tools.service.
Processing triggers for man-db (2.8.5-2) …
Processing triggers for systemd (241-7~deb10u4) …

Running kernel seems to be up-to-date.
Failed to check for processor microcode upgrades.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
satnogs done
Check if dphys-swapfile package is installed…
satnogs done | stdout: Reading package lists…
Building dependency tree…
Reading state information…
The following additional packages will be installed:
dc
The following NEW packages will be installed:
dc dphys-swapfile
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Inst dc (1.07.1-2+b1 Debian:10.5/stable [amd64])
Inst dphys-swapfile (20100506-5 Debian:10.5/stable [all])
Conf dc (1.07.1-2+b1 Debian:10.5/stable [amd64])
Conf dphys-swapfile (20100506-5 Debian:10.5/stable [all])
Disable swap file…
Add ZRAM init script…
satnogs done
Add satnogs-client service user…
satnogs failed | msg: usermod: user satnogs is currently used by process 745
Start ZRAM service (via handler)…

  • Play recap -
    satnogs : ok=28 changed=15 unreachable=0 failed=1 rescued=0 ignored=0

Hmm… It seems that all the root cause of all these issues come from the fact that Ansible cannot gain root privileges.

Did you execute ansible-playbook as satnogs user on all your attempts?

1 Like

satnogs user is the user that the playbook tries to create and it is assumed that it’s not already there. That’s the reason for your latest error. The playbook should be executed either as root, without the -K flag, or as a normal (e.g. ivor) user who has sudo access.

1 Like

Thanks for prompt response @Acinonyx, I appreciate it.

I executed the ansible playbook as root, however I’ve added satnogs user to production/inventory/hosts which at first I wrongly believed was in sudoers. I since then added it to sudo group but still ran the ansible script as root.

Current situation is that I’ve got the above output and it failed at rng tools. So I restarted and gave it another go but this time not as root but as satnogs user. It failed with:

Add satnogs-client service user…
satnogs failed | msg: usermod: user satnogs is currently used by process 406

I also get the same output when I try as root. Does this mean that satnogs is installed?

You shouldn’t use satnogs user to provision the system. That’s a system user to run satnogs-client.

P.S. Also, it should not be in the sudoers.

1 Like

Good info, thanks! I’ll give it a shot again and report back. Thank you!

When you are running ansible from the same host that you want to provision, use this hosts configuration:

all:
  hosts:
    satnogs:
      ansible_connection: 'local'
satnogs-setups:
  hosts:
    satnogs:
satnogs-radios:
  hosts:
    satnogs:
hamlib-utils:
  hosts:
    satnogs:
satnogs-clients:
  hosts:
    satnogs:
snmpds:
  hosts:
    satnogs:
gpsds:
  hosts:
    satnogs:
1 Like

Excellent, I’ll give that a shot right now. Quick question, since I’ve already half-installed this in previous tries, now when I run ansible script I get:

satnogs failed | msg: usermod: user satnogs is currently used by process 406

Which is used by /lib/systemd/systemd --user

Any advice for this?

That shouldn’t happen unless you still run the playbook as satnogs or having an active login session. Close any SSH clients connected as satnogs user.

1 Like

Makes perfect sense. I kept ssh’ing with that user to this box in order to install satnogs :slight_smile: sorry about that! Well, after a bunch of trial and error, we’re up and runnin

What I’ve learned:

  • satnogs community is great
  • use the hosts config from above (probably not a bad idea to add it to wiki?)
  • run the script with root account and SSH as root, don’t use other accounts.
  • Play recap -
    satnogs : ok=107 changed=31 unreachable=0 failed=0 rescued=0 ignored=0

Okay I’m now going to plug in SDR and antenna and get my station back online. Thank you @Acinonyx!!!

2 Likes