Skip to content

[WIP] Werf deploy #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
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
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DOCKERFILE_NAME=aarch64.Dockerfile
54 changes: 54 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Klickhouse Example - Deploy

on:
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
converge:
runs-on: deploy
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
driver-opts: image=moby/buildkit:latest
buildkitd-flags: --debug

- name: Cache Werf Stages
uses: actions/cache@v4
with:
path: ~/.werf/local_cache
key: ${{ runner.os }}-werf-${{ github.sha }}
restore-keys: |
${{ runner.os }}-werf-

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Converge
uses: werf/actions/converge@v2
with:
env: production
kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
env:
WERF_REPO: ghcr.io/katanacap/klickhouse-example
WERF_SECRET_KEY: ${{ secrets.WERF_SECRET_KEY }}
DOCKER_BUILDKIT: 1
WERF_LOG_VERBOSE: "on"
WERF_DOCKER_SERVER_STORAGE_DRIVER: overlay2
WERF_BUILDAH_MODE: auto

4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix:
include:
- { rust: stable, os: ubuntu-24.04, jobname: "stable" }
- { rust: nightly-2025-01-19, os: ubuntu-24.04, jobname: "nightly" }
- { rust: nightly, os: ubuntu-24.04, jobname: "nightly" }
services:
clickhouse:
image: clickhouse/clickhouse-server:24.8.12.28
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
fail-fast: false
matrix:
include:
- { rust: nightly-2025-01-19, os: ubuntu-24.04 }
- { rust: nightly, os: ubuntu-24.04 }
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
Empty file added .helm/values.yaml
Empty file.
6 changes: 6 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
pkgs.cargo-audit
pkgs.just
pkgs.tree
pkgs.werf
pkgs.kubernetes-helm
pkgs.vault-medusa
# pkgs.vault-bin
# pkgs.ngrok
] ++ lib.optionals pkgs.stdenv.isDarwin (with pkgs.darwin.apple_sdk; [
frameworks.SystemConfiguration
frameworks.Security
Expand Down Expand Up @@ -41,4 +46,5 @@
# };

env.CLICKHOUSE_ADDR = "127.0.0.1:9111";
env.DOCKERFILE_NAME = "aarch64.Dockerfile"; # for local development on mac aarch64
}
6 changes: 6 additions & 0 deletions werf-giterminism.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
giterminismConfigVersion: 1

---
giterminism:
config:
allowUncommitted: true
9 changes: 9 additions & 0 deletions werf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
configVersion: 1
project: klickhouse-example


---
image: klickhouse-example
dockerfile: ./x86.Dockerfile
platform:
- linux/amd64
File renamed without changes.
Loading