Publishing Services through PowerShell DSC

130
1
Jump to solution
02-24-2021 04:24 AM
AYUSHYADAV
New Contributor II

Hello,

I have to publish a GIS service through PowerShell. I found a sample configuration for the same from-  https://github.com/Esri/arcgis-powershell-dsc/blob/master/SampleConfigs/v3/PublishGISService.json,

I am not getting few things that,  what should we have to write-in placeholders like:-

1) "CertificateFile": ""

2) "Thumbprint": ""

3) "PortalContext":

4) "ServerContext":

5) "PasswordFile": ""

6) "PathToItemInfoFile": ""

Please help me with the above placeholders.

Secondly, what command should I run on PowerShell to publish PublishGISService.json?

                                                                       OR

I have to merge PublishGISService.json with BaseDeployment-SingleMachine.json to publish the services.

Thank You!

 

 

0 Kudos
1 Solution

Accepted Solutions
JonEmch
Esri Contributor

Hey there,

I was able to connect to @CameronKroeker who helped me get some details on this. 

1) "CertificateFile""" - The location of the .cer file of the ArcGIS Server host. (This is not the .pfx or .cer with a private key, so no password is required)

2) "Thumbprint""" -This can be found by opening the certificate details pane (open ArcGIS Server host, click on the lock icon, go to Details and scroll all the way down.) thumbprint.jpg 

3) "PortalContext": - This is the alias of the web adaptor for portal (https://esri.com/portal)

4) "ServerContext":Same as above but for ArcGIS Server

5) "PasswordFile""" - This is a path to the encrypted password .txt file. More detaisl on how to generate this can be found here: https://github.com/Esri/arcgis-powershell-dsc/wiki/V3.-Password-Files-and-Encrypted-Deployments

6) "PathToItemInfoFile""" - This can be left blank This comes straight from the API, created via https://developers.arcgis.com/rest/enterprise-administration/server/iteminfo-upload.htm

 

As for your last question, you are unable to merge both the configuration and publish actions because they invoke different methods.

To Invoke the publish method: Invoke-PublishService -ConfigurationParameterFile.json

Versus the Configuration Method: Invoke-ArcGISConfiguration -Mode Install -ConfigurationParameterFile my.json

I have given this feedback to Mr. Kroeker, who will update the current sample to include these remarks to make it a bit easier to use. Additionally, he will also ensure that the placeholders get included in the wiki.

If you have any issues, please feel free to ask, or better yet post in the github community.

Keep on keeping on!

View solution in original post

1 Reply
JonEmch
Esri Contributor

Hey there,

I was able to connect to @CameronKroeker who helped me get some details on this. 

1) "CertificateFile""" - The location of the .cer file of the ArcGIS Server host. (This is not the .pfx or .cer with a private key, so no password is required)

2) "Thumbprint""" -This can be found by opening the certificate details pane (open ArcGIS Server host, click on the lock icon, go to Details and scroll all the way down.) thumbprint.jpg 

3) "PortalContext": - This is the alias of the web adaptor for portal (https://esri.com/portal)

4) "ServerContext":Same as above but for ArcGIS Server

5) "PasswordFile""" - This is a path to the encrypted password .txt file. More detaisl on how to generate this can be found here: https://github.com/Esri/arcgis-powershell-dsc/wiki/V3.-Password-Files-and-Encrypted-Deployments

6) "PathToItemInfoFile""" - This can be left blank This comes straight from the API, created via https://developers.arcgis.com/rest/enterprise-administration/server/iteminfo-upload.htm

 

As for your last question, you are unable to merge both the configuration and publish actions because they invoke different methods.

To Invoke the publish method: Invoke-PublishService -ConfigurationParameterFile.json

Versus the Configuration Method: Invoke-ArcGISConfiguration -Mode Install -ConfigurationParameterFile my.json

I have given this feedback to Mr. Kroeker, who will update the current sample to include these remarks to make it a bit easier to use. Additionally, he will also ensure that the placeholders get included in the wiki.

If you have any issues, please feel free to ask, or better yet post in the github community.

Keep on keeping on!

View solution in original post