Skip to content

Commit

Permalink
Merge pull request #16 from ultravioletrs/rename
Browse files Browse the repository at this point in the history
CUBE - 15 - Rename Vault to Cube
  • Loading branch information
drasko authored Sep 17, 2024
2 parents f6ccb56 + 3f93b43 commit 3447fa0
Show file tree
Hide file tree
Showing 21 changed files with 89 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create and publish Vault Proxy Docker image
name: Create and publish Cube Proxy Docker image

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Vault AI
# Cube AI

Protects LLMs
6 changes: 3 additions & 3 deletions cloud-init/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cloud Init

This directory contains the cloud-init configuration files for Vault AI.
This directory contains the cloud-init configuration files for Cube AI.

## After the first boot

Expand All @@ -16,15 +16,15 @@ Your username is your github username and your password is the access token you
3. Clone the repository

```bash
git clone https://github.com/ultravioletrs/vault.git
git clone https://github.com/ultravioletrs/cube.git
```

Your username is your github username and your password is the access token you generated in step 1.

4. Pull the docker images

```bash
cd vault
cd cube/docker-compose/
docker compose pull
```

Expand Down
2 changes: 1 addition & 1 deletion cloud-init/qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DISK_SIZE="35G"
SEED_IMAGE="seed.img"
USER_DATA="user-data"
META_DATA="meta-data"
VM_NAME="vault-ai-vm"
VM_NAME="cube-ai-vm"
RAM="16384M"
CPU="8"
USER="ultraviolet"
Expand Down
26 changes: 13 additions & 13 deletions docker-compose/.env
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,19 @@ MG_GOOGLE_STATE=
MG_RELEASE_TAG=latest

# Proxy
UV_VAULT_PROXY_LOG_LEVEL=info
UV_VAULT_PROXY_HOST=0.0.0.0
UV_VAULT_PROXY_PORT=8900
UV_VAULT_PROXY_SERVER_CERT=
UV_VAULT_PROXY_SERVER_KEY=
UV_VAULT_PROXY_TARGET_URL=http://ollama:11434
UV_VAULT_PROXY_INSTANCE_ID=
UV_CUBE_PROXY_LOG_LEVEL=info
UV_CUBE_PROXY_HOST=0.0.0.0
UV_CUBE_PROXY_PORT=8900
UV_CUBE_PROXY_SERVER_CERT=
UV_CUBE_PROXY_SERVER_KEY=
UV_CUBE_PROXY_TARGET_URL=http://ollama:11434
UV_CUBE_PROXY_INSTANCE_ID=

#UI
UV_VAULT_UI_NEXTAUTH_SECRET="cZAcFIdjxebC1XDULvfoXs_sO7ufCTRo3hW2lXtMoCvcSKkTyP"
UV_VAULT_UI_NAME="Vault AI"
UV_CUBE_UI_NEXTAUTH_SECRET="cZAcFIdjxebC1XDULvfoXs_sO7ufCTRo3hW2lXtMoCvcSKkTyP"
UV_CUBE_UI_NAME="Cube AI"
# change IP address to your local IP address
UV_VAULT_UI_BASE_URL=http://109.92.195.153:3001
UV_VAULT_NEXTAUTH_URL=http://109.92.195.153:3001/api/auth
UV_VAULT_PUBLIC_BASE_URL=http://109.92.195.153:3001
UV_VAULT_PUBLIC_UI_TYPE=vault-ai
UV_CUBE_UI_BASE_URL=http://109.92.195.153:6193
UV_CUBE_NEXTAUTH_URL=http://109.92.195.153:6193/api/auth
UV_CUBE_PUBLIC_BASE_URL=http://109.92.195.153:6193
UV_CUBE_PUBLIC_UI_TYPE=cube-ai
6 changes: 3 additions & 3 deletions docker-compose/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "vault"
name: "cube"

networks:
vault-network:
cube-network:
driver: bridge

