aboutsummaryrefslogtreecommitdiffstats
path: root/saltstack-adapter/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'saltstack-adapter/README.md')
-rw-r--r--saltstack-adapter/README.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/saltstack-adapter/README.md b/saltstack-adapter/README.md
index 5eaf1cc2..87c43f98 100644
--- a/saltstack-adapter/README.md
+++ b/saltstack-adapter/README.md
@@ -31,7 +31,8 @@ Create an Adaptor to communicate with the SaltStack server:
***Requirements and benefits of the chosen SSH method:***
1) The SaltStack server should have it’s SSH enabled.
-2) Such execution method will give the DGs and adaptor with more refined control on the SaltStack server.
+2) Via ssh user account we should have the access to run saltstack command.
+3) Such execution method will give the DGs and adaptor with more refined control on the SaltStack server.
==================================================================================================================
@@ -74,7 +75,7 @@ here for instance, in 1.1) the user should check if $reqId.<minion-name> is set
2) Execute a SLS file located on the server : Example command will look like:
Knowing the saltstack server has vim.sls file located at "/srv/salt" directory then user can execute the following commands:
1.1) Command to run the vim.sls file on saltstack server: cmd = "salt '*' state.apply vim --out=json --static"
-1.2) Command to run the nettools.sls file on saltstack server: cmd = "salt '*' state.apply nettools --out=json --static"
+1.2) Command to run the nettools.sls file on saltstack server: cmd = "cd /srv/salt/; salt '*' state.apply <sls-file-name> --out=json --static"
Important thing to note: If the reqExecCommand is used to execute sls file then along with following,
"HostName"; -> Saltstack server's host name IP address.
"Port"; -> Saltstack server's port to make SSH connection to.
@@ -82,6 +83,7 @@ Important thing to note: If the reqExecCommand is used to execute sls file then
"User"; -> Saltstack server's SSH Password.
the param should contain,
"slsExec"; -> this variable should be set to true.
+ "execTimeout"; -> set large timeout if your SLS file will take large time to finish executing (in milliseconds).
In this case, params that will hold the command execution result for DG access in Key:
Result code at: org.onap.appc.adapter.saltstack.result.code (On success: This will be 200, this means the command was executed successfully and also configuration change made using the SLS file was also successful)
@@ -98,6 +100,7 @@ The response from Saltstack comes in json format and it is automatically put to
If request Id (Id) is not passed as part of input param, then a random Id will be generated and put to properties in "org.onap.appc.adapter.saltstack.Id" field. All the output message from the execution will be appended with reqId.
1) Execute a single command on SaltState server : Example command will look like:
In the context set the "slsName" to "test.sls"
+ In the context set the "execTimeout"; -> set large timeout if your SLS file will take large time to finish executing (in milliseconds).
In the context set the "applyTo" to "minion1" //to the minions or VNFCs you want to apply the SLS file to.
"applyTo" can be empty or set to "*" is the SLS has to be applied to all the minions or VNFCs.
In this case, params that will hold the command execution result for DG access in Key:
@@ -112,7 +115,8 @@ Method to execute a single sls on SaltState server (Where the SLS file in the ad
The response from Saltstack comes in json format and it is automatically put to context for DGs access, with a certain request-ID as prefix.
If request Id (Id) is not passed as part of input param, then a random Id will be generated and put to properties in "org.onap.appc.adapter.saltstack.Id" field. All the output message from the execution will be appended with reqId.
1) Execute a single command on SaltState server : Example command will look like:
- In the context set the "slsFile" to "/path/to/test.sls" //mention the path of the SLS file in ODL container.
+ In the context set the "slsFile" to "/path/to/test.sls" //mention the path of the SLS file in ODL container.
+ In the context set the "execTimeout"; -> set large timeout if your SLS file will take large time to finish executing (in milliseconds).
In the context set the "applyTo" to "minion1" //to the minions or VNFCs you want to apply the SLS file to.
"applyTo" can be empty or set to "*" is the SLS has to be applied to all the minions or VNFCs.
In this case, params that will hold the command execution result for DG access in Key: