NGSS Development Environment Setup
Environment Variables
Add the following environment variables to your ~/.zshrc file. It is not necessary to encrypt token values.
# nexus.mobilehealth.va.gov
export VA_NEXUS_USER=<VA Nexus username>
export VA_NEXUS_PWD=<VA Nexus pass/token>
# crowd.mobilehealth.va.gov
export VA_BITBT_USER=<Bitbucket username>
export VA_BITBT_PWD=<Bitbucket token> #must use 2FA token
# dtr.mapsandbox.net
export DTR_USER=<Sandbox DTR username>
export DTR_PWD=<Sandbox DTR pass/token>
export DTR_URL=dtr.mapsandbox.net
Homebrew
Homebrew is a package manager for installing many of the tools you will need. Install Homebrew from https://brew.sh/
git
Install from https://git-scm.com/download/mac
Update your git config with your real name and work email:
git config --global user.name "<NAME>"
git config --global user.email "<EMAIL>"
git config --global core.trustctime false
Docker
Download and install the community edition via Homebrew or from Docker.
If you have an Apple Silicon Mac (M1 or greater), make sure to enable Use Virtualization framework under General then go to Features in development and turn on Use Rosetta for x86/amd64 emulation on Apple Silicon (Docker v4.16.1 and up).
Add your credentials to your docker client. Running the steps below in the terminal will add the credentials using OSX Keychain to ~/.docker/config.json.
docker login dtr.mapsandbox.net
Username: <YOUR DTR_USER>
Password: <YOUR DTR_PWD>
Login Succeeded
Maven
Install from The Apache Maven Project or via Homebrew.
brew install maven
Check your install for any errors using
mvn --version
Maven Configuration
Below is the current version of the settings.xml file used by Maven.
This file should be located at ~/.m2/settings.xml.
settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
<pluginGroup>gov.va.mobile.tools</pluginGroup>
<pluginGroup>gov.va.vamf.tool</pluginGroup>
<pluginGroup>com.google.cloud.tools</pluginGroup>
</pluginGroups>
<servers>
<server>
<id>dtr.mapsandbox.net</id>
<username>${env.DTR_USER}</username>
<password>${env.DTR_PWD}</password>
</server>
<server>
<id>ckm-releases</id>
<username>${env.VA_NEXUS_USER}</username>
<password>${env.VA_NEXUS_PWD}</password>
</server>
<server>
<id>ckm-snapshots</id>
<username>${env.VA_NEXUS_USER}</username>
<password>${env.VA_NEXUS_PWD}</password>
</server>
<server>
<id>bitbucket</id>
<username>${env.VA_BITBT_USER}</username>
<password>${env.VA_BITBT_PWD}</password>
</server>
<server>
<id>opensaml</id>
<username>${env.VA_NEXUS_USER}</username>
<password>${env.VA_NEXUS_PWD}</password>
</server>
</servers>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<sonar.host.url>https://sonarqube.mapsandbox.net/sonarqube</sonar.host.url>
<sonar.login>${env.DTR_USER}</sonar.login>
<sonar.password>${env.DTR_PWD}</sonar.password>
</properties>
</profile>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>ckm-releases</id>
<url>https://nexus.mobilehealth.va.gov/content/repositories/ckm-releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>ckm-snapshots</id>
<url>https://nexus.mobilehealth.va.gov/content/repositories/ckm-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>maven-central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>opensaml</id>
<url>https://nexus.mobilehealth.va.gov/content/repositories/opensaml/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>ckm-releases</id>
<url>https://nexus.mobilehealth.va.gov/content/repositories/ckm-releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
<pluginRepository>
<id>ckm-snapshots</id>
<url>https://nexus.mobilehealth.va.gov/content/repositories/ckm-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
Skaffold and Kustomize
Download and install Skaffold and Kustomize, or install via Homebrew. If you run into issues, uninstall them from Homebrew and install the versions below.
macOS amd64
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.12.0/skaffold-darwin-amd64 && \
chmod +x skaffold && sudo mv skaffold /usr/local/bin && \
curl -Lo kustomize.tar.gz "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.4.3/kustomize_v5.4.3_darwin_amd64.tar.gz" && \
tar xvfz kustomize.tar.gz && sudo mv kustomize /usr/local/bin
macOS arm64
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.12.0/skaffold-darwin-arm64 && \
chmod +x skaffold && sudo mv skaffold /usr/local/bin && \
curl -Lo kustomize.tar.gz "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.4.3/kustomize_v5.4.3_darwin_arm64.tar.gz" && \
tar xvfz kustomize.tar.gz && sudo mv kustomize /usr/local/bin
Linux amd64
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.12.0/skaffold-linux-amd64 && \
chmod +x skaffold && sudo mv skaffold /usr/local/bin/skaffold && \
curl -Lo kustomize.tar.gz "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.4.3/kustomize_v5.4.3_linux_amd64.tar.gz" && \
tar xvfz kustomize.tar.gz && sudo mv kustomize /usr/local/bin/kustomize
Kubernetes Monitoring Tools
You will need to monitor your local kubernetes cluster to ensure that your deployments are healthy and to perform troubleshooting if they are not. As an alternative to executing kubectl commands from your terminal, below are a number of good graphical tools that are available for monitoring your local cluster.
Any tool should be sufficient. You can also choose to monitor your cluster via kubectl commands, if that is your preference.