Skip to content
Merged
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
14 changes: 7 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# CSF-Core Environment Configuration
# CSFX-Core Environment Configuration
# Copy to .env and fill in values before running

# JWT secret — generate with: openssl rand -hex 64
JWT_SECRET=

# PostgreSQL
POSTGRES_USER=csf_user
POSTGRES_PASSWORD=csf-test-password
POSTGRES_DB=csf_core
POSTGRES_USER=csfx_user
POSTGRES_PASSWORD=csfx-test-password
POSTGRES_DB=csfx_core

# Rust log level (trace, debug, info, warn, error)
RUST_LOG=info

# Docker image registry (GHCR org name, lowercase)
GHCR_ORG=local
# Image version tag — use "dev" for local builds, semver for prod (e.g. 0.2.2)
CSF_VERSION=dev
CSFX_VERSION=dev

# etcd auth — generate with: openssl rand -hex 32
ETCD_ROOT_PASSWORD=
ETCD_CSF_PASSWORD=
ETCD_CSFX_PASSWORD=

# GHCR read token for image digest verification (csf-updater)
# GHCR read token for image digest verification (csfx-updater)
# generate at: https://github.com/settings/tokens — scope: read:packages
GHCR_TOKEN=
106 changes: 0 additions & 106 deletions .github/workflows/README.md

This file was deleted.

68 changes: 35 additions & 33 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
id: image
run: |
ORG=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
echo "name=ghcr.io/${ORG}/csf-ce-${{ matrix.service }}" >> $GITHUB_OUTPUT
echo "name=ghcr.io/${ORG}/csfx-ce-${{ matrix.service }}" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -113,7 +113,7 @@ jobs:
build-args: |
SERVICE_BIN=${{ matrix.service }}
BUILD_JOBS=2
CSF_BUILD_VERSION=${{ needs.prepare.outputs.version }}
CSFX_BUILD_VERSION=${{ needs.prepare.outputs.version }}
push: true
outputs: type=registry,name=${{ steps.image.outputs.name }},push-by-digest=true
platforms: ${{ matrix.platform }}
Expand Down Expand Up @@ -141,8 +141,8 @@ jobs:
fail-fast: false
matrix:
binary:
- csf-updater
- csf-agent
- csfx-updater
- csfx-agent
arch:
- amd64
- arm64
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
env:
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: musl-gcc
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc
CSF_BUILD_VERSION: ${{ needs.prepare.outputs.version }}
CSFX_BUILD_VERSION: ${{ needs.prepare.outputs.version }}
run: |
cargo build --release --bin ${{ matrix.binary }} --target ${{ matrix.target }}
cp target/${{ matrix.target }}/release/${{ matrix.binary }} ${{ matrix.binary }}-${{ matrix.arch }}
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
id: image
run: |
ORG=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
echo "name=ghcr.io/${ORG}/csf-ce-${{ matrix.service }}" >> $GITHUB_OUTPUT
echo "name=ghcr.io/${ORG}/csfx-ce-${{ matrix.service }}" >> $GITHUB_OUTPUT

- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:

- uses: actions/download-artifact@v4
with:
pattern: csf-*
pattern: csfx-*
merge-multiple: true

