Skip to content

Commit

Permalink
Merge pull request #14 from ultravioletrs/deploy
Browse files Browse the repository at this point in the history
NOISSUE - Deploy Vault UI
  • Loading branch information
drasko authored Sep 17, 2024
2 parents b4a4fcb + 8572101 commit f6ccb56
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 3 deletions.
35 changes: 35 additions & 0 deletions cloud-init/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Cloud Init

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

## After the first boot

1. Generate access token from github to be able to pull the docker images and code from github
2. Login to the docker registry

```bash
docker login ghcr.io
```

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

3. Clone the repository

```bash
git clone https://github.com/ultravioletrs/vault.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
docker compose pull
```

5. Start the docker containers

```bash
docker compose up -d
```
6 changes: 3 additions & 3 deletions cloud-init/qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ SEED_IMAGE="seed.img"
USER_DATA="user-data"
META_DATA="meta-data"
VM_NAME="vault-ai-vm"
RAM="24576M"
CPU="6"
RAM="16384M"
CPU="8"
USER="ultraviolet"
PASSWORD="password"

Expand Down Expand Up @@ -93,7 +93,7 @@ qemu-system-x86_64 \
-machine q35 \
-enable-kvm \
-boot d \
-netdev user,id=vmnic,hostfwd=tcp::6190-:22,hostfwd=tcp::6191-:11434,hostfwd=tcp::6192-:3000 \
-netdev user,id=vmnic,hostfwd=tcp::6190-:22,hostfwd=tcp::6191-:80,hostfwd=tcp::6192-:443,hostfwd=tcp::6193-:3001 \
-device e1000,netdev=vmnic,romfile= \
-vnc :9 \
-nographic \
Expand Down
10 changes: 10 additions & 0 deletions docker-compose/.env
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ MG_INVITATIONS_DB_SSL_CERT=
MG_INVITATIONS_DB_SSL_KEY=
MG_INVITATIONS_DB_SSL_ROOT_CERT=
MG_INVITATIONS_INSTANCE_ID=
MG_INVITATIONS_URL=http://invitations:9020

### Users
MG_USERS_LOG_LEVEL=debug
Expand Down Expand Up @@ -151,3 +152,12 @@ UV_VAULT_PROXY_SERVER_CERT=
UV_VAULT_PROXY_SERVER_KEY=
UV_VAULT_PROXY_TARGET_URL=http://ollama:11434
UV_VAULT_PROXY_INSTANCE_ID=

#UI
UV_VAULT_UI_NEXTAUTH_SECRET="cZAcFIdjxebC1XDULvfoXs_sO7ufCTRo3hW2lXtMoCvcSKkTyP"
UV_VAULT_UI_NAME="Vault 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
23 changes: 23 additions & 0 deletions docker-compose/magistrala-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,26 @@ services:
create_host_path: true
networks:
- vault-network

ui:
image: ghcr.io/ultravioletrs/vault/ui:latest
container_name: vault-ui
restart: on-failure
depends_on:
- auth
- users
- invitations
ports:
- 3001:3000
networks:
- vault-network
environment:
NEXTAUTH_SECRET: ${UV_VAULT_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}

0 comments on commit f6ccb56

Please sign in to comment.