Step 2) Configure Management Workstation
- Prerequisites: none
- Estimated Time: 2 - 5 minutes
- Estimated Cost: none
- Perform this step on the Management Workstation.
In this step we will create/configure your workstation with the tools necessary to create and
manage your SMF Organization.
Configuration Steps
- Install PowerShell
-
Install the latest PowerShell
If you are running Windows 10, PowerShell 5.1 is
already installed. Although our scripts will work with PowerShell 5.1+,
we suggest you install the latest portable PowerShell. We find the latest version "just works" when
trying to install modules from PSGallery. Sometimes 5.1 will fail when run from behind a
corporate proxy or in a virtual machine and it can take a bit of effort to get 5.1 to work if
that happens. You can try using PowerShell 5.1 and run the "Install powershell-yaml" step below and
if you run into trouble accessing the PSGallery, then just install the latest PowerShell.
- Open a PowerShell terminal with "Run as Administrator" and check your version. If you are running the latest version, the
first line in the new terminal will usually show the version like this:
PowerShell 7.1.3
A PowerShell Version 5.1 terminal doesn't show the version when you open a terminal. However, you
get the PowerShell version running in a terminal by issuing this command:
Get-Host | Select-Object Version
- Issue the following command to change the
PowerShell script execution permissions:
Set-ExecutionPolicy RemoteSigned
This will allow you to run PowerShell scripts on the local computer which is generally necessary for
the Management Workstation.
- Install powershell-yaml
- PowerShell Sources
Run the following commands in the PowerShell terminal
Install-Module powershell-yaml
- Select the "common" folder that will contain the LazyStackSMF folder and LazyStackSettings folder.
On a
Windows machine this might be C:\Users\User\source\repos.
- Clone the InSciCo/LazyStackSMF project
- Open a PowerShell Terminal
- CD into the "common" folder.
- Issue this git command:
git clone https://github.com/InSciCo/LazyStackSMF.git
A LazyStackSMF folder is created containing a clone of the LazyStackSMF repository.
- Create the LazyStackSettings folder under the "common" folder. You can choose a different name, we will
use LazyStackSettings to refer to this folder in the rest of this documentation. You would choose another
name if you are managing more than one SMF Organization on your management workstation.
- Generate Personal Access Tokens (PAT), these tokens are used by LazyStack and AWS
CodeBuild to connect to GitHub:
- Log into your GitHub personal account.
- Click on the user profile icon in the upper right of the page. The user profile menu appears.
- Select the Settings menu item. The "personal account page" appears.
- Select "Developer Settings" from the left hand menu. The "Developer Settings" page appears.
- Select "Personal access tokens" from the left hand menu. The "Personal access tokens" page appears.
- Generate Admin Account PAT
- Click on the Generate new token button. The "Confirm access" page appears. Note: GitHub may
request your password at this point, provide it if requested. The "New personal access token" page
appears"
- Enter a descriptive note, ex: "Git Admin Access".
- Check the "repo" option.
- Check the "admin:repo_hook" option.
- Click the "Generate token" button. The generated token is displayed.
- Copy this token and save it in a file named "GitAdminToken.pat" in the LazyStackSettings folder.
- Generate CodeBuild Account PAT
- Click on the Generate new token button. The "Confirm access" page appears. Note: GitHub may
request your password at this point, provide it if requested. The "New personal access token" page
appears"
- Enter a descriptive note, ex: "AWS CodeBuild Access".
- Check the "repo" option.
- Check the "admin:repo_hook" option.
- Click the "Generate token" button. The generated token is displayed.
- Copy this token and save it in a file named "GitCodeBuildToken.pat" in the LazyStackSettings folder.
- Sign out of the GitHub account.
Step Summary
In this step we configured your workstation to use LazyStackSMF scripts.