include:
Expand All @@ -27,4 +27,4 @@ services:
- ./traefik/dynamic.yaml:/etc/traefik/dynamic.yaml
- ./traefik/ssl:/etc/traefik/ssl
networks:
- vault-network
- cube-network
40 changes: 20 additions & 20 deletions docker-compose/magistrala-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- magistrala-broker-volume:/data
- ./nats:/etc/nats
networks:
- vault-network
- cube-network

jaeger:
image: jaegertracing/all-in-one:1.53.0
Expand All @@ -28,7 +28,7 @@ services:
COLLECTOR_OTLP_ENABLED: ${MG_JAEGER_COLLECTOR_OTLP_ENABLED}
command: --memory.max-traces ${MG_JAEGER_MEMORY_MAX_TRACES}
networks:
- vault-network
- cube-network

spicedb:
image: "authzed/spicedb:v1.30.0"
Expand All @@ -42,7 +42,7 @@ services:
depends_on:
- spicedb-migrate
networks:
- vault-network
- cube-network

spicedb-migrate:
image: "authzed/spicedb:v1.30.0"
Expand All @@ -55,7 +55,7 @@ services:
depends_on:
- spicedb-db
networks:
- vault-network
- cube-network

spicedb-db:
image: "postgres:16.2-alpine"
Expand All @@ -67,7 +67,7 @@ services:
volumes:
- magistrala-spicedb-db-volume:/var/lib/postgresql/data
networks:
- vault-network
- cube-network

auth-db:
image: postgres:16.2-alpine
Expand All @@ -80,7 +80,7 @@ services:
volumes:
- magistrala-auth-db-volume:/var/lib/postgresql/data
networks:
- vault-network
- cube-network

auth:
image: magistrala/auth:${MG_RELEASE_TAG}
Expand Down Expand Up @@ -154,7 +154,7 @@ services:
bind:
create_host_path: true
networks:
- vault-network
- cube-network

users-db:
image: postgres:16.2-alpine
Expand All @@ -169,7 +169,7 @@ services:
volumes:
- magistrala-users-db-volume:/var/lib/postgresql/data
networks:
- vault-network
- cube-network

users:
image: magistrala/users:${MG_RELEASE_TAG}
Expand Down Expand Up @@ -245,7 +245,7 @@ services:
bind:
create_host_path: true
networks:
- vault-network
- cube-network

invitations-db:
image: postgres:16.2-alpine
Expand All @@ -260,7 +260,7 @@ services:
volumes:
- magistrala-invitations-db-volume:/var/lib/postgresql/data
networks:
- vault-network
- cube-network

invitations:
image: magistrala/invitations:${MG_RELEASE_TAG}
Expand Down Expand Up @@ -313,11 +313,11 @@ services:
bind:
create_host_path: true
networks:
- vault-network
- cube-network

ui:
image: ghcr.io/ultravioletrs/vault/ui:latest
container_name: vault-ui
image: ghcr.io/ultravioletrs/cube/ui:latest
container_name: cube-ui
restart: on-failure
depends_on:
- auth
Expand All @@ -326,14 +326,14 @@ services:
ports:
- 3001:3000
networks:
- vault-network
- cube-network
environment:
NEXTAUTH_SECRET: ${UV_VAULT_UI_NEXTAUTH_SECRET}
NEXTAUTH_SECRET: ${UV_CUBE_UI_NEXTAUTH_SECRET}
MG_DOMAINS_URL: ${MG_DOMAINS_URL}
MG_USERS_URL: ${MG_USERS_URL}
MG_INVITATIONS_URL: ${MG_INVITATIONS_URL}
MG_UI_NAME: ${UV_VAULT_UI_NAME}
MG_BASE_URL: ${UV_VAULT_UI_BASE_URL}
NEXTAUTH_URL: ${UV_VAULT_NEXTAUTH_URL}
NEXT_PUBLIC_BASE_URL: ${UV_VAULT_PUBLIC_BASE_URL}
NEXT_PUBLIC_UI_TYPE: ${UV_VAULT_PUBLIC_UI_TYPE}
MG_UI_NAME: ${UV_CUBE_UI_NAME}
MG_BASE_URL: ${UV_CUBE_UI_BASE_URL}
NEXTAUTH_URL: ${UV_CUBE_NEXTAUTH_URL}
NEXT_PUBLIC_BASE_URL: ${UV_CUBE_PUBLIC_BASE_URL}
NEXT_PUBLIC_UI_TYPE: ${UV_CUBE_PUBLIC_UI_TYPE}
10 changes: 5 additions & 5 deletions docker-compose/ollama-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- ollama:/root/.ollama
tty: true
networks:
- vault-network
- cube-network

