Setting up your MacOS Workstation
Support Document
Here's the checklist of tools you need to have installed and configured, if you want to work with the sample code on this site with MacOS workstation:
- Installing and Configuring the AWS CLI
- Installing the .Net SDK and Lambda Tools
- Configuring NuGet
- Using MacPorts to install the OpenJDK, GIT and Maven
- Configuring GIT
- Configuring Maven
- Installing VS Code
- Installing Postman and Postman Canary
Prerequisites
Please note that before starting here, you need to have previously run through the AWS and Github account setup checklists. These checklists will have left you with two sets of credentials on hand, ready to use:
- AWS access keys
- Github username and personal access token
Installing and Configuring the AWS CLI
The AWS command line interface (CLI) is a large Python library for which there's installation instructions and downloads available here:
Once you have the CLI is installed, run the configuration command from the terminal:
aws configure
You'll be prompted to enter the access key, secret key and default region code (e.g. us-east-1) that you generated/selected with the “Setting up an AWS Account” checklist.
Installing the .Net SDK and Lambda Tools
If you intend to work with .Net variants of sample code for this site, then you should follow these next steps.
First, download and install the latest .Net SDK if you don’t have it already:
https://dotnet.microsoft.com/en-us/download
Next, install the AWS Lambda Tools extension with this command:
dotnet tool install -g Amazon.Lambda.Tools
You also need to add this line to your “.zprofile” file:
export PATH="$PATH:/Users/johngrantham/.dotnet/tools"
Configure NuGet
Again, if you intend to use .Net variants of the sample code, then run this command to add the Github packages as an authenticated NuGet source. Be sure you substitute your personal access token value:
dotnet nuget add source --username USERNAME `
--password \{your personal access token\} `
--store-password-in-clear-text `
--name github "https://nuget.pkg.github.com/johngrantham/index.json"
Using MacPorts to Install the OpenJDK, GIT and Maven
To install the OpenJDK, Maven, and GIT, we’re using the MacPorts package management tool. Note that you only need to install OpenJDK and Maven if you're intending to work with the Java variants of the sample code for this site.
First, follow the MacPorts installation steps outlined here:
https://www.macports.org/install.php
Then, run these commands to in sequence install the OpenJDK, Maven and GIT:
sudo port install openjdk11
sudo port install git
sudo port install maven32
sudo port select --set maven maven32
Configuring GIT
Run these two commands to configure GIT, setting appropriate values for your name and email:
git config --global user.name \[your name\]
git config --global user.email \[your email\]
Configuring Maven
As with the NuGet configuration performed above, you need to configure Maven with credentials so that it can access the Github packages.
First, run the maven command to initialize the repositories directory. You can ignore the error messages that this command generates when run without any arguments:
mvn
You should now see an “.m2” folder in your home directory (hint: press cmd-shift-period to see hidden files on MacOS).
Next, take the XML shown below, substitute your Github username and personal access token values, and save it with the file name “settings.xml” in the ~/.m2 folder:
<settings>
<servers>
<server>
<id>github</id>
<username>{your github username}</username>
<password>{your github personal access token}</password>
</server>
</servers>
</settings>
Installing VS Code
If you don’t already have VS Code on your workstation, you can download it from here:
https://code.visualstudio.com/download
Installing Postman and Postman Canary
The sample code for this site often includes API test collections for Postman. You can download the Postman desktop application from here:
https://www.postman.com/downloads/
There are also some required performance testing features are currently only available in Postman Canary, which is an early release version of Postman. You can download the Postman Canary release from here: