Initial commit: Antigravity dev container with Happy Coder
Add containerized GUI development environment featuring: - Antigravity IDE (VSCode) accessible via web browser - Happy Coder AI assistant integration - Automatic GitHub repository cloning on startup - Persistent user home directory (ReadWriteMany PVC) - Secure non-root execution as user claude (UID 1000) Components: - Dockerfile based on jlesage/baseimage-gui - Startup scripts for repo initialization and app launch - Kubernetes manifests (StatefulSet, ConfigMap, Secrets) - Makefile for build and deployment automation - Comprehensive documentation Features: - Web-based VNC interface (port 5800) - GitHub token authentication for private repos - Happy Coder runs as background service in workspace - CephFS storage for persistent home directory - Configurable display resolution and security Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: antigravity-config
|
||||
data:
|
||||
# GitHub repository to clone on startup
|
||||
# Example: "https://github.com/username/repository"
|
||||
github-repo: ""
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: antigravity
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
||||
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
||||
nginx.ingress.kubernetes.io/websocket-services: "antigravity"
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- antigravity.example.com # Replace with your domain
|
||||
secretName: antigravity-tls
|
||||
rules:
|
||||
- host: antigravity.example.com # Replace with your domain
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: antigravity
|
||||
port:
|
||||
number: 5800
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: default
|
||||
|
||||
resources:
|
||||
- configmap.yaml
|
||||
- statefulset.yaml
|
||||
- ingress.yaml
|
||||
|
||||
# Uncomment to create secrets from files
|
||||
# secretGenerator:
|
||||
# - name: antigravity-secrets
|
||||
# literals:
|
||||
# - github-token=ghp_your_token
|
||||
# - happy-coder-api-key=your_key
|
||||
# - vnc-password=your_password
|
||||
|
||||
commonLabels:
|
||||
app: antigravity
|
||||
environment: production
|
||||
|
||||
commonAnnotations:
|
||||
managed-by: kustomize
|
||||
description: "Antigravity Dev Container with Happy Coder"
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
# Example secrets - DO NOT commit actual secrets!
|
||||
# Use SealedSecrets or another secret management solution
|
||||
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: antigravity-secrets
|
||||
type: Opaque
|
||||
stringData:
|
||||
# GitHub Personal Access Token (for private repos)
|
||||
github-token: "ghp_your_token_here"
|
||||
|
||||
# Happy Coder API Key
|
||||
happy-coder-api-key: "your_happy_coder_api_key"
|
||||
|
||||
# VNC Password (optional, for secure VNC access)
|
||||
vnc-password: "your_vnc_password"
|
||||
@@ -0,0 +1,117 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: antigravity
|
||||
labels:
|
||||
app: antigravity
|
||||
spec:
|
||||
ports:
|
||||
- port: 5800
|
||||
name: vnc-web
|
||||
protocol: TCP
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: antigravity
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: antigravity
|
||||
spec:
|
||||
serviceName: "antigravity"
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: antigravity
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: antigravity
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
fsGroupChangePolicy: "OnRootMismatch"
|
||||
containers:
|
||||
- name: antigravity
|
||||
image: ghcr.io/cpfarhood/antigravity:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 5800
|
||||
name: vnc-web
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: userhome
|
||||
mountPath: /home
|
||||
- name: workspace
|
||||
mountPath: /workspace
|
||||
env:
|
||||
# User/Group IDs for the claude user
|
||||
- name: USER_ID
|
||||
value: "1000"
|
||||
- name: GROUP_ID
|
||||
value: "1000"
|
||||
# VNC display settings
|
||||
- name: DISPLAY_WIDTH
|
||||
value: "1920"
|
||||
- name: DISPLAY_HEIGHT
|
||||
value: "1080"
|
||||
- name: SECURE_CONNECTION
|
||||
value: "1"
|
||||
- name: VNC_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: antigravity
|
||||
key: vnc-password
|
||||
optional: true
|
||||
# GitHub configuration
|
||||
- name: GITHUB_REPO
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: antigravity
|
||||
key: github-repo
|
||||
optional: true
|
||||
- name: GITHUB_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: antigravity
|
||||
key: github-token
|
||||
optional: true
|
||||
# Happy Coder configuration
|
||||
- name: HAPPY_CODER_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: antigravity
|
||||
key: happy-coder-api-key
|
||||
optional: true
|
||||
resources:
|
||||
requests:
|
||||
memory: "2Gi"
|
||||
cpu: "1000m"
|
||||
limits:
|
||||
memory: "8Gi"
|
||||
cpu: "4000m"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 5800
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 5800
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
volumes:
|
||||
- name: workspace
|
||||
emptyDir: {}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: userhome
|
||||
spec:
|
||||
accessModes: [ "ReadWriteMany" ]
|
||||
storageClassName: "ceph-filesystem"
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
Reference in New Issue
Block a user