open-webui:
container_name: open-webui
Expand All @@ -26,7 +26,7 @@ services:
environment:
- OLLAMA_BASE_URL=http://ollama:11434
networks:
- vault-network
- cube-network

pull-llama3:
image: docker:27.2.0
Expand All @@ -38,7 +38,7 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- vault-network
- cube-network

pull-starcoder2:
image: docker:27.2.0
Expand All @@ -50,7 +50,7 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- vault-network
- cube-network

pull-nomic-embed-text:
image: docker:27.2.0
Expand All @@ -62,4 +62,4 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- vault-network
- cube-network
22 changes: 11 additions & 11 deletions docker-compose/proxy-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
services:
vault-proxy:
container_name: vault-proxy
image: ghcr.io/ultravioletrs/vault/proxy:latest
cube-proxy:
container_name: cube-proxy
image: ghcr.io/ultravioletrs/cube/proxy:latest
restart: on-failure
networks:
- vault-network
- cube-network
depends_on:
- auth
environment:
UV_VAULT_PROXY_LOG_LEVEL: ${UV_VAULT_PROXY_LOG_LEVEL}
UV_VAULT_PROXY_TARGET_URL: ${UV_VAULT_PROXY_TARGET_URL}
UV_VAULT_PROXY_HOST: ${UV_VAULT_PROXY_HOST}
UV_VAULT_PROXY_PORT: ${UV_VAULT_PROXY_PORT}
UV_VAULT_PROXY_SERVER_CERT: ${UV_VAULT_PROXY_SERVER_CERT}
UV_VAULT_PROXY_SERVER_KEY: ${UV_VAULT_PROXY_SERVER_KEY}
UV_CUBE_PROXY_LOG_LEVEL: ${UV_CUBE_PROXY_LOG_LEVEL}
UV_CUBE_PROXY_TARGET_URL: ${UV_CUBE_PROXY_TARGET_URL}
UV_CUBE_PROXY_HOST: ${UV_CUBE_PROXY_HOST}
UV_CUBE_PROXY_PORT: ${UV_CUBE_PROXY_PORT}
UV_CUBE_PROXY_SERVER_CERT: ${UV_CUBE_PROXY_SERVER_CERT}
UV_CUBE_PROXY_SERVER_KEY: ${UV_CUBE_PROXY_SERVER_KEY}
MG_AUTH_GRPC_URL: ${MG_AUTH_GRPC_URL}
MG_AUTH_GRPC_TIMEOUT: ${MG_AUTH_GRPC_TIMEOUT}
MG_AUTH_GRPC_CLIENT_CERT: ${MG_AUTH_GRPC_CLIENT_CERT:+/auth-grpc-client.crt}
MG_AUTH_GRPC_CLIENT_KEY: ${MG_AUTH_GRPC_CLIENT_KEY:+/auth-grpc-client.key}
MG_AUTH_GRPC_SERVER_CA_CERTS: ${MG_AUTH_GRPC_SERVER_CA_CERTS:+/auth-grpc-server-ca.crt}
MG_SEND_TELEMETRY: ${MG_SEND_TELEMETRY}
UV_VAULT_PROXY_INSTANCE_ID: ${UV_VAULT_PROXY_INSTANCE_ID}
UV_CUBE_PROXY_INSTANCE_ID: ${UV_CUBE_PROXY_INSTANCE_ID}
MG_JAEGER_URL: ${MG_JAEGER_URL}
MG_JAEGER_TRACE_RATIO: ${MG_JAEGER_TRACE_RATIO}
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/traefik/dynamic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ http:
- "/ollama"
forward-auth-middleware:
forwardAuth:
address: http://vault-proxy:8900
address: http://cube-proxy:8900

