Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions control-plane/csf-updater/src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ async fn remote_digest(client: &reqwest::Client, image: &str, tag: &str, ghcr_au
}

fn local_digest(image: &str) -> Result<String> {
let pull = std::process::Command::new("docker")
.args(["pull", "--quiet", image])
.output()?;

if !pull.status.success() {
bail!(
"docker pull failed for {}: {}",
image,
String::from_utf8_lossy(&pull.stderr).trim()
);
}

let output = std::process::Command::new("docker")
.args(["image", "inspect", "--format", "{{json .RepoDigests}}", image])
.output()?;
Expand Down
1 change: 1 addition & 0 deletions nixos-node/modules/csf-daemon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ in
RestrictRealtime = true;
SystemCallFilter = "@system-service";
ReadWritePaths = [ "/var/lib/csf-daemon" ];
ReadOnlyPaths = [ "/var/lib/csf-updater/bin" ];
};
};
};
Expand Down
18 changes: 11 additions & 7 deletions nixos-node/modules/server-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ in
};
users.groups.csf-updater = {};

systemd.tmpfiles.rules = [
"d /var/lib/csf-updater 0710 csf-updater csf-daemon -"
];

systemd.services.csf-updater = {
description = "CSF Control Plane Updater";
after = [ "docker.service" "network-online.target" "csf-control-plane.service" ];
Expand Down Expand Up @@ -158,7 +162,7 @@ in
system.activationScripts.csf-binaries = {
text = ''
mkdir -p ${binDir}
chown csf-updater:csf-updater ${binDir}
chown csf-updater:csf-daemon ${binDir}
chmod 750 ${binDir}
if [ ! -f ${binDir}/csf-updater ]; then
cp ${csfUpdaterBin}/bin/csf-updater ${binDir}/csf-updater
Expand Down Expand Up @@ -236,7 +240,7 @@ services:
restart: unless-stopped

api-gateway:
image: ghcr.io/csfx-cloud/csf-ce-api-gateway:0.2.2-alpha.42
image: ghcr.io/csfx-cloud/csf-ce-api-gateway:0.2.2-alpha.47
container_name: csf-api-gateway
env_file:
- /etc/csf-core/gateway.env
Expand Down Expand Up @@ -266,7 +270,7 @@ services:
start_period: 30s

registry:
image: ghcr.io/csfx-cloud/csf-ce-registry:0.2.2-alpha.42
image: ghcr.io/csfx-cloud/csf-ce-registry:0.2.2-alpha.47
container_name: csf-registry
environment:
DATABASE_URL: postgres://csf:csfpassword@patroni:5432/csf_core
Expand All @@ -282,7 +286,7 @@ services:
restart: unless-stopped

scheduler:
image: ghcr.io/csfx-cloud/csf-ce-scheduler:0.2.2-alpha.42
image: ghcr.io/csfx-cloud/csf-ce-scheduler:0.2.2-alpha.47
container_name: csf-scheduler
environment:
DATABASE_URL: postgres://csf:csfpassword@patroni:5432/csf_core
Expand All @@ -297,7 +301,7 @@ services:
restart: unless-stopped

volume-manager:
image: ghcr.io/csfx-cloud/csf-ce-volume-manager:0.2.2-alpha.42
image: ghcr.io/csfx-cloud/csf-ce-volume-manager:0.2.2-alpha.47
container_name: csf-volume-manager
environment:
DATABASE_URL: postgres://csf:csfpassword@patroni:5432/csf_core
Expand All @@ -314,7 +318,7 @@ services:
restart: unless-stopped

failover-controller:
image: ghcr.io/csfx-cloud/csf-ce-failover-controller:0.2.2-alpha.42
image: ghcr.io/csfx-cloud/csf-ce-failover-controller:0.2.2-alpha.47
container_name: csf-failover-controller
environment:
DATABASE_URL: postgres://csf:csfpassword@patroni:5432/csf_core
Expand All @@ -330,7 +334,7 @@ services:
restart: unless-stopped

sdn-controller:
image: ghcr.io/csfx-cloud/csf-ce-sdn-controller:0.2.2-alpha.42
image: ghcr.io/csfx-cloud/csf-ce-sdn-controller:0.2.2-alpha.47
container_name: csf-sdn-controller
environment:
DATABASE_URL: postgres://csf:csfpassword@patroni:5432/csf_core
Expand Down
Loading