Open EastEriq opened 6 days ago
Arie - maybe integrate it as part of the last-tool instellation?
On Wed, 11 Sep 2024 at 18:07 EastEriq @.***> wrote:
I list below what I was able to do as a noob with last-asroot on the current machines. Obviously it would be better to do it properly, and to insert the commands where they belong, so that they integrate with the last-tool software section. 1: Install Redis
last-asroot -c 'apt install -y redis' On ubuntu 20.04 this installs redis 5.0.7, which is quite old, but sufficient for now. There would be instructions for installing instead the current version, or even, if we are purists, its true OSS fork valkey ( https://github.com/valkey-io/valkey) 2: Allow connections to the Redis servers within the observatory network
we need to add a bind line to /etc/redis/redis.conf. This is a dirty hack for doing it; a more robust way would be appreciated.
last-asroot -c 'echo bind
hostname -i |cut -c -30
>> /etc/redis/redis.conf; service redis-server restart'I put the | cut -c -30 because on last0 hostname -i returns 10.23.1.25 twice, and that in the conf file hangs redis.
- a way to test that we got it right, e.g. on 08e:
@.***:~$ echo ping | redis-cli -h last08e PONG
- Install Redis Insight
Not at all mandatory, but good-to-have: last-asroot -c 'snap install redisinsight'
- Clone MatlabRedis in ~/matlab/LAST
I did it with last-asocs -c 'cd matlab/LAST; git clone https://github.com/GummyJum/MatlabRedis.git'
I also added a line
matlab/LAST/MatlabRedis https://github.com/GummyJum/MatlabRedis.git branch:main Development
in LAST_tools/files/github-repos.gledmagicwater. Since I was not brave enough to rebuild and deploy the last-tools .deb, I just committed the file to this repo, then I did last-asocs -c 'cd matlab/LAST/LAST_tools; git pull followed by
last-asroot -c 'cp ~/matlab/LAST/LAST_tools/files/github-repos.gledmagicwater /usr/local/share/last-tool/files/'
so that in future last-asroot -c 'last-tool -n enforce last-software -s gledmagicwater' should take care of updates.
— Reply to this email directly, view it on GitHub https://github.com/blumzi/LAST_tools/issues/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUQ4PTEC5JEFGOP4ER4EDZWBMEFAVCNFSM6AAAAABOBGBBICVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZDAMBRHAYTKNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Arie - maybe integrate it as part of the last-tool instellation?
Of course, this is what I meant with the ticket. I made the story very long because of my limited proficiency with the tools, but quite likely for Arie it's little more than adding a couple of entries in some file. I hope so, at least.
1: Install Redis
last-asroot -c 'apt install -y redis'
On ubuntu 20.04 this installs redis 5.0.7, which is quite old, but sufficient for now. There would be instructions for installing instead the current version, or even, if we are purists, its true OSS fork valkey (https://github.com/valkey-io/valkey)
I just checked, snap install redis
installs redis_version:7.4.0
. In principle that should be better and have more advanced features, for example a more efficient treatment of streams. However I have not yet assessed it.
I also note that https://github.com/blumzi/LAST_tools/blob/main/files/ubuntu-packages contemplates only apt
, not snap
. I don't know if that is a problem.
I have found a showstopper when using the snap version of redis. There is no configuration file, and thus 2: Allow connections cannot be done easily that way. I'd stay with the older apt installed version, for now, then. Unless I figure out either a viable hack or a strong reason for wanting the more recent version.
References: https://askubuntu.com/questions/1514560/where-is-redis-conf-when-installed-using-snap https://forum.snapcraft.io/t/unable-to-locate-redis-conf-file-after-installing-it-using-snap/24453
I'm installing instead version 7.4 of Redis, the latest, following the instructions at https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/linux/ with the minimal adaptations required using last-asroot
:
last-asroot -c "apt remove -y redis redis-server redis-tools"
last-asroot -c "apt-get install -y lsb-release curl gpg"
last-asroot -c "curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg"
last-asroot -c "chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg"
last-asroot -c "echo \"deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main\" | tee /etc/apt/sources.list.d/redis.list"
last-asroot -c "apt-get update"
last-asroot -c "apt-get install -y redis-stack-server"
last-asroot -c "systemctl enable redis-stack-server"
last-asroot -c "systemctl start redis-stack-server"
I hope that this is not already tampering too much with package sources and authentication keys. I launched each last-asroot
line individually to be sure of the effects, but otherwise all the commands could have been grouped in a single call.
I'm also looking into installing Redis plugins for grafana on last0, for evaluation: https://grafana.com/grafana/plugins/redis-datasource https://grafana.com/grafana/plugins/redis-app/
I list below what I was able to do as a noob with
last-asroot
on the current machines. Obviously it would be better to do it properly, and to insert the commands where they belong, so that they integrate with the last-tool software section.1: Install Redis
last-asroot -c 'apt install -y redis'
On ubuntu 20.04 this installs redis 5.0.7, which is quite old, but sufficient for now. There would be instructions for installing instead the current version, or even, if we are purists, its true OSS fork valkey (https://github.com/valkey-io/valkey)2: Allow connections to the Redis servers within the observatory network
we need to add a
bind
line to/etc/redis/redis.conf
. This is a dirty hack for doing it; a more robust way would be appreciated.I put the
| cut -c -30
because on last0hostname -i
returns10.23.1.25
twice, and that in the conf file hangs redis.3. Install Redis Insight
Not at all mandatory, but good-to-have:
last-asroot -c 'snap install redisinsight'
4. Clone MatlabRedis in
~/matlab/LAST
I did it with
last-asocs -c 'cd matlab/LAST; git clone https://github.com/GummyJum/MatlabRedis.git'
I also added a line
in
LAST_tools/files/github-repos.gledmagicwater
. Since I was not brave enough to rebuild and deploy the last-tools .deb, I just committed the file to this repo, then I didlast-asocs -c 'cd matlab/LAST/LAST_tools; git pull
followed byso that in future
last-asroot -c 'last-tool -n enforce last-software -s gledmagicwater'
should take care of updates.