How to install Visual Studio Code, Terraform, Python, Boto3, GitHub, Serverless Framework in Ubuntu
Visual Studio Code
A source code editor with powerful developer tooling, IntelliSense code completion and debugging
https://code.visualstudio.com/
1. Head to https://code.visualstudio.com/docs/?dv=linux64_deb
2. Click on Save file and click ok.
3. Open terminal, let's change our directory to Downloads folder by typing in this command.
cd Downloads/
a. cd means “change directory” in Linux Systems
b. Now that we are in Downloads folder, to list any files in here we can type in “ls” and press Enter. You should be able to see the “code_1.28.2–1539735992_amd64.deb” file listed.
c. To extract this Debian file and install Visual Studio code for Linux, execute this command
sudo dpkg -i code_1.28.2–1539735992_amd64.deb
dpkg is a low-level system tool to extract, analyze and unpack .deb files.
-i flag means to install the following package
f. If you click on the “Search your computer” button on the operating system taskbar and type in “Visual Studio”, it should pop-up.
g. After opening Visual Studio, click on extensions (should be a square icon) and install what you desire. (ex. Python, C/C++, C#)
Terraform
A tool for building, changing, and versioning infrastructure safely and efficiently.
https://www.terraform.io/intro/index.html
1. Head to https://www.terraform.io/downloads.html in Firefox inside the virtual machine
2. Download the Linux 64-bit version and save the package. It will be downloaded to Downloads folder in your system. Now we are going to do unzip this package and add terraform binary file into our path.
3. Open terminal again, let's change our directory to Downloads folder by typing in this command
cd Downloads/
b. Now that we are in Downloads folder to list any files in here we can type in “ls” and press Enter. You should be able to see the “terraform_0.11.xx_linux_amd64.zip” file.
c. To unzip this file type in the following
unzip terraform_0.11.xx_linux_amd64.zip
If you press Tab halfway through typing in the file name, it should auto-fill the rest.
d. If you type in “ls” again, it should list the binary file of terraform
e. Now we are going to set the path by moving the binary to /usr/local/bin/. Type in:
sudo mv terraform /usr/local/bin
f. Now to verify that you have installed terraform and get the usage information you should be able to just type “terraform” in any directory in your terminal and press enter.
Github
An open source development platform where users can host and review code
- To install git type in the following command
sudo apt-get -y install git
a. -y automatically allows the program to continue downloading without a prompt
2. To configure git and user settings type in the following
git config — global user.name “your github username”git config –global user.email “your github email address”
3. You should be all set, now you can git clone any repository from GitHub and start coding!
Serverless Framework
Build applications comprised of microservices that run-in response to events, auto-scale for you and only charge you when they run.
1. Downloading the serverless framework consists of gathering several dependencies in place first
a. Curl
b. Node.js and npm
c. Build essential
2. Curl is a tool to transfer data from or to a server through several protocols
a. We are going to use curl tool to download the correct Node.js binary and add to the APT repository (Advanced Package Tool) so that Ubuntu knows to look for updates from this list as well as from the official Ubuntu sources.
b. To install curl
sudo apt-get install curl
3. To download the right Node.js library
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash –
4. Now install nodejs
sudo apt-get install -y nodejs
5. Run these again just so we are updated
sudo apt-get update
sudo apt-get upgrade
6. Now for our final requirement is to download build-essential
sudo apt-get install -y build-essential
7. To download serverless
sudo npm install -g serverless
Python
An interpreted high-level programming language for scripting, automation, and general programming.
1. Two versions of python should already be installed 2.7.12 and 3.5.2
2. Now we will install python 3.6 version
a. First, we will update the repository which holds the latest python package
sudo add-apt-repository ppa:jonathonf/python-3.6
b. Now that we added the repository let’s check for updates and install 3.6
sudo apt-get updatesudo apt-get install python3.6
c. Verify that python3.6 has been downloaded by typing in python3.6 in the command line
Boto3
Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python
https://boto3.amazonaws.com/v1/documentation/api/latest/index.html
1. To install boto3, first, we need to install pip. Pip is a cross-platform package manager for installing and managing Python Packages.
a. Install pip by typing this command
sudo apt-get install python-pip python-dev build-essential
b. Then do
pip install boto3
Jupyter Notebooks
Is an open-source web application that allows to write code in documents and share the live code, equations, visualizations and narrative text.
1. In your Linux terminal, type in the following (If python3 is installed):
python3 –m pip install –upgrade pipsudo python3 –m pip install jupyter
2. To create a notebook, in your directory type:
jupyter notebook
a. It should open a local web page in your firefox, to get started you can create a notebook!