LazyStack

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
  1. Install PowerShell
    1. 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.
    2. 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
    3. 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.

  2. Install powershell-yaml
    1. PowerShell Sources

      Run the following commands in the PowerShell terminal

      Install-Module powershell-yaml

  3. 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.

  4. Clone the InSciCo/LazyStackSMF project
    1. Open a PowerShell Terminal
    2. CD into the "common" folder.
    3. Issue this git command:
      git clone https://github.com/InSciCo/LazyStackSMF.git  
      A LazyStackSMF folder is created containing a clone of the LazyStackSMF repository.

  5. 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.

  6. Generate Personal Access Tokens (PAT), these tokens are used by LazyStack and AWS CodeBuild to connect to GitHub:
    1. Log into your GitHub personal account.
    2. Click on the user profile icon in the upper right of the page. The user profile menu appears.
    3. Select the Settings menu item. The "personal account page" appears.
    4. Select "Developer Settings" from the left hand menu. The "Developer Settings" page appears.
    5. Select "Personal access tokens" from the left hand menu. The "Personal access tokens" page appears.
    6. Generate Admin Account PAT
      1. 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"
      2. Enter a descriptive note, ex: "Git Admin Access".
      3. Check the "repo" option.
      4. Check the "admin:repo_hook" option.
      5. Click the "Generate token" button. The generated token is displayed.
      6. Copy this token and save it in a file named "GitAdminToken.pat" in the LazyStackSettings folder.
    7. Generate CodeBuild Account PAT
      1. 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"
      2. Enter a descriptive note, ex: "AWS CodeBuild Access".
      3. Check the "repo" option.
      4. Check the "admin:repo_hook" option.
      5. Click the "Generate token" button. The generated token is displayed.
      6. Copy this token and save it in a file named "GitCodeBuildToken.pat" in the LazyStackSettings folder.

    8. Sign out of the GitHub account.

Step Summary

In this step we configured your workstation to use LazyStackSMF scripts.