!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

250 Members
A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena85 Servers

Load older messages


SenderMessageTime
27 Apr 2024
@bonus:bonusplay.plBonushttps://bonusplay.pl/asktoask22:14:50
@bonus:bonusplay.plBonus * https://bonusplay.pl/asktoask :)22:15:09
@sylex-matrix:matrix.orgsylex-matrixI'm new to pretty much everything related to nix deployments, so I'm kinda lost on the sense of not knowing where to look for things22:15:34
@sylex-matrix:matrix.orgsylex-matrix
In reply to @bonus:bonusplay.pl
https://bonusplay.pl/asktoask
Hey! I was about to articulate my question haha
22:15:44
@sylex-matrix:matrix.orgsylex-matrix just being polite 22:15:46
@sylex-matrix:matrix.orgsylex-matrix:)22:15:49
@sylex-matrix:matrix.orgsylex-matrixWell the thing is, I'm trynna deploy a server into a compute instance on the cloud (Oracle although irrelevant)22:16:31
@sylex-matrix:matrix.orgsylex-matrix And I've gotten most of the things required separatedly 22:16:51
@sylex-matrix:matrix.orgsylex-matrixI use pulumi (similar to terraform) to get the compute running22:17:29
@sylex-matrix:matrix.orgsylex-matrixthen I use nixos-anywhere to replace the ubuntu instance by a nixOS machine22:17:43
@sylex-matrix:matrix.orgsylex-matrixand I've managed to get Colmena to update the machine too22:18:08
@sylex-matrix:matrix.orgsylex-matrixbut right now what I want to do is to launch some applications when the machine is updated by colmena, or maybe afterwards?22:19:21
@sylex-matrix:matrix.orgsylex-matrixlets say I have a docker image that runs some service on a port, how would I go about fetching some git repo, launching a docker container inside the repo and running it?22:20:25
@sylex-matrix:matrix.orgsylex-matrix(Obv I mean how would I do it from nix)22:21:04
@bonus:bonusplay.plBonusoption #1: you can nix the application inside the docker container option #2: run a docker container via virtualisation.oci-containers.containers22:22:27
@bonus:bonusplay.plBonus * option #1: you can nix the application inside the docker container
option #2: run a docker container via virtualisation.oci-containers.containers
22:22:33
@sylex-matrix:matrix.orgsylex-matrixwait22:22:44
@sylex-matrix:matrix.orgsylex-matrixdocker was just an example22:22:47
@sylex-matrix:matrix.orgsylex-matrixmaybe I phrased my problem wrong22:22:54
@sylex-matrix:matrix.orgsylex-matrixthe thing is, how do I tell colmena to execute some actions after the machine has been deployed?22:23:18
@sylex-matrix:matrix.orgsylex-matrix maybe its just running
git clone x
cd blah blah
./run.sh
22:23:37
@sylex-matrix:matrix.orgsylex-matrixkind of like the RUNs of a dockerfile22:23:47
@bonus:bonusplay.plBonusin theory you shouldn't since it's not "THE NIX WAY"22:23:53
@sylex-matrix:matrix.orgsylex-matrix what would be the nix way then? 22:24:09
@bonus:bonusplay.plBonus in practice: system.activationScripts 22:24:13
@sylex-matrix:matrix.orgsylex-matrix I've been struggling pretty hard to learn the nix way 22:24:19
@bonus:bonusplay.plBonuscolmena is just a wrapper for nix tools (copy closure via ssh, etc.)22:25:01
@bonus:bonusplay.plBonusyou want to execute something "after configuration switch" or "everytime you boot"22:27:02
@sylex-matrix:matrix.orgsylex-matrixyeah, pretty much22:27:23
@bonus:bonusplay.plBonus then try system.activationScripts 22:28:46

Show newer messages


Back to Room ListRoom Version: 6