kubecsv
is a bash script that deploys a set of apps including their storage and network from a single comma-separated values (csv) file using TrueCharts helm repo.
Create a csv file following CSV Columns
section below or copy and edit one of the examples
in this repo. Then run below command in Linux or macOS. Replace /path/to/file.csv
with yours (if it does not exist it an example will be created).
curl -fsSL https://raw.githubusercontent.com/alrokayan/scripts/main/disk-test.sh | bash -s -- /path/to/file.csv
The best way to edit csv is via a CSV Edit extension in Studio Code, or alteratively: MS Excel, Google Sheets (import as csv, export as csv), or just a csv coloring extention in Studio Code.
That's how the csv file looks like opening it with janisdd.vscode-edit-csv
The file must be named deploy.csv
and put in the same directory where you are ruining kubecsv
. The CSV columns description are:
app_name
: This column hold a the app name, you can put anyhelm_truechart
: This column holds the app helm chart name from this linkstorage_name
: This column contains the name of the storage. It can be any, however, some times you want to overwrite a named storage. You can see all named storages from the values.yaml in TrueCharts github repostorage_enabled
: This column is to disable a named storage (OPTIONAL)storage_path
: This column contains the NFS path of the appstorage_subPath
: This column contains the sub path follows thestorage_enabled
. As a best practise, it's better to name thestorage_subPath
asstorage_name
(OPTIONAL)storage_server
: This column for NFS serverstorage_type
: This column to indicate the storage type, for now it has been tested onnfs
onlystorage_mountPath
: This column contains the path of data/config inside the containernw_master_nic
: This column for MacVLAN (dhcp or static ip) master/parent network interfacenw_mac
: This column to fix the MAC address of the app, useful for dhcp to assign fixed ip from the dhcp servernw_address_with_subnet
: This column is optional. If you assign an IP/CIDR valuekubecsv
will attach a static IP, if left empty it will use dhcp (OPTIONAL)nw_gateway
: This column is needed only if you assign fixed IP innw_address_with_subnet
. It holds the gateway for the provided fix ip. (OPTIONAL)nw_dns1
: This column is needed only if you assign fixed IP innw_address_with_subnet
. It holds DNS server one (OPTIONAL)nw_dns2
: This column is needed only if you assign fixed IP innw_address_with_subnet
. It holds DNS server two (OPTIONAL)run_as_user
: This column is optional too if you want to set a UID for the app to run as (OPTIONAL)run_as_group
: This column is optional too if you want to set a GID for the app to run as (OPTIONAL)privileged
: This column contains true or false. true means the app will run in aprivileged
mode. Default is false (OPTIONAL)extra_helm_values
: This column contains any extra values you want to add in a form of--set key:value
(OPTIONAL)
With this script you can deploy multiple home-assistant and multiple zigbee2mqtt and multiple mqtt brokers, each with a fix IP or dhcp-assigned IP in the same cluster. Storage is nfs for now.
A deployment csv file to deploy multiple home-assistant, multiple zigbee2mqtt, and multiple mqtt brokers on multiple network interfaces with dhcp and/or static ip
That's how the csv file looks like opening it with janisdd.vscode-edit-csv
That's the result after deployment of multi-home-assistant-dhcp.csv
or multi-home-assistant-static.csv
file
The script takes a reading from TrueCharts helm charts and deploy them. You can set static IP or dhcp IP with fixed MAC address all within the csv file.
A deployment csv file to deploy a set of homelab apps with dhcp and static ip
That's how the csv file looks like opening it with janisdd.vscode-edit-csv
That's the result after deployment of homelab-dhcp.csv
or homelab-static.csv
file
- TrueCharts Apps List: https://truecharts.org/charts/description-list/
- TrueCharts Apps Values: https://github.com/truecharts/charts/tree/master/charts
- TrueCharts Apps Common Values: https://github.com/truecharts/library-charts/blob/main/library/common/values.yaml