infest-cac-centos7: target => system
This commit is contained in:
parent
cf416ecd68
commit
8629a9de8b
@ -5,7 +5,7 @@
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "${shortname}-${version}";
|
name = "${shortname}-${version}";
|
||||||
shortname = "infest-cac-centos7";
|
shortname = "infest-cac-centos7";
|
||||||
version = "0.2.6";
|
version = "0.2.7";
|
||||||
|
|
||||||
src = ./notes;
|
src = ./notes;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ krebs_cred=${krebs_cred-./cac.json}
|
|||||||
retiolum_key=${retiolum_key-./retiolum.rsa_key.priv}
|
retiolum_key=${retiolum_key-./retiolum.rsa_key.priv}
|
||||||
# build this host
|
# build this host
|
||||||
user=${user:-shared}
|
user=${user:-shared}
|
||||||
target=${target_system:-test-centos7}
|
system=${target_system:-test-centos7}
|
||||||
|
|
||||||
log(){
|
log(){
|
||||||
echo "[$(date +"%Y-%m-%d %T")] $@" 2>&1
|
echo "[$(date +"%Y-%m-%d %T")] $@" 2>&1
|
||||||
@ -45,8 +45,8 @@ if test ! -r "$retiolum_key";then
|
|||||||
echo "\$retiolum_key=$retiolum_key must be readable"; exit 1
|
echo "\$retiolum_key=$retiolum_key must be readable"; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test ! -r "${user}/1systems/${target}.nix" ;then
|
if test ! -r "${user}/1systems/${system}.nix" ;then
|
||||||
echo "cannot find ${user}/1systems/${target}.nix , not started in stockholm directory?"
|
echo "cannot find ${user}/1systems/${system}.nix , not started in stockholm directory?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ while true;do
|
|||||||
id=servername:$name
|
id=servername:$name
|
||||||
log "got a working machine, id=$id"
|
log "got a working machine, id=$id"
|
||||||
else
|
else
|
||||||
elog "Unable to build a virtual machine, retrying in 15 seconds"
|
log "Unable to build a virtual machine, retrying in 15 seconds"
|
||||||
log "Output of build program: $out"
|
log "Output of build program: $out"
|
||||||
sleep 15
|
sleep 15
|
||||||
continue
|
continue
|
||||||
@ -153,7 +153,7 @@ make install \
|
|||||||
LOGNAME=${user} \
|
LOGNAME=${user} \
|
||||||
SSHPASS="$(cac-api getserver $id | jq -r .rootpass)" \
|
SSHPASS="$(cac-api getserver $id | jq -r .rootpass)" \
|
||||||
ssh='sshpass -e ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' \
|
ssh='sshpass -e ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' \
|
||||||
system=${target} \
|
system=${system} \
|
||||||
target=$ip
|
target=$ip
|
||||||
log "finalizing installation"
|
log "finalizing installation"
|
||||||
cac-api ssh $id < krebs/4lib/infest/finalize.sh
|
cac-api ssh $id < krebs/4lib/infest/finalize.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user