Skip to content

Kubernetes infra #1088

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

Merged
merged 41 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8d12954
feat(chart): create kube infra
rtrompier Apr 29, 2024
0271926
feat(chart): create kube infra
rtrompier Apr 29, 2024
d7ce041
feat(chart): create kube infra
rtrompier Apr 29, 2024
d6df8b7
feat(chart): create kube infra
rtrompier Apr 29, 2024
26c22fb
feat(chart): create kube infra
rtrompier Apr 29, 2024
bfd6b45
feat(chart): create kube infra
rtrompier Apr 29, 2024
aa78161
feat(chart): create kube infra
rtrompier Apr 29, 2024
a70d558
feat(chart): create kube infra
rtrompier Apr 29, 2024
22f15df
feat(chart): create kube infra
rtrompier Apr 29, 2024
5d71087
feat(chart): create kube infra
rtrompier Apr 29, 2024
e41a312
feat(chart): create kube infra
rtrompier Apr 29, 2024
25b3884
feat(chart): create kube infra
rtrompier Apr 29, 2024
6c4e774
feat(chart): add hpa
rtrompier Apr 30, 2024
6893e26
feat(chart): add service monitor
rtrompier Apr 30, 2024
2871e0b
feat(chart): test
rtrompier Apr 30, 2024
cdbff67
feat(chart): fix lint
rtrompier Apr 30, 2024
26a30ba
feat(chart): remove pm2
rtrompier Apr 30, 2024
d6f948b
feat(chart): fix
rtrompier Apr 30, 2024
8f72697
feat(chart): fix
rtrompier Apr 30, 2024
f1e0e20
feat(chart): fix
rtrompier Apr 30, 2024
62cfed9
feat(chart): fix
rtrompier Apr 30, 2024
f0b5ff8
Merge branch 'main' into feat/infra
rtrompier Apr 30, 2024
24b2e67
feat(chart): fix
rtrompier Apr 30, 2024
5061c54
feat(chart): fix
rtrompier Apr 30, 2024
0a13325
feat(chart): fix
rtrompier Apr 30, 2024
697d0df
feat(chart): fix
rtrompier Apr 30, 2024
2d6ec94
feat(chart): fix
rtrompier Apr 30, 2024
13c8184
feat(chart): fix
rtrompier Apr 30, 2024
9cdf547
Merge branch 'main' into feat/infra
rtrompier Apr 30, 2024
18364da
feat(chart): fix
rtrompier Apr 30, 2024
9b563c1
feat(chart): fix
rtrompier Apr 30, 2024
50ed513
feat(chart): fix
rtrompier Apr 30, 2024
bb38482
feat(chart): fix
rtrompier Apr 30, 2024
f50b508
feat(chart): fix
rtrompier Apr 30, 2024
e4270bb
update replicas count
rtrompier May 3, 2024
21797cd
json logs
rtrompier May 3, 2024
a38cdaf
use internal image for prod env
rtrompier May 3, 2024
f9721e5
Merge branch 'main' into feat/infra
nsarrazin May 3, 2024
10961b5
Add LOG_LEVEL in prod yaml
nsarrazin May 3, 2024
5faef25
Get rid of unused staging env
nsarrazin May 3, 2024
17a7345
add an image build for internal registry
nsarrazin May 3, 2024
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
69 changes: 69 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Deploy to k8s
on:
# run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build-and-publish-huggingchat-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

- name: Extract package version
id: package-version
run: |
VERSION=$(jq -r .version package.json)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
MAJOR=$(echo $VERSION | cut -d '.' -f1)
echo "MAJOR=$MAJOR" >> $GITHUB_OUTPUT
MINOR=$(echo $VERSION | cut -d '.' -f1).$(echo $VERSION | cut -d '.' -f2)
echo "MINOR=$MINOR" >> $GITHUB_OUTPUT
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/huggingface/chat-ui
tags: |
type=raw,value=${{ steps.package-version.outputs.VERSION }},enable=${{github.event_name == 'release'}}
type=raw,value=${{ steps.package-version.outputs.MAJOR }},enable=${{github.event_name == 'release'}}
type=raw,value=${{ steps.package-version.outputs.MINOR }},enable=${{github.event_name == 'release'}}
type=raw,value=latest,enable={{is_default_branch}}
type=sha,enable={{is_default_branch}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Registry
uses: docker/login-action@v2
with:
registry: registry.internal.huggingface.tech
username: ${{ secrets.DOCKER_INTERNAL_USERNAME }}
password: ${{ secrets.DOCKER_INTERNAL_PASSWORD }}

- name: Build and Publish Docker Image without DB
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-to: type=gha,mode=max,scope=amd64
cache-from: type=gha,scope=amd64
provenance: false
build-args: |
INCLUDE_DB=false
APP_BASE=/chat
PUBLIC_APP_COLOR=yellow
2 changes: 1 addition & 1 deletion .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to production
name: Deploy to production spaces
on:
# run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/deploy-staging.yml

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
/build
/.svelte-kit
/package
/chart
.env
.env.*
!.env.example
Expand Down
5 changes: 5 additions & 0 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: chat-ui
version: 0.0.0-latest
type: application
icon: https://huggingface.co/front/assets/huggingface_logo-noborder.svg
Loading