# oscar-young/dt-alpine architecture

> Architecture diagram of the GitHub repository oscar-young/dt-alpine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oscar-young/dt-alpine
- Repository: https://github.com/oscar-young/dt-alpine

## Overview

DT-alpine is a command-line toolkit for preparing machines and deploying and operating a Hadoop cluster. The documented workflow runs system inspection and preparation, installs Hadoop-related packages and configuration, initializes and starts HDFS and YARN, deploys Tez to HDFS, then provisions or removes users. The README also documents cluster shutdown. Source excerpts were unavailable, so relationships below are limited to workflows and file roles explicitly described in the README; implementation details are not inferred.

Main entry points: [`bin/dt`](https://github.com/oscar-young/dt-alpine/blob/master/bin/dt) (dt command), [`web/script/build`](https://github.com/oscar-young/dt-alpine/blob/master/web/script/build) (Hadoop build), [`bin/dt.adduser`](https://github.com/oscar-young/dt-alpine/blob/master/bin/dt.adduser) (Add users), [`bin/formatdfs`](https://github.com/oscar-young/dt-alpine/blob/master/bin/formatdfs) (Format HDFS)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Machine setup"]
  node_dt["dt command"]
  node_sysinfo["System inspection"]
  node_sysprep["System preparation"]
  node_build["Hadoop build"]
end

subgraph group_cluster["Cluster operations"]
  node_hdfsformat["Format HDFS"]
  node_hdfsstart["Start HDFS"]
  node_hdfsstop["Stop HDFS"]
  node_yarnstart["Start YARN"]
  node_yarnstop["Stop YARN"]
  node_tez["Deploy Tez"]
  node_hdfs[("HDFS cluster")]
  node_yarn["YARN cluster"]
end

subgraph group_platform["Platform configuration"]
  node_configs["Cluster configuration"]
  node_hosts["Host inventory"]
end

subgraph group_accounts["User management"]
  node_userlist["User credentials"]
  node_adduser["Add users<br/>[dt.adduser]"]
  node_deluser["Delete users<br/>[dt.deluser]"]
end

node_operator(("Operator"))

node_operator -->|"runs commands"| node_dt
node_operator -->|"formats cluster"| node_hdfsformat
node_operator -->|"starts services"| node_hdfsstart
node_operator -->|"stops services"| node_hdfsstop
node_operator -->|"starts services"| node_yarnstart
node_operator -->|"stops services"| node_yarnstop
node_operator -->|"deploys Tez"| node_tez
node_operator -->|"provisions users"| node_adduser
node_operator -->|"removes users"| node_deluser
node_dt -->|"runs inspection"| node_sysinfo
node_dt -->|"runs preparation"| node_sysprep
node_dt -->|"runs installation"| node_build
node_build -->|"copies configuration"| node_configs
node_build -->|"copies host inventory"| node_hosts
node_hdfsformat -->|"formats"| node_hdfs
node_hdfsstart -->|"starts"| node_hdfs
node_hdfsstop -->|"stops"| node_hdfs
node_yarnstart -->|"starts"| node_yarn
node_yarnstop -->|"stops"| node_yarn
node_tez -->|"uploads Tez"| node_hdfs
node_adduser -->|"reads credentials"| node_userlist
node_adduser -->|"creates user homes"| node_hdfs

click node_dt "https://github.com/oscar-young/dt-alpine/blob/master/bin/dt"
click node_sysinfo "https://github.com/oscar-young/dt-alpine/blob/master/web/script/sysinfo"
click node_sysprep "https://github.com/oscar-young/dt-alpine/blob/master/web/script/sysprep"
click node_build "https://github.com/oscar-young/dt-alpine/blob/master/web/script/build"
click node_configs "https://github.com/oscar-young/dt-alpine/tree/master/web/config"
click node_hosts "https://github.com/oscar-young/dt-alpine/blob/master/web/config/hosts"
click node_hdfsformat "https://github.com/oscar-young/dt-alpine/blob/master/bin/formatdfs"
click node_hdfsstart "https://github.com/oscar-young/dt-alpine/blob/master/bin/starthdfs"
click node_hdfsstop "https://github.com/oscar-young/dt-alpine/blob/master/bin/stophdfs"
click node_yarnstart "https://github.com/oscar-young/dt-alpine/blob/master/bin/startyarn"
click node_yarnstop "https://github.com/oscar-young/dt-alpine/blob/master/bin/stopyarn"
click node_tez "https://github.com/oscar-young/dt-alpine/blob/master/bin/buildtez"
click node_userlist "https://github.com/oscar-young/dt-alpine/blob/master/conf/userlist"
click node_adduser "https://github.com/oscar-young/dt-alpine/blob/master/bin/dt.adduser"
click node_deluser "https://github.com/oscar-young/dt-alpine/blob/master/bin/dt.deluser"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dt,node_sysinfo,node_sysprep,node_build toneBlue
class node_hdfsformat,node_hdfsstart,node_hdfsstop,node_yarnstart,node_yarnstop,node_tez,node_hdfs,node_yarn toneAmber
class node_configs,node_hosts toneMint
class node_userlist,node_adduser,node_deluser toneRose
class node_operator toneIndigo
```

## Components

### Machine setup

- [dt command](https://github.com/oscar-young/dt-alpine/blob/master/bin/dt): `bin/dt`
- [System inspection](https://github.com/oscar-young/dt-alpine/blob/master/web/script/sysinfo): `web/script/sysinfo`
- [System preparation](https://github.com/oscar-young/dt-alpine/blob/master/web/script/sysprep): `web/script/sysprep`
- [Hadoop build](https://github.com/oscar-young/dt-alpine/blob/master/web/script/build): `web/script/build`

### Cluster operations

- [Format HDFS](https://github.com/oscar-young/dt-alpine/blob/master/bin/formatdfs): `bin/formatdfs`
- [Start HDFS](https://github.com/oscar-young/dt-alpine/blob/master/bin/starthdfs): `bin/starthdfs`
- [Stop HDFS](https://github.com/oscar-young/dt-alpine/blob/master/bin/stophdfs): `bin/stophdfs`
- [Start YARN](https://github.com/oscar-young/dt-alpine/blob/master/bin/startyarn): `bin/startyarn`
- [Stop YARN](https://github.com/oscar-young/dt-alpine/blob/master/bin/stopyarn): `bin/stopyarn`
- [Deploy Tez](https://github.com/oscar-young/dt-alpine/blob/master/bin/buildtez): `bin/buildtez`
- **HDFS cluster**
- **YARN cluster**

### Platform configuration

- [Cluster configuration](https://github.com/oscar-young/dt-alpine/tree/master/web/config): `web/config`
- [Host inventory](https://github.com/oscar-young/dt-alpine/blob/master/web/config/hosts): `web/config/hosts`

### User management

- [User credentials](https://github.com/oscar-young/dt-alpine/blob/master/conf/userlist): `conf/userlist`
- [Add users](https://github.com/oscar-young/dt-alpine/blob/master/bin/dt.adduser): `bin/dt.adduser`
- [Delete users](https://github.com/oscar-young/dt-alpine/blob/master/bin/dt.deluser): `bin/dt.deluser`

### Other components

- **Operator**

## Connections

- Operator → dt command: runs commands (evidence: `README.md`)
- Operator → Format HDFS: formats cluster (evidence: `README.md`)
- Operator → Start HDFS: starts services (evidence: `README.md`)
- Operator → Stop HDFS: stops services (evidence: `README.md`)
- Operator → Start YARN: starts services (evidence: `README.md`)
- Operator → Stop YARN: stops services (evidence: `README.md`)
- Operator → Deploy Tez: deploys Tez (evidence: `README.md`)
- Operator → Add users: provisions users (evidence: `README.md`)
- Operator → Delete users: removes users (evidence: `README.md`)
- dt command → System inspection: runs inspection (evidence: `README.md`)
- dt command → System preparation: runs preparation (evidence: `README.md`)
- dt command → Hadoop build: runs installation (evidence: `README.md`)
- Hadoop build → Cluster configuration: copies configuration (evidence: `README.md`)
- Hadoop build → Host inventory: copies host inventory (evidence: `README.md`)
- Format HDFS → HDFS cluster: formats (evidence: `README.md`)
- Start HDFS → HDFS cluster: starts (evidence: `README.md`)
- Stop HDFS → HDFS cluster: stops (evidence: `README.md`)
- Start YARN → YARN cluster: starts (evidence: `README.md`)
- Stop YARN → YARN cluster: stops (evidence: `README.md`)
- Deploy Tez → HDFS cluster: uploads Tez (evidence: `README.md`)
- Add users → User credentials: reads credentials (evidence: `README.md`)
- Add users → HDFS cluster: creates user homes (evidence: `README.md`)
