Link Search Menu Expand Document
Topic Abstract
Ansible Install using Ansible (beta-feature)
Ubuntu Supported OS
Go Toolchain Golang toolchain to build backend
Node.js & npm NodeJS/NPM to build frontend
Linters Go/JS linters
IDE IDE we like
NEXT STEP: Platform Management Workflow  

Ansible

AdvantEDGE development environment installation procedures can be performed manually or automatically.

  • To install manually - Read through the following sections
  • To install using Ansible (beta-feature) - follow this link

Ubuntu

See Ubuntu runtime setup


Go Toolchain

:exclamation: BREAKING CHANGE :exclamation:
With AdvantEDGE release v1.7+, pre-1.13 Go toolchains are no longer supported.

We use the official Go Programming Language install procedure

Versions we use:

  • 1.14, 1.15, 1.16
    (version 1.13 used to work - not tested anymore)

How we do it:

STEP 1 - Download Go linux tarball (here)
STEP 2 - Unzip tarball & install
# Example tarball: go1.15.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
STEP 3 - Create Go working directory
mkdir -p ~/gocode/bin
STEP 4 - Update PATH in bashrc
# Add the following lines at the end of your $HOME/.bashrc
export GOPATH=$HOME/gocode
export PATH=$PATH:$GOPATH/bin:/usr/local/go/bin
STEP 5 - Apply profile updates
source ~/.bashrc
STEP 6 - Verify install
which go
go version

# Example output:
#   /usr/local/go/bin/go
#   go version go1.15.3 linux/amd64

Node.js - npm

We use the How To Install Using NVM method from here

NVM is the Node Version Manager (NVM) tool used to install Node.js. It allows concurrent use of different Node.js installations and simplifies the version upgrade procedure.

Versions we use:

  • NVM: 0.34.0
  • Node.js: 8.11, 10.15, 10.16, 10.19
  • npm: 6.8, 6.9, 6.11, 6.12, 6.14

How we do it:

STEP 1 - Install dependencies
sudo apt-get update
sudo apt-get install build-essential libssl-dev
STEP 2 - Download & install NVM
curl -skL https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh -o install_nvm.sh
bash install_nvm.sh
STEP 3 - Apply profile updates
source ~/.profile
STEP 4 - Install Node.js (latest LTS version)

IMPORTANT NOTE: Latest LTS version 12+ causes demo1 build failures (see issue here)
Workaround is to install previous LTS version 10 until issue is fixed

# Retrieve & install latest v10 Node.js versions
nvm ls-remote | grep "Latest LTS"
nvm install 10.16.3
STEP 5 - Update NPM version bundled with Node.js
npm install -g npm@6.14.8
STEP 6 - Verify install
node -v
npm -v

# Example output:
#   v10.16.3
#   6.12.0

Linters

The linting tools used for development are:

ESLint

ESLint is a pluggable linting utility for JavaScript.

Versions we use:

  • 5.16.0

How we do it:

STEP 1 - Install ESLint globally
npm install -g eslint@5.16.0
STEP 2 - Install ESLint React plugin
npm install -g eslint-plugin-react
STEP 3 - Verify install
eslint -v

# Example output:
#   v5.16.0

GolangCI-Lint

GolangCI-Lint is a linters aggregator for Go.

Versions we use:

  • 1.18.0

How we do it:

STEP 1 - Install GolangCI-Lint
cd ~
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0
STEP 2 - Verify install
golangci-lint --version

# Example output:
# golangci-lint has version v1.18.0 built from (unknown, mod sum: "h1:XmQgfcLofSG/6AsQuQqmLizB+3GggD+o6ObBG9L+VMM=") on (unknown)

IDE

There is no strict requirement on which IDE to use for development.

We use:

Visual Studio Code

Visual Studio Code is ‘a lightweight but powerful source code editor which runs on your desktop.’

Versions we use:

  • 1.55

Extensions we use:

  • ESLint 2.1.20
  • Go 0.24.2

Settings we use:

{
    "files.eol": "\n",
    "go.formatTool": "goimports",
    "go.lintTool": "golangci-lint",
    "go.lintFlags": [
        "--fast"
    ],
    "go.useLanguageServer": false,
    "go.testOnSave": true,
    "[go]": {
        "editor.snippetSuggestions": "none",
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": true
        },
    },
    "[javascript]": {
        "editor.codeActionsOnSave": {
            "source.fixAll.eslint": true,
        },
    },
    "eslint.format.enable": true
}

Atom

Atom is ‘a hackable text editor for the 21st Century.’

Versions we use:

  • 1.36.1

Packages we use:

  • atom-ide-ui 0.13.0
  • go-plus 6.1.0

Settings we use:

"*":
  "atom-ide-ui":
    "atom-ide-code-format":
      formatOnSave: true
    "atom-ide-diagnostics-ui":
      showDirectoryColumn: true
  "go-plus":
    lint:
      args: "--fast"
      tool: "golangci-lint"
    test: {}

Next Step

Learn about the Platform Management Workflow