https://github.com/fl64/dvp-demo-app
Three-tier DVP demo app
https://github.com/fl64/dvp-demo-app
deckhouse dvp k8s
Last synced: 12 days ago
JSON representation
Three-tier DVP demo app
- Host: GitHub
- URL: https://github.com/fl64/dvp-demo-app
- Owner: fl64
- Created: 2025-02-21T10:11:45.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2026-04-04T15:31:02.000Z (2 months ago)
- Last Synced: 2026-04-04T18:28:53.405Z (2 months ago)
- Topics: deckhouse, dvp, k8s
- Language: HTML
- Homepage: https://deckhouse.ru/products/virtualization-platform/documentation/
- Size: 783 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Three-Tier Application Demo
## Overview
A demo application with a three-tier architecture (**Frontend → Backend → Database**) designed to:
1. Show the capabilities of the cloud platform
2. Demonstrate how Network Policies work
3. Example of integration with Dex authentication system
4. Testing the interaction of components in a virtualized environment

### Application Structure
- **Project: demo-db**
- **Database**
- VM: `db` (PostgreSQL)
- **Project: demo-app**
- **Frontend**
- VM: `frontend` (Bootstrap app)
- Pod: `frontend` (Bootstrap app)
- **Backend**
- VM: `backend-a` (Flask + Gunicorn)
- VM: `backend-b` (Flask + Gunicorn)
Component interaction is restricted by network policies. Application access requires authentication via Dex.
## Access System
| User | Role | Access Rights |
| -------------------------- | -------------------------------- | ---------------------------------------- |
| `demo-user@flant.com` | Application User | Access via web interface |
| `demo-db-admin@flant.com` | Project Administrator `demo-db` | Full VM access with PostgreSQL |
| `demo-app-admin@flant.com` | Project Administrator `demo-app` | Management of all application components |
Translated with DeepL.com (free version)
## Repository Structure
- `/apps` - Frontend and backend source code
- `/k8s` - Kubernetes deployment manifests
- `/ansible` - Ansible playbooks for VM management
## Requirements
### Required d8 Modules
Ensure the following d8 modules are enabled and configured:
- `admission-policy-engine`
- `cni-cilium`
- `console`
- `multitenancy-manager`
- `service-with-healthchecks`
- `user-authn`
- `virtualization`
- `operator-argo` (required for ArgoCD installation)
### Installation-Specific Requirements
**For Option 1 (Manual Installation via Task):**
- [task](https://taskfile.dev)
- [yq](https://github.com/mikefarah/yq)
- [ansible](https://docs.ansible.com/ansible/latest/index.html)
- [d8](https://github.com/deckhouse/deckhouse-cli) (v0.27.0+ for ansible-inventory support)
## Installation
### Option 1: Manual Installation via Task
1. Create a `.env` file with infrastructure settings:
```ini
PASSWORD=password
FQDN=demo.example.com
```
2. Generate SSH keys for VM access:
```bash
task ssh-gen
```
3. Deploy the application:
```bash
task deploy
```
4. Uninstall the application:
```bash
task undeploy
```
### Option 2: ArgoCD Installation
1. Apply the ApplicationSet:
```bash
task argocd:apply
```
2. ArgoCD will automatically create and sync applications for `demo-app` and `demo-db` namespaces.
3. To remove, delete the ApplicationSet:
```bash
task argocd:delete
```
## How to connect to VM
### Via Task (SSH)
```bash
task ssh:frontend # Connect to frontend VM
task ssh:backend-a # Connect to backend-a VM
task ssh:backend-b # Connect to backend-b VM
task ssh:db # Connect to database VM
```
### Via d8 CLI
**SSH:**
```bash
d8 v ssh -n demo-app cloud@ -i ./tmp/demo --local-ssh
```
**Console:**
```bash
d8 v console -n demo-app
```
## Ansible Management
The project includes Ansible playbooks for automated VM management. Uses `d8 v ansible-inventory` for dynamic inventory discovery.
**Check VM uptime:**
```bash
task ansible:uptime
```
**Update packages on all VMs:**
```bash
task ansible:update
```
**Run security checks:**
```bash
task ansible:security-check
```