socallinuxexpo / scale-network

SCaLE's on-site expo network configurations, wifi, tooling, and scripts
https://www.socallinuxexpo.org/
BSD 3-Clause "New" or "Revised" License
46 stars 19 forks source link

Update signs nix config to not use container #589

Open kylerisse opened 1 year ago

kylerisse commented 1 year ago

Description

Signs is built as a container, but really it could just be run directly on the server. This would simplify a lot, including removing any requirements about building or hosting additional application containers.

https://github.com/socallinuxexpo/scale-network/blob/master/nix/machines/signs.nix#L18-L27

Acceptance Criteria

Considerations

nixinator commented 1 year ago

@kylerisse

if this needs an older version of PHP in nix, then this

https://github.com/fossar/nix-phps

and

https://discourse.nixos.org/t/local-dev-stack-for-php/26644

maybe helpful to you.

nixpkgs repo tends to race ahead with versions of things, and be super new, if this is a good or a bad thing remains to be seen.

is the latest software the best software?

kylerisse commented 1 year ago

hey that's a cool repo for pinning PHP, thanks @nixinator !

it looks like it only goes back to 5.6 thought. That might work. It currently runs on 5.4 in docker.

I'll try 5.6 first and if that doesn't work I was thinking of just doing something like the below in the pkg to pin to an older revision of nixpkgs that still had 5.4. Then use it in the derivation with a modern version of apache. What do you think?

let
     oldpkgs = import (builtins.fetchGit {            
         name = "nixpkgs-from-20160120";                                                 
         url = "https://github.com/NixOS/nixpkgs/";                       
         ref = "refs/heads/nixpkgs-unstable";                     
         rev = "2f6ef9aa6a7eecea9ff7e185ca40855f36597327";                                           
     }) {};                                                                           

     php = oldpkgs.php54;
in
nixinator commented 1 year ago

wow! it's so old that it not even supported in the old repo.

yeah, that could work. Nix is very good at reproducing old pieces of software.

So it might just work.

However, i think we all know the long term solution, is to upgrade these scripts to a modern version of PHP.

That's probably quite a lot of work, but it's going to need to be done at some point.

if the upgrade is going to be tough and lots of things needs to be upgraded... , maybe it's time to think about a new signs server, but that may be more of a socio-economic one that a technical issues.

davidelang commented 1 year ago

The entire signs server needs to be re-written. It has not been maintained for a long time, and now that we have 4k screens everywhere we should take advantage of them (as just one minor thing)

On Thu, 23 Mar 2023, Lee Hughes wrote:

wow! it's so old that it not even support in the old repo.

yeah, that could work. Nix is very good at reproducing old pieces of software.

So it might just work.

However, i think we all know the long term solution, is to upgrade these scripts to a modern version of PHP.

That's probably quite a lot of work, but it's going to need to be done at some point.

if the upgrade is going to be tough and lots of things needs to be upgraded... , maybe it's time to think about a new signs server, but that may be more of a socio-economic one that a technical issues.

kylerisse commented 1 year ago

Agreed @davidelang but until that happens let’s assume we need to keep running the existing one.

sarcasticadmin commented 1 year ago

Another note before I forget: Lets make sure we move the credentials we lay down to somewhere that's persistent instead of /var where I currently have them: https://github.com/socallinuxexpo/scale-network/blob/d890d073a2d3c8110ba47844cca85f5106e39bea/nix/machines/signs.nix#L20

kylerisse commented 1 year ago

Another note before I forget: Lets make sure we move the credentials we lay down to somewhere that's persistent instead of /var where I currently have them:

https://github.com/socallinuxexpo/scale-network/blob/d890d073a2d3c8110ba47844cca85f5106e39bea/nix/machines/signs.nix#L20

You captured this in #588

sarcasticadmin commented 1 year ago

You captured this in https://github.com/socallinuxexpo/scale-network/issues/588

I guess i did :laughing: Ill leave #588 open for now, but if/when we pick this one up the reference will be good