Skip to content

Commit 2f71ae1

Browse files
authored
Merge pull request #82 from oracle/issue#79-correct-readme.md-for-new-variable-syntax
Issue#79 - Use @@prop:key@@ syntax for variable replacement. Fixes #79
2 parents 50ed3ee + dceeb34 commit 2f71ae1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ Here is a simple example of a model to deploy an application and its data source
6565
resources:
6666
JDBCSystemResource:
6767
MyDataSource:
68-
Target: '${myjcs.cluster1.name}'
68+
Target: '@@PROP:myjcs.cluster1.name@@'
6969
JdbcResource:
7070
JDBCDataSourceParams:
7171
JNDIName: jdbc/generic1
7272
JDBCDriverParams:
7373
DriverName: oracle.jdbc.OracleDriver
74-
URL: 'jdbc:oracle:thin:@//${dbcs1.url}'
75-
PasswordEncrypted: '${dbcs1.password}'
74+
URL: 'jdbc:oracle:thin:@//@@PROP:dbcs1.url@@'
75+
PasswordEncrypted: '@@PROP:dbcs1.password@@'
7676
Properties:
7777
user:
78-
Value: '${dbcs1.user}'
78+
Value: '@@PROP:dbcs1.user@@'
7979
oracle.net.CONNECT_TIMEOUT:
8080
Value: 5000
8181
JDBCConnectionPoolParams:
@@ -84,16 +84,16 @@ appDeployments:
8484
Application:
8585
simpleear :
8686
SourcePath: wlsdeploy/applications/simpleear.ear
87-
Target: '${myjcs.cluster1.name}'
87+
Target: '@@PROP:myjcs.cluster1.name@@'
8888
ModuleType: ear
8989
Library:
9090
'jsf#2.0':
9191
SourcePath: '@@WL_HOME@@/common/deployable-libraries/jsf-2.0.war'
92-
Target: '${myjcs.cluster1.name}'
92+
Target: '@@PROP:myjcs.cluster1.name@@'
9393
ModuleType: war
9494
```
9595
96-
The above example shows two important features of the framework. First, notice that the `URL`, `PasswordEncrypted`, `user` property `Value` and all `Target` fields contain values that have a `${<name>}` pattern. This syntax denotes a variable placeholder whose value is specified at runtime using a variables file (in a standard Java properties file format). Variables can be used for any value and even for some names. For example, to automate standing up an environment with one or more applications in the Oracle Java Cloud Service, service provisioning does not allow the provisioning script to specify the server names. For example, if the application being deployed immediately following provisioning needs to tweak the Server Start arguments to specify a Java system property, the model can use a variable placeholder in place of the server name and populate the variable file with the provisioned server names dynamically between provisioning and application deployment.
96+
The above example shows two important features of the framework. First, notice that the `URL`, `PasswordEncrypted`, `user` property `Value` and all `Target` fields contain values that have a `@@PROP:<name>@@` pattern. This syntax denotes a variable placeholder whose value is specified at runtime using a variables file (in a standard Java properties file format). Variables can be used for any value and even for some names. For example, to automate standing up an environment with one or more applications in the Oracle Java Cloud Service, service provisioning does not allow the provisioning script to specify the server names. For example, if the application being deployed immediately following provisioning needs to tweak the Server Start arguments to specify a Java system property, the model can use a variable placeholder in place of the server name and populate the variable file with the provisioned server names dynamically between provisioning and application deployment.
9797

9898
Second, notice that the `jsf#2.0` shared library `SourcePath` attribute value starts with `@@WL_HOME@@`. This is a path token that can be used to specify that the location is relative to the location of the WebLogic Server home directory on the target environment. This path token is automatically resolved to the proper location when the tool runs. The tooling supports path tokens at any location in the model that specifies a file or directory location. The supported tokens are:
9999

@@ -546,11 +546,11 @@ resources:
546546
GlobalTransactionsProtocol: TwoPhaseCommit
547547
JDBCDriverParams:
548548
DriverName: oracle.jdbc.xa.client.OracleXADataSource
549-
URL: 'jdbc:oracle:thin:@//${db.url}'
550-
PasswordEncrypted: '${db.password}'
549+
URL: 'jdbc:oracle:thin:@//@@PROP:db.url@@'
550+
PasswordEncrypted: '@@PROP:db.password@@'
551551
Properties:
552552
user:
553-
Value: '${db.user}'
553+
Value: '@@PROP:db.user@@'
554554
oracle.net.CONNECT_TIMEOUT:
555555
Value: 5000
556556
oracle.jdbc.ReadTimeout:
@@ -565,7 +565,7 @@ resources:
565565
JNDIName: mail/MyMailSession
566566
Target: mycluster
567567
SessionUsername: '[email protected]'
568-
SessionPasswordEncrypted: '${mymailsession.password}'
568+
SessionPasswordEncrypted: '@@PROP:mymailsession.password@@'
569569
Properties:
570570
mail.store.protocol: imap
571571
mail.imap.port: 993

0 commit comments

Comments
 (0)