- name: Create or update release
Expand All @@ -271,28 +271,28 @@ jobs:
TAG="v${VERSION}"
if gh release view "${TAG}" &>/dev/null; then
gh release upload "${TAG}" \
csf-updater-amd64 \
csf-updater-amd64.sha256 \
csf-updater-arm64 \
csf-updater-arm64.sha256 \
csf-agent-amd64 \
csf-agent-amd64.sha256 \
csf-agent-arm64 \
csf-agent-arm64.sha256 \
csfx-updater-amd64 \
csfx-updater-amd64.sha256 \
csfx-updater-arm64 \
csfx-updater-arm64.sha256 \
csfx-agent-amd64 \
csfx-agent-amd64.sha256 \
csfx-agent-arm64 \
csfx-agent-arm64.sha256 \
--clobber
else
gh release create "${TAG}" \
--title "v${VERSION}" \
--prerelease \
--notes "Alpha build ${VERSION}" \
csf-updater-amd64 \
csf-updater-amd64.sha256 \
csf-updater-arm64 \
csf-updater-arm64.sha256 \
csf-agent-amd64 \
csf-agent-amd64.sha256 \
csf-agent-arm64 \
csf-agent-arm64.sha256
csfx-updater-amd64 \
csfx-updater-amd64.sha256 \
csfx-updater-arm64 \
csfx-updater-arm64.sha256 \
csfx-agent-amd64 \
csfx-agent-amd64.sha256 \
csfx-agent-arm64 \
csfx-agent-arm64.sha256
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -317,7 +317,7 @@ jobs:

- uses: actions/download-artifact@v4
with:
pattern: csf-agent-*
pattern: csfx-agent-*
path: /tmp/binaries
merge-multiple: true

Expand All @@ -340,7 +340,7 @@ jobs:

get_manifest_digest() {
local svc=$1
local image="ghcr.io/${ORG}/csf-ce-${svc}:${VERSION}"
local image="ghcr.io/${ORG}/csfx-ce-${svc}:${VERSION}"
docker buildx imagetools inspect "${image}" \
--format '{{json .Manifest}}' | jq -r '.digest'
}
Expand All @@ -353,7 +353,7 @@ jobs:

cat > infra/versions.nix <<EOF
{
csf = {
csfx = {
version = "${VERSION}";
images = {
api-gateway = { digest = "$(get_manifest_digest api-gateway)"; };
Expand All @@ -365,12 +365,12 @@ jobs:
};
agent = {
amd64 = {
url = "${RELEASE_BASE}/csf-agent-amd64";
sha256 = "$(get_sha256 csf-agent amd64)";
url = "${RELEASE_BASE}/csfx-agent-amd64";
sha256 = "$(get_sha256 csfx-agent amd64)";
};
arm64 = {
url = "${RELEASE_BASE}/csf-agent-arm64";
sha256 = "$(get_sha256 csf-agent arm64)";
url = "${RELEASE_BASE}/csfx-agent-arm64";
sha256 = "$(get_sha256 csfx-agent arm64)";
};
};
};
Expand All @@ -386,7 +386,9 @@ jobs:
git add versions.nix
git diff --cached --quiet && echo "no changes" && exit 0
git commit -m "chore: update versions.nix for v${VERSION}"
git push
git push origin main
git tag "v${VERSION}"
git push origin "v${VERSION}"

summary:
name: Summary
Expand All @@ -404,13 +406,13 @@ jobs:
echo "| Service | Image |" >> $GITHUB_STEP_SUMMARY
echo "|---------|-------|" >> $GITHUB_STEP_SUMMARY
for svc in api-gateway registry scheduler volume-manager failover-controller sdn-controller; do
echo "| ${svc} | \`ghcr.io/${ORG}/csf-ce-${svc}:${VERSION}\` |" >> $GITHUB_STEP_SUMMARY
echo "| ${svc} | \`ghcr.io/${ORG}/csfx-ce-${svc}:${VERSION}\` |" >> $GITHUB_STEP_SUMMARY
done
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Binaries" >> $GITHUB_STEP_SUMMARY
echo "| Binary | Arch | Artifact |" >> $GITHUB_STEP_SUMMARY
echo "|--------|------|----------|" >> $GITHUB_STEP_SUMMARY
for bin in csf-updater csf-agent; do
for bin in csfx-updater csfx-agent; do
echo "| ${bin} | amd64 | \`${bin}-amd64\` |" >> $GITHUB_STEP_SUMMARY
echo "| ${bin} | arm64 | \`${bin}-arm64\` |" >> $GITHUB_STEP_SUMMARY
done
Loading
Loading