Deploying apps from CLI

TGM

Dabbler
Joined
May 22, 2017
Messages
17
Hello,

Now that TrueNAS SCALE has been released I'm trying to automate by deployment and a couple of questions emerged.

How can I deploy an application from CLI? Like Plex or IPFS.

How can I update a catalog from CLI?

How can I start/stop and application from CLI?
 

pabloalcantara

Dabbler
Joined
Feb 21, 2022
Messages
29
Good Questions.
I need it too.
And I need how to backup the apps configs (the data that is mapped is already backup-up), if someone one my team deletes os change any of them.
 

TGM

Dabbler
Joined
May 22, 2017
Messages
17
This is as far as I got and is good enough for me:

Code:
midclt call -job chart.release.create '{
    "catalog":"OFFICIAL",
    "item":"ipfs",
    "release_name":"ipfs",
    "train":"charts",
    "version":"1.1.5",
    "values":{
        "release_name":"ipfs",
        "updateStrategy":"Recreate",
        "appVolumeMounts":{
            "staging":{
                "hostPathEnabled":true,
                "hostPath":"/mnt/storage/apps/ipfs/staging"
            },
            "data":{
                "hostPathEnabled":true,
                "hostPath":"/mnt/storage/apps/ipfs/data"
            }
        },
        "environmentVariables":[],
        "service":{
            "swarmPort":9401,
            "apiPort":9501,
            "gatewayPort":9880
        },
        "dnsConfig":{
            "options":[]
        }
    }
}'


Now I need to figure out is the JSON syntax for TRUECHARTS.
 

TGM

Dabbler
Joined
May 22, 2017
Messages
17
I don't think you can, the closest I could get is this update query, which doesn't contain the catalog data.

Code:
{
    "id": "3238f780-8e19-316f-ede7-5ab2a8dd618c",
    "msg": "method",
    "method": "chart.release.update",
    "params": [
        "ipfs",
        {
            "values": {
                "updateStrategy": "Recreate",
                "appVolumeMounts": {
                    "staging": {
                        "hostPathEnabled": true,
                        "hostPath": "/mnt/storage/apps/ipfs/staging"
                    },
                    "data": {
                        "hostPathEnabled": true,
                        "hostPath": "/mnt/storage/apps/ipfs/data"
                    }
                },
                "environmentVariables": [],
                "service": {
                    "swarmPort": 9401,
                    "apiPort": 9501,
                    "gatewayPort": 9880
                },
                "dnsConfig": {
                    "options": []
                }
            }
        }
    ]
}
 
Top