psm stack export-template
Use this command to export a Stack template.
Syntax
psm stack export-template -n|--template-name templateName
[-v|--version templateVersion]
[-of|--output-format json|html|short]
Parameters
All parameters are required unless otherwise noted.
Parameter | Description |
---|---|
-n|--template-name templateName |
Name of the Stack template. |
-v|--versiontemplateVersion |
(Optional) Stack template version number. By default the latest version will be exported. |
-of|--output-format json|html|short |
(Optional) Desired output format.
Accepted values: The default output format is the one you specified when using the |
Example
$ psm stack export-template -n myDevTeamStack -of json
---
template:
templateName: myDevTeamStack
templateVersion: 1.0.0
templateDescription: My Developer Team Stack
parameters:
mysqlPwd:
label: Mysql access password
description: Mysql access password
type: String
mandatory: false
sensitive: true
publicKeyText:
label: Public key text
description: Public key text for accessing the provisioned vms
type: String
mandatory: false
sensitive: true
backupStorageContainer:
label: Backup container
description: Eg., Storage-StorageEval01admin/JaaSBackup
type: String
mandatory: false
cloudStorageUser:
label: Cloud Storage user name
description: Storage account username
type: String
mandatory: false
cloudStoragePassword:
label: Cloud Storage password
description: Storage account password
type: String
mandatory: false
sensitive: true
computeShape:
label: Default compute shape
description: compute shape for each of the resource nodes
type: String
default: oc3
appURL:
label: App archive cloud URL
description: Location from where the app archive can be downloaded
type: String
mandatory: false
resources:
backupContainer:
type: OSS.Container
parameters:
cloudStorageContainer:
Fn::GetParam: backupStorageContainer
cloudStorageUser:
Fn::GetParam: cloudStorageUser
cloudStoragePassword:
Fn::GetParam: cloudStoragePassword
app:
type: apaas
parameters:
name:
Fn::Join:
- "-"
-
- Fn::GetParam: serviceName
- App
runtime: Java
subscription: MONTHLY
archiveURL:
Fn::GetParam: appURL
deployment:
memory: 1G
instances: 1
services:
-
identifier: MysqlServiceDelta
name:
Fn::GetAtt:
- mysql
- serviceName
type: MySQLCS
username: mysqlUser
password:
Fn::GetParam: mysqlPwd
depends_on:
- mysql
mysql:
type: MySQLCS
parameters:
serviceParameters:
serviceName:
Fn::Join:
- "-"
-
- Fn::GetParam: serviceName
- mysql
serviceLevel: PAAS
subscription: HOURLY
serviceDescription: DB used with ACCS
serviceVersion: 5.7
vmPublicKeyText:
Fn::GetParam: publicKeyText
cloudStorageContainer:
Fn::GetParam: backupStorageContainer
cloudStorageUser:
Fn::GetParam: cloudStorageUser
cloudStoragePassword:
Fn::GetParam: cloudStoragePassword
componentParameters:
mysql:
shape:
Fn::GetParam: computeShape
mysqlUserName: mysqlUser
mysqlUserPassword:
Fn::GetParam: mysqlPwd
depends_on:
- backupContainer
attributes:
AppWebURL:
value:
Fn::GetAtt:
- app
- attributes.webURL
description: Application URL