nc-setup
v1.5.4
Published
Installation package for NC courses
Downloads
326
Readme
nc-setup
nc-setup
is a tool that will install all the main software needed for the JavaScript, Data Engineering and Java programmes.
What nc-setup
does...
- Installs the main pieces of software needed for the (unix-based) Northcoders courses
- Gives an informative report about installation successes and failures
- Organises and formats the output of each installation step to aid debugging
- Can be executed multiple times to retry and confirm installations
Table of Contents
What is nc-setup
?
Prior to joining a bootcamp students will be asked to set up their development environment om their machines. To do this we ask them to use the nc-setup
npm package.
How It Works
At a high level, nc-setup
will install the required software for our courses. It will also add certain pieces of configuration to the appropriate shell configuration file (.bashrc
/.zshrc
).
The script accepts one argument - the course to run the setup for. It can accept:
js
(JavaScript) orsd
(Software Development - being deprecated)de
(Data Engineering)jv
(Java)
The first thing the nc-setup
script does is figure out what operating system the student is running. It will then run the appropriate setup for the course and operating system. For example if a student runs npx nc-setup sd
on an Ubuntu OS then it will run the Linux Software Development with JavaScript setup script.
Understanding the Output
Installation Output
The installation process for each course is divided up into separate steps. For example the setup for JavaScript students running nc-setup
on Linux the steps are as follows:
- Apt package updates
- Installing Git
- Installing PostgreSQL
- Setting up PostgreSQL
The output of each of these steps will have it's own heading like this:
##### LINUX PACKAGE UPDATE #####
output from running the package update command...
Installation Summary
Underneath the output for final installation step you will see a summary that will confirm the success or failure of each step. It will look something like this:
Linux Package Updates ... success
Git ... success
Postgres ... success
Configure Postgres ... success
Errors
Unfortunately errors will sometimes still occur. You may see failure messages in the final summary like this:
If so you can find more information by scrolling up the terminal output and looking under the relevant heading.
Usage
We direct students to execute the nc-setup
package with npx
. To do so we ask them to first install nvm
and a recent version of node
, this will give them access to the npx
command. Once they've done that they can execute the installation script and it should take care of the rest. Students are directed to ask for help in their precourse channels if there are errors that occur while running the script.
NPM/NPX
The recommend usage is to execute the nc-setup
package with npx
. To do this students will first need to install a recent version of node. It is recommended to use Node Version Manager (nvm
) to install the most recent version of node
.
The following command will install nvm
and then use it to install node
:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash && source ~/.nvm/nvm.sh && nvm install node && nvm use node
Linux users may first need to install curl
, if they already have curl
then this step is not necessary
curl
can be installed with the following command:
sudo apt-get install curl
Once they have node
installed they will have access to the npx
command and can run the appropriate installation script as appropriate:
JavaScript students: npx nc-setup js
Data Engineering students: npx nc-setup de
Java students: npx nc-setup jv
What is Installed?
The setup depends on the course and the OS.
JavaScript
Linux (includes WSL)
- Updates Linux Packages
- Installs Git
- Installs Postgres
- Creates Postgres User and DB
MacOS
- Installs Brew
- Installs Postgres
- Installs Zsh (if they don't have it already)
- Installs OhMyZsh
Data Engineering
Linux (includes WSL)
- Checks if they have Conda installed (and exits early with an error message if they do)
- Updates Linux Packages
- Updates Bash
- Installs Git
- Installs Postgres
- Configures PostgreSQL
- Installs pyenv - this step will also write Pyenv config to
.bashrc
file! - Installs Python prerequisites
- Uses pyenv to install Python
- Installs AWS CLI (and the
unzip
command if needed) - Installs Terraform
- Installs Make
- Installs JQ
MacOS
- Checks if they have Conda installed (and exits early with an error message if they do)
- Installs Brew
- Updates Mac Packages
- Installs Zsh
- Installs OhMyZsh - this step will also write brew config and nvm config to the
.zshrc
file! - Installs pyenv - this step will also write pyenv config to the
.zshrc
file! - Uses pyenv to install Python
- Installs PostgreSQL - This also adds
psql
to the PATH by adding a line to the.zshrc
file. - Install AWS CLI
- Installs Terraform
- Installs latest version of Bash
- Installs JQ
- runs
zsh
to start a new shell
Java
Linux (includes WSL)
- Updates Linux Packages
- Installs Git
- Installs Postgres
- Configures Postgres
- Installs JDK
- Installs Intellij
- Installs Android Studio
- Installs pgAdmin
- Installs Docker
MacOS
- Installs Brew
- Installs Postgres
- Installs pgAdmin
- Installs Zsh
- Installs JDK
- Installs Android Studio
- Installs pgAdmin
- Installs Docker
- Installs OhMyZsh - this step will also write brew config and nvm config to
.zshrc
file! - runs
zsh
to start a new shell
Troubleshooting
Troubleshooting guidance is separated by course and can be found here.
Contributing
Contributing guidelines can be found here