services:
users:
Expand Down
16 changes: 8 additions & 8 deletions proxy/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VAULT_DOCKER_IMAGE_NAME ?= ghcr.io/ultravioletrs/vault/proxy
CUBE_DOCKER_IMAGE_NAME ?= ghcr.io/ultravioletrs/cube/proxy
CGO_ENABLED ?= 0
GOOS ?= linux
GOARCH ?= amd64
Expand All @@ -13,7 +13,7 @@ define compile_service
-X 'github.com/absmach/magistrala.BuildTime=$(TIME)' \
-X 'github.com/absmach/magistrala.Version=$(VERSION)' \
-X 'github.com/absmach/magistrala.Commit=$(COMMIT)'" \
-o ${BUILD_DIR}/vault-proxy cmd/main.go
-o ${BUILD_DIR}/cube-proxy cmd/main.go
endef

define make_docker
Expand All @@ -23,22 +23,22 @@ define make_docker
--build-arg GOARCH=$(GOARCH) \
--build-arg VERSION=$(VERSION) \
--build-arg COMMIT=$(COMMIT) \
--tag=$(VAULT_DOCKER_IMAGE_NAME):$(VERSION) \
--tag=$(VAULT_DOCKER_IMAGE_NAME):latest \
--tag=$(CUBE_DOCKER_IMAGE_NAME):$(VERSION) \
--tag=$(CUBE_DOCKER_IMAGE_NAME):latest \
-f docker/Dockerfile .
endef

define make_docker_dev
docker build \
--no-cache \
--tag=$(VAULT_DOCKER_IMAGE_NAME):$(VERSION) \
--tag=$(VAULT_DOCKER_IMAGE_NAME):latest \
--tag=$(CUBE_DOCKER_IMAGE_NAME):$(VERSION) \
--tag=$(CUBE_DOCKER_IMAGE_NAME):latest \
-f docker/Dockerfile.dev ./build
endef

define docker_push
docker push $(VAULT_DOCKER_IMAGE_NAME):$(VERSION)
docker push $(VAULT_DOCKER_IMAGE_NAME):latest
docker push $(CUBE_DOCKER_IMAGE_NAME):$(VERSION)
docker push $(CUBE_DOCKER_IMAGE_NAME):latest
endef

.PHONY: build
Expand Down
2 changes: 1 addition & 1 deletion proxy/api/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/absmach/magistrala/pkg/apiutil"
"github.com/absmach/magistrala/pkg/errors"
"github.com/go-kit/kit/endpoint"
proxy "github.com/ultraviolet/vault-proxy"
proxy "github.com/ultraviolet/cube-proxy"
)

func identifyEndpoint(svc proxy.Service) endpoint.Endpoint {
Expand Down
4 changes: 2 additions & 2 deletions proxy/api/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/go-chi/chi/v5"
kithttp "github.com/go-kit/kit/transport/http"
"github.com/prometheus/client_golang/prometheus/promhttp"
proxy "github.com/ultraviolet/vault-proxy"
proxy "github.com/ultraviolet/cube-proxy"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
)

Expand All @@ -35,7 +35,7 @@ func MakeHandler(svc proxy.Service, logger *slog.Logger, instanceID string) http
opts...,
), "identify").ServeHTTP)

mux.Get("/health", magistrala.Health("vault-proxy", instanceID))
mux.Get("/health", magistrala.Health("cube-proxy", instanceID))
mux.Handle("/metrics", promhttp.Handler())

return mux
Expand Down
Loading

0 comments on commit 3447fa0

Please sign in to comment.