This guide explains how to use file TestParameters.ps1
, a powershell script located in the scripts
folder of this repository. The script is meant as a tool to aid PI System Engineers who are deploying the Master Stack template on AWS. Running this script validates the contents of the S3 buckets the user must create before using the AWS Deployment Sample successfully.
Note For best results with the AWS Deployment Samples, it is highly recommended that you keep all of your parameters in a text document and copy and paste them between running this script and deployment of the Deployment Sample.
-
Create S3 buckets in AWS according to the documentation for running the Master Stack Deployment Sample. See other documentation in this repository for instructions.
-
Record the following information about your created S3 buckets. You will need this information to deploy the Deployment Sample template as well as run this script. The parameter names for the script exactly match the parameter names used in the Deployment Sample template.
You will need the following information:Parameter Name Example Description DSS3BucketName osisoft-deploySamples The name of the bucket containing the Deployment Sample files available in this repository. Per AWS limitations, this can contain lowercase letters, numbers, and hyphens. DSS3KeyPrefix DeploymentSample The name of the root folder containing the Deployment Sample folders modules
,scripts
, andtemplates
. This can contain mixed case letters (names are case-sensitive), numbers, hyphens (-), and forward slashes (/).DSS3BucketRegion us-west-1 The region in which your S3 bucket is hosted. The Deployment Sample works best if the buckets are in the same region as your deployed stack, but any region may be used. See AWS API Gateway documentation if you are unsure of the designation for your region. SetupKitsS3BucketName osisoft-setupkits The name of the bucket containing the Setup Kits acquired from OSIsoft, for PI Server and PI Vision. Per AWS limitations, this can contain lowercase letters, numbers, and hyphens. SetupKitsS3KeyPrefix 2018 The name of the folder containing the folders PIServer
andPIVision
which in turn contain their respective installers. This can contain mixed case letters (names are case-sensitive), numbers, hyphens (-), and forward slashes (/).SetupKitsS3BucketRegion us-west-1 The region in which your S3 bucket is hosted. The Deployment Sample works best if the buckets are in the same region as your deployed stack, but any region may be used. See AWS API Gateway documentation if you are unsure of the designation for your region. SetupKitsS3PIFileName PI Server_2018 SP3 Patch 1_.exe The name of the PI Server setup kit file, in the PIServer
folderSetupKitsS3VisionFileName PI Vision_2019 Patch 1_.exe The name of the PI Vision setup kit file, in the PIVision
folderTestFileName Tests-For-Critical-Operations-master.zip The name of the testing file, in the DSS3KeyPrefix folder -
Install the AWS Tools for PowerShell on any machine with PowerShell 2.0 or newer. Any Windows machine running Windows 7/Windows Server 2008 R2 or newer comes with an adequate version of PowerShell pre-installed. The AWS Tools for PowerShell can be downloaded from Amazon at the following url: https://aws.amazon.com/powershell/
-
Create an AWS Access Key for the AWS Account that you will use to run the Deployment Sample. This is done in the IAM console under Users > (your username) > Security Credentials. For complete documentation, see the AWS guide for creating Access Keys.
-
Configure your PowerShell console to use the Access Key.
-
Enable a new profile using the following command (substitue your values for AccessKey and SecretKey):
PS C:\> Set-AWSCredential -AccessKey AKIAIOSFODNN7EXAMPLE -SecretKey wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY -StoreAs MyProfileName
-
If you have previously created an AWS credential profile, enable it using:
PS C:\> Set-AWSCredential -ProfileName MyProfileName
-
See Using AWS Credentials for more information.
-
-
In PowerShell, navigate to the
scripts
folder contained within this repository. -
Execute the script
TestParameters.ps1
. You will be prompted for the values you recorded in step 2. It is highly recommended that you copy and paste these values, rather than typing out, as the parameters are case sensitive. -
The script will first validate the Deployment Sample bucket. The message "DeploySample bucket contents have been verified" will be displayed when all files in the Deployment Sample bucket are verified.
-
Once the Deployment Sample bucket is verified, the script will validated the Setup Kits bucket. The message "Setup kit bucket contents have been verified" will be displayed when all the files in the Setup Kit bucket are verified.
-
If you see both verification messages, you are ready to continue to the